mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Merge branch 'bootstrap5' into add-location-period
This commit is contained in:
@@ -1,25 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2016-2019 Champs-Libres <info@champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Chill\PersonBundle\Command;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
@@ -28,39 +10,28 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Symfony\Component\Console\Exception\RuntimeException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
|
||||
class ChillPersonMoveCommand extends ContainerAwareCommand
|
||||
final class ChillPersonMoveCommand extends Command
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var PersonMove
|
||||
*/
|
||||
protected $mover;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
protected $em;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
protected $chillLogger;
|
||||
|
||||
private PersonMove $mover;
|
||||
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
private LoggerInterface $chillLogger;
|
||||
|
||||
public function __construct(
|
||||
PersonMove $mover,
|
||||
PersonMove $mover,
|
||||
EntityManagerInterface $em,
|
||||
LoggerInterface $chillLogger
|
||||
) {
|
||||
parent::__construct('chill:person:move');
|
||||
|
||||
|
||||
$this->mover = $mover;
|
||||
$this->em = $em;
|
||||
$this->chillLogger = $chillLogger;
|
||||
}
|
||||
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
@@ -73,14 +44,14 @@ class ChillPersonMoveCommand extends ContainerAwareCommand
|
||||
->addOption('delete-entity', null, InputOption::VALUE_REQUIRED|InputOption::VALUE_IS_ARRAY, "entity to delete", [])
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
protected function interact(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if (FALSE === $input->hasOption('dump-sql') && FALSE === $input->hasOption('force')) {
|
||||
$msg = "You must use \"--dump-sql\" or \"--force\"";
|
||||
throw new RuntimeException($msg);
|
||||
}
|
||||
|
||||
|
||||
foreach (["from", "to"] as $name) {
|
||||
if (empty($input->getOption($name))) {
|
||||
throw new RuntimeException("You must set a \"$name\" option");
|
||||
@@ -90,7 +61,7 @@ class ChillPersonMoveCommand extends ContainerAwareCommand
|
||||
throw new RuntimeException("The id in \"$name\" field does not contains "
|
||||
. "only digits: $id");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
@@ -99,16 +70,16 @@ class ChillPersonMoveCommand extends ContainerAwareCommand
|
||||
$from = $repository->find($input->getOption('from'));
|
||||
$to = $repository->find($input->getOption('to'));
|
||||
$deleteEntities = $input->getOption('delete-entity');
|
||||
|
||||
|
||||
if ($from === NULL) {
|
||||
throw new RuntimeException(sprintf("Person \"from\" with id %d not found", $input->getOption('from')));
|
||||
}
|
||||
if ($to === NULL) {
|
||||
throw new RuntimeException(sprintf("Person \"to\" with id %d not found", $input->getOption('to')));
|
||||
}
|
||||
|
||||
|
||||
$sqls = $this->mover->getSQL($from, $to, $deleteEntities);
|
||||
|
||||
|
||||
if ($input->getOption('dump-sql')) {
|
||||
foreach($sqls as $sql) {
|
||||
$output->writeln($sql);
|
||||
@@ -125,25 +96,25 @@ class ChillPersonMoveCommand extends ContainerAwareCommand
|
||||
$connection->executeQuery($sql);
|
||||
}
|
||||
$connection->commit();
|
||||
|
||||
|
||||
$this->chillLogger->notice("Move a person from command line succeeded", $ctxt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function buildLoggingContext(Person $from, Person $to, $deleteEntities, $sqls)
|
||||
{
|
||||
$ctxt = [
|
||||
'from' => $from->getId(),
|
||||
'to' => $to->getId()
|
||||
];
|
||||
|
||||
|
||||
foreach ($deleteEntities as $key => $de) {
|
||||
$ctxt['delete_entity_'.$key] = $de;
|
||||
}
|
||||
foreach ($sqls as $key => $sql) {
|
||||
$ctxt['sql_'.$key] = $sql;
|
||||
}
|
||||
|
||||
|
||||
return $ctxt;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Command;
|
||||
|
||||
use Chill\PersonBundle\Service\Import\ChillImporter;
|
||||
use Chill\PersonBundle\Service\Import\SocialWorkMetadataInterface;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Exception;
|
||||
use League\Csv\Reader;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Throwable;
|
||||
|
||||
final class ImportSocialWorkMetadata extends Command
|
||||
{
|
||||
/**
|
||||
* @var EntityManagerInterface
|
||||
*/
|
||||
protected EntityManagerInterface $em;
|
||||
|
||||
/**
|
||||
* @var LoggerInterface
|
||||
*/
|
||||
protected ChillImporter $importer;
|
||||
|
||||
public function __construct(
|
||||
SocialWorkMetadataInterface $socialWorkMetadata
|
||||
) {
|
||||
parent::__construct('chill:person:import-socialwork');
|
||||
|
||||
$this->importer = $socialWorkMetadata;
|
||||
}
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName('chill:person:import-socialwork')
|
||||
->addOption('filepath', 'f', InputOption::VALUE_REQUIRED, 'The file to import.')
|
||||
->addOption('language', 'l', InputOption::VALUE_OPTIONAL, 'The default language');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$filepath = $input->getOption('filepath');
|
||||
|
||||
try {
|
||||
$csv = Reader::createFromPath($filepath);
|
||||
} catch (Throwable $e) {
|
||||
throw new Exception('Error while loading CSV.',0, $e);
|
||||
}
|
||||
|
||||
$csv->setDelimiter(';');
|
||||
|
||||
return true === $this->importer->import($csv) ?
|
||||
0:
|
||||
1;
|
||||
}
|
||||
}
|
@@ -69,7 +69,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
$loader->load('services/search.yaml');
|
||||
$loader->load('services/menu.yaml');
|
||||
$loader->load('services/privacyEvent.yaml');
|
||||
$loader->load('services/command.yaml');
|
||||
$loader->load('services/actions.yaml');
|
||||
$loader->load('services/form.yaml');
|
||||
$loader->load('services/alt_names.yaml');
|
||||
|
@@ -23,7 +23,7 @@ class Evaluation
|
||||
private $title = [];
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="dateinterval")
|
||||
* @ORM\Column(type="dateinterval", nullable=true)
|
||||
*/
|
||||
private $delay;
|
||||
|
||||
|
@@ -47,7 +47,7 @@ class SocialAction
|
||||
private $children;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="dateinterval")
|
||||
* @ORM\Column(type="dateinterval", nullable=true)
|
||||
*/
|
||||
private $defaultNotificationDelay;
|
||||
|
||||
|
@@ -5,8 +5,9 @@ namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
final class EvaluationRepository
|
||||
final class EvaluationRepository implements ObjectRepository
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
|
||||
@@ -14,4 +15,40 @@ final class EvaluationRepository
|
||||
{
|
||||
$this->repository = $entityManager->getRepository(Evaluation::class);
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Evaluation
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, Evaluation>
|
||||
*/
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, Evaluation>
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?Evaluation
|
||||
{
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return class-string
|
||||
*/
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Evaluation::class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -18,31 +18,27 @@ final class GoalRepository implements ObjectRepository
|
||||
$this->repository = $entityManager->getRepository(Goal::class);
|
||||
}
|
||||
|
||||
public function find($id)
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Goal
|
||||
{
|
||||
return $this->repository->find($id);
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
}
|
||||
|
||||
public function findAll()
|
||||
/**
|
||||
* @return array<int, Goal>
|
||||
*/
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
|
||||
/**
|
||||
* @return array<int, Goal>
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria)
|
||||
{
|
||||
return $this->findOneBy($criteria);
|
||||
}
|
||||
|
||||
public function getClassName()
|
||||
{
|
||||
return Goal::class;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Goal[]
|
||||
@@ -91,4 +87,16 @@ final class GoalRepository implements ObjectRepository
|
||||
|
||||
return $qb;
|
||||
}
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?Goal
|
||||
{
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return class-string
|
||||
*/
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Goal::class;
|
||||
}
|
||||
}
|
||||
|
@@ -19,31 +19,19 @@ final class ResultRepository implements ObjectRepository
|
||||
$this->repository = $entityManager->getRepository(Result::class);
|
||||
}
|
||||
|
||||
public function find($id)
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?Result
|
||||
{
|
||||
return $this->repository->find($id);
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
}
|
||||
|
||||
public function findAll()
|
||||
/**
|
||||
* @return array<int, Result>
|
||||
*/
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria)
|
||||
{
|
||||
return $this->findOneBy($criteria);
|
||||
}
|
||||
|
||||
public function getClassName()
|
||||
{
|
||||
return Result::class;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Result[]
|
||||
@@ -133,5 +121,25 @@ final class ResultRepository implements ObjectRepository
|
||||
->getSingleScalarResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, Result>
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?Result
|
||||
{
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return class-string
|
||||
*/
|
||||
public function getClassName(): string
|
||||
{
|
||||
return Result::class;
|
||||
}
|
||||
}
|
||||
|
@@ -5,8 +5,9 @@ namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
|
||||
final class SocialActionRepository
|
||||
final class SocialActionRepository implements ObjectRepository
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
|
||||
@@ -14,4 +15,38 @@ final class SocialActionRepository
|
||||
{
|
||||
$this->repository = $entityManager->getRepository(SocialAction::class);
|
||||
}
|
||||
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?SocialAction
|
||||
{
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, SocialAction>
|
||||
*/
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<int, SocialAction>
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialAction
|
||||
{
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return class-string
|
||||
*/
|
||||
public function getClassName(): string
|
||||
{
|
||||
return SocialAction::class;
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
@@ -17,42 +18,36 @@ final class SocialIssueRepository implements ObjectRepository
|
||||
$this->repository = $entityManager->getRepository(SocialIssue::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function find($id)
|
||||
public function find($id, ?int $lockMode = null, ?int $lockVersion = null): ?SocialIssue
|
||||
{
|
||||
return $this->repository->find($id);
|
||||
return $this->repository->find($id, $lockMode, $lockVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @return array<int, SocialIssue>
|
||||
*/
|
||||
public function findAll()
|
||||
public function findAll(): array
|
||||
{
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @return array<int, SocialIssue>
|
||||
*/
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function findOneBy(array $criteria)
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialIssue
|
||||
{
|
||||
return $this->findOneBy($criteria);
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @return class-string
|
||||
*/
|
||||
public function getClassName()
|
||||
public function getClassName(): string
|
||||
{
|
||||
return SocialIssue::class;
|
||||
}
|
||||
|
@@ -0,0 +1,154 @@
|
||||
// Access to Bootstrap variables and mixins
|
||||
@import '~ChillMainAssets/module/bootstrap/shared';
|
||||
|
||||
/*
|
||||
* PERSON CONTEXT
|
||||
*/
|
||||
div.banner {
|
||||
div#header-person-name {
|
||||
background: none repeat scroll 0 0 $chill-green-dark;
|
||||
color: $white;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
div#header-person-details {
|
||||
background: none repeat scroll 0 0 $chill-green;
|
||||
color: $white;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
div.contact {
|
||||
& > * {
|
||||
margin-right: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
div.person-view {
|
||||
figure.person-details {
|
||||
h2 {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.3em;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
dl {
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
dt {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: 600;
|
||||
}
|
||||
dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
/*
|
||||
a.sc-button { background-color: $black; padding-top: 0.2em; padding-bottom: 0.2em; }
|
||||
*/
|
||||
}
|
||||
/* custom fields on the home page */
|
||||
div.custom-fields {
|
||||
figure.person-details {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
div.cf_title_box:nth-child(4n+1) h2 {
|
||||
@extend .chill-red !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+2) h2 {
|
||||
@extend .chill-green !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+3) h2 {
|
||||
@extend .chill-orange !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+4) h2 {
|
||||
@extend .chill-blue !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(2n+1) {
|
||||
width: 50%;
|
||||
margin-right: 40px;
|
||||
}
|
||||
div.cf_title_box:nth-child(2n+2) {
|
||||
width: calc(50% - 40px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ACCOMPANYING_COURSE CONTEXT
|
||||
* Header custom for Accompanying Course
|
||||
*/
|
||||
$chill-accourse-context: #718596;
|
||||
|
||||
div.banner {
|
||||
div#header-accompanying_course-name {
|
||||
background: none repeat scroll 0 0 $chill-accourse-context;
|
||||
color: $white;
|
||||
h1 {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
span {
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
div#header-accompanying_course-details {
|
||||
background: none repeat scroll 0 0 tint-color($chill-accourse-context, 20%);
|
||||
color: $white;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* HOUSEHOLD CONTEXT
|
||||
* Header custom for Household
|
||||
*/
|
||||
$chill-household-context: #929d69;
|
||||
|
||||
div.banner {
|
||||
div#header-household-name {
|
||||
background: none repeat scroll 0 0 $chill-household-context;
|
||||
color: $white;
|
||||
h1 {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
span {
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
div.household-members {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
span.badge-member {
|
||||
flex-shrink: 0; flex-grow: 0; flex-basis: auto;
|
||||
color: $white;
|
||||
border: 1px solid #ffffff3b;
|
||||
border-radius: 8px;
|
||||
padding: 0.4em 0.8em;
|
||||
margin-bottom: 0.2em;
|
||||
margin-right: 0.3em;
|
||||
&.holder { order: -1; }
|
||||
&.child { order: 2; }
|
||||
}
|
||||
}
|
||||
}
|
||||
div#header-household-details {
|
||||
background: none repeat scroll 0 0 tint-color($chill-household-context, 15%);
|
||||
color: $white;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
span.current-members-explain {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
15
src/Bundle/ChillPersonBundle/Resources/public/chill/index.js
Normal file
15
src/Bundle/ChillPersonBundle/Resources/public/chill/index.js
Normal file
@@ -0,0 +1,15 @@
|
||||
//still used ?
|
||||
//require('./css/person.css');
|
||||
|
||||
require('./chillperson.scss');
|
||||
|
||||
require('./scss/person_with_period.scss');
|
||||
require('./scss/household_banner.scss');
|
||||
require('./scss/accompanying_period_work.scss');
|
||||
require('./scss/person_by_phonenumber.scss');
|
||||
require('./scss/render_box.scss');
|
||||
require('./scss/flex_table.scss');
|
||||
require('./scss/address_history.scss');
|
||||
|
||||
require('./svg/phone-alt-solid.svg');
|
||||
require('./svg/mobile-alt-solid.svg');
|
@@ -1,5 +1,11 @@
|
||||
|
||||
#accompanying_course_work_list {
|
||||
.chill-entity__social-action {
|
||||
.badge-primary {
|
||||
background-color: var(--chill-green);
|
||||
}
|
||||
}
|
||||
|
||||
div.accompanying_course_work-list {
|
||||
|
||||
.item {
|
||||
margin-bottom: 1.5rem;
|
||||
@@ -21,10 +27,10 @@
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
"obj res"
|
||||
;
|
||||
;
|
||||
grid-template-columns: 50%;
|
||||
column-gap: 1rem;
|
||||
|
||||
|
||||
padding: 0.3rem;
|
||||
|
||||
.obj {
|
||||
@@ -42,7 +48,7 @@
|
||||
}
|
||||
|
||||
.objective_results:nth-child(2n+2) {
|
||||
background-color: var(--chill-llight-gray);
|
||||
background-color: var(--bs-chill-llight-gray);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +91,7 @@ ul.timeline {
|
||||
align-items: center;
|
||||
|
||||
padding: 0 40px;
|
||||
border-top: 3px solid var(--chill-green);
|
||||
border-top: 3px solid var(--bs-chill-green);
|
||||
|
||||
&:before {
|
||||
content: '';
|
||||
@@ -93,11 +99,11 @@ ul.timeline {
|
||||
position: relative;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
|
||||
|
||||
background-color: white;
|
||||
border-radius: 12px;
|
||||
border: 2px solid var(--chill-green);
|
||||
|
||||
border: 2px solid var(--bs-chill-green);
|
||||
|
||||
top: -9px;
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* ADDRESS HISTORY
|
||||
* context person / household
|
||||
*/
|
||||
div.address-timeline.grid {
|
||||
display: grid;
|
||||
grid-template-rows: auto auto auto;
|
||||
grid-template-columns: auto 120px auto;
|
||||
|
||||
div.household-address & {
|
||||
// no col-a in this context !
|
||||
grid-template-columns: 0 120px auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 750px) {
|
||||
grid-template-columns: auto 1em auto;
|
||||
}
|
||||
|
||||
div.top {
|
||||
grid-column: 2;
|
||||
text-align: center;
|
||||
color: lightgrey;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
div.col-a {
|
||||
grid-column: 1;
|
||||
text-align: right;
|
||||
}
|
||||
div.col-b,
|
||||
div.date {
|
||||
grid-column: 2;
|
||||
position: relative;
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: 0; bottom: 0;
|
||||
left: 50%;
|
||||
margin: auto -5px;
|
||||
width: 10px;
|
||||
height: 100%;
|
||||
background-color: lightgrey;
|
||||
z-index: -5;
|
||||
}
|
||||
}
|
||||
div.col-c {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
div.col-b,
|
||||
div.action,
|
||||
div.content {
|
||||
min-height: 30px;
|
||||
padding: 1em;
|
||||
}
|
||||
div.content {
|
||||
margin: 0.3em;
|
||||
border: 1px dashed #00000045;
|
||||
&.row1 { // current address
|
||||
border: 1px solid #000;
|
||||
}
|
||||
div.address {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
}
|
||||
div.date {
|
||||
text-align: center;
|
||||
background-color: lightgrey;
|
||||
padding: 0.5em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
div.span2 { grid-row: span 3; }
|
||||
div.span3 { grid-row: span 5; }
|
||||
div.span4 { grid-row: span 7; }
|
||||
div.span5 { grid-row: span 9; }
|
||||
|
||||
ul.record_actions {
|
||||
margin: 0;
|
||||
}
|
||||
.fake {
|
||||
&:after {
|
||||
content: 'fake, just to test.. ';
|
||||
color: lightgrey;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* flex-table overwrite: precision and exceptions
|
||||
*/
|
||||
|
||||
///
|
||||
div.accompanyingcourse-resume {
|
||||
div.associated-persons {
|
||||
.flex-table .item-row .item-col:first-child {
|
||||
flex-basis: 33%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
div.accompanyingcourse-list, div.household-members {
|
||||
.flex-table .item-bloc .item-row {
|
||||
&:nth-child(2) {
|
||||
flex-direction: row;
|
||||
}
|
||||
&:last-child {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
div.list-with-period {
|
||||
div.flex-table div.item-row div.item-col:first-child {
|
||||
flex-basis: 33%;
|
||||
}
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
|
||||
///
|
||||
div.list-with-period, div.list-household-members {
|
||||
|
||||
div.periods {
|
||||
div.header,
|
||||
div.list-content {
|
||||
width: calc(100% - 40px);
|
||||
margin-left: 40px;
|
||||
}
|
||||
div.header {
|
||||
position: relative;
|
||||
a.btn {
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
top: 10px;
|
||||
left: -40px;
|
||||
padding: 0;
|
||||
i {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
abbr.referrer {
|
||||
font-size: 70%;
|
||||
}
|
||||
span.user {
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
div.list-content {
|
||||
span.more {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -0,0 +1,8 @@
|
||||
section.chill-entity {
|
||||
&.entity-person {
|
||||
span.firstname,
|
||||
span.lastname,
|
||||
span.altname {}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 516 B After Width: | Height: | Size: 516 B |
Before Width: | Height: | Size: 502 B After Width: | Height: | Size: 502 B |
@@ -1,4 +0,0 @@
|
||||
require('./sass/chillperson.scss');
|
||||
require('./sass/person_with_period.scss');
|
||||
require('./sass/household_banner.scss');
|
||||
require('./sass/accompanying_period_work.scss');
|
@@ -1 +0,0 @@
|
||||
require('./index.scss');
|
@@ -1,4 +1,4 @@
|
||||
import { ShowHide } from 'ShowHide/show_hide.js';
|
||||
import { ShowHide } from 'ShowHide';
|
||||
|
||||
let
|
||||
k = document.getElementById('waitingForBirthContainer'),
|
@@ -1,4 +1,4 @@
|
||||
import { ShowHide } from 'ShowHide/show_hide.js';
|
||||
import { ShowHide } from 'ShowHide';
|
||||
|
||||
const maritalStatus = document.getElementById("maritalStatus");
|
||||
const maritalStatusDate = document.getElementById("maritalStatusDate");
|
@@ -1,6 +0,0 @@
|
||||
|
||||
.chill-entity__social-action {
|
||||
.badge-primary {
|
||||
background-color: var(--chill-green);
|
||||
}
|
||||
}
|
@@ -1,214 +0,0 @@
|
||||
@import '~ChillMainAssets/modules/bootstrap/bootstrap';
|
||||
|
||||
/*
|
||||
* PERSON CONTEXT
|
||||
*/
|
||||
|
||||
div#header-person-name {
|
||||
background: none repeat scroll 0 0 $chill-green-dark;
|
||||
color: #FFF;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
div#header-person-details {
|
||||
background: none repeat scroll 0 0 $chill-green;
|
||||
color: #FFF;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
div#person_details_container {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
div.person-view {
|
||||
figure.person-details {
|
||||
h2 {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: 600;
|
||||
margin-bottom: 0.3em;
|
||||
font-variant: small-caps;
|
||||
}
|
||||
dl {
|
||||
margin-top: 0.3em;
|
||||
}
|
||||
dt {
|
||||
font-family: 'Open Sans';
|
||||
font-weight: 600;
|
||||
}
|
||||
dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
/*
|
||||
a.sc-button { background-color: $black; padding-top: 0.2em; padding-bottom: 0.2em; }
|
||||
*/
|
||||
}
|
||||
/* custom fields on the home page */
|
||||
div.custom-fields {
|
||||
figure.person-details {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
div.cf_title_box:nth-child(4n+1) h2 {
|
||||
@extend .chill-red !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+2) h2 {
|
||||
@extend .chill-green !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+3) h2 {
|
||||
@extend .chill-orange !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(4n+4) h2 {
|
||||
@extend .chill-blue !optional;
|
||||
}
|
||||
div.cf_title_box:nth-child(2n+1) {
|
||||
width: 50%;
|
||||
margin-right: 40px;
|
||||
}
|
||||
div.cf_title_box:nth-child(2n+2) {
|
||||
width: calc(50% - 40px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ACCOMPANYING_COURSE CONTEXT
|
||||
* Header custom for Accompanying Course
|
||||
*/
|
||||
|
||||
div#header-accompanying_course-name {
|
||||
background: none repeat scroll 0 0 #718596;
|
||||
color: #FFF;
|
||||
h1 {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
span {
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
div#header-accompanying_course-details {
|
||||
background: none repeat scroll 0 0 #718596ab;
|
||||
color: #FFF;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
/*
|
||||
* HOUSEHOLD CONTEXT
|
||||
* Header custom for Household
|
||||
*/
|
||||
|
||||
div#header-household-name {
|
||||
background: none repeat scroll 0 0 #929d69; //#b97a7a;
|
||||
color: #FFF;
|
||||
h1 {
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
span {
|
||||
a {
|
||||
color: white;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
div#header-household-details {
|
||||
background: none repeat scroll 0 0 #b0b984; //#d29791;
|
||||
color: #FFF;
|
||||
padding-top: 1em;
|
||||
padding-bottom: 1em;
|
||||
span.current-members-explain {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ADDRESS HISTORY
|
||||
* context person / household
|
||||
*/
|
||||
div.address-timeline.grid {
|
||||
display: grid;
|
||||
grid-template-rows: auto auto auto;
|
||||
grid-template-columns: auto 120px auto;
|
||||
|
||||
@media only screen and (max-width: 750px) {
|
||||
grid-template-columns: auto 1em auto;
|
||||
}
|
||||
|
||||
div.top {
|
||||
grid-column: 2;
|
||||
text-align: center;
|
||||
color: lightgrey;
|
||||
margin-bottom: -20px;
|
||||
}
|
||||
div.col-a {
|
||||
grid-column: 1;
|
||||
text-align: right;
|
||||
}
|
||||
div.col-b,
|
||||
div.date {
|
||||
grid-column: 2;
|
||||
position: relative;
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: 0; bottom: 0;
|
||||
left: 50%;
|
||||
margin: auto -5px;
|
||||
width: 10px;
|
||||
height: 100%;
|
||||
background-color: lightgrey;
|
||||
z-index: -5;
|
||||
}
|
||||
}
|
||||
div.col-c {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
div.col-b,
|
||||
div.action,
|
||||
div.content {
|
||||
min-height: 30px;
|
||||
padding: 1em;
|
||||
}
|
||||
div.content {
|
||||
margin: 0.3em;
|
||||
border: 1px dashed #00000045;
|
||||
&.row1 { // current address
|
||||
border: 1px solid #000;
|
||||
}
|
||||
div.address {
|
||||
font-variant: small-caps;
|
||||
}
|
||||
}
|
||||
div.date {
|
||||
text-align: center;
|
||||
background-color: lightgrey;
|
||||
padding: 0.5em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
div.span2 { grid-row: span 3; }
|
||||
div.span3 { grid-row: span 5; }
|
||||
div.span4 { grid-row: span 7; }
|
||||
div.span5 { grid-row: span 9; }
|
||||
|
||||
ul.record_actions {
|
||||
margin: 0;
|
||||
}
|
||||
.fake {
|
||||
&:after {
|
||||
content: 'fake, just to test.. ';
|
||||
color: lightgrey;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,5 +0,0 @@
|
||||
require('./phone-alt-solid.svg');
|
||||
require('./mobile-alt-solid.svg');
|
||||
require('./person_by_phonenumber.scss');
|
||||
require('./person_with_period.scss');
|
||||
|
@@ -1,60 +0,0 @@
|
||||
/// complete and overwrite flex-table in chillmain.scss
|
||||
div.list-with-period,
|
||||
div.list-household-members {
|
||||
|
||||
.chill-entity__person {
|
||||
.chill-entity__person__first-name,
|
||||
.chill-entity__person__last-name {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
.chill_denomination {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
div.person {
|
||||
ul.record_actions {
|
||||
li {
|
||||
margin-right: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
div.comment {
|
||||
// for the comment for household-members
|
||||
}
|
||||
div.periods {
|
||||
div.header,
|
||||
div.list-content {
|
||||
width: calc(100% - 40px);
|
||||
margin-left: 40px;
|
||||
}
|
||||
div.header {
|
||||
position: relative;
|
||||
a.sc-button {
|
||||
position: absolute;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
top: 10px;
|
||||
left: -40px;
|
||||
padding: 0;
|
||||
i {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
abbr.referrer {
|
||||
font-size: 70%;
|
||||
}
|
||||
span.user {
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
div.list-content {
|
||||
span.more {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,24 +2,18 @@
|
||||
<banner></banner>
|
||||
<sticky-nav></sticky-nav>
|
||||
|
||||
<div class="row justify-content-end">
|
||||
<div class="col-md-11">
|
||||
<h1 v-if="accompanyingCourse.step === 'DRAFT'">{{ $t('course.title.draft') }}</h1>
|
||||
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
||||
|
||||
<h1 v-if="accompanyingCourse.step === 'DRAFT'">{{ $t('course.title.draft') }}</h1>
|
||||
<h1 v-else>{{ $t('course.title.active') }}</h1>
|
||||
<persons-associated></persons-associated>
|
||||
<origin-demand></origin-demand>
|
||||
<requestor></requestor>
|
||||
<social-issue></social-issue>
|
||||
<referrer></referrer>
|
||||
<resources></resources>
|
||||
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
||||
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
||||
|
||||
<persons-associated></persons-associated>
|
||||
<origin-demand></origin-demand>
|
||||
<requestor></requestor>
|
||||
<social-issue></social-issue>
|
||||
<course-location></course-location>
|
||||
<referrer></referrer>
|
||||
<resources></resources>
|
||||
<comment v-if="accompanyingCourse.step === 'DRAFT'"></comment>
|
||||
<confirm v-if="accompanyingCourse.step === 'DRAFT'"></confirm>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -59,9 +53,6 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
div#accompanying-course {
|
||||
h1 {
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
div.vue-component {
|
||||
h2 {
|
||||
margin: 1em 0.7em;
|
||||
|
@@ -1,33 +1,32 @@
|
||||
<template>
|
||||
|
||||
|
||||
<teleport to="#header-accompanying_course-name #banner-flags">
|
||||
<toggle-flags></toggle-flags>
|
||||
</teleport>
|
||||
|
||||
|
||||
<teleport to="#header-accompanying_course-name #banner-status">
|
||||
<div v-if="accompanyingCourse.step === 'DRAFT'">
|
||||
<span v-if="accompanyingCourse.step === 'DRAFT'" class="d-md-block">
|
||||
<span class="badge bg-secondary">
|
||||
{{ $t('course.step.draft') }}
|
||||
</span>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div>
|
||||
</span>
|
||||
<span v-else class="text-md-end">
|
||||
<span class="d-md-block mb-md-3">
|
||||
<span class="badge bg-primary">
|
||||
{{ $t('course.step.active') }}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span>
|
||||
</span>
|
||||
<span class="d-md-block">
|
||||
<span class="d-md-block ms-3 ms-md-0">
|
||||
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
|
||||
</span>
|
||||
<br>
|
||||
<span v-if="accompanyingCourse.user">
|
||||
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
|
||||
{{ $t('course.by') }}<b>{{ accompanyingCourse.user.username }}</b>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</span>
|
||||
</teleport>
|
||||
|
||||
|
||||
<teleport to="#header-accompanying_course-details #banner-social-issues">
|
||||
<div class="col-12">
|
||||
<social-issue
|
||||
@@ -61,11 +60,6 @@ export default {
|
||||
<style lang="scss">
|
||||
div#banner-flags,
|
||||
div#banner-status {
|
||||
margin: 1.5em 0;
|
||||
div {
|
||||
text-align: right;
|
||||
margin-bottom: 0.8em;
|
||||
}
|
||||
.badge {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
@@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<a @click="toggleIntensity" class="flag-toggle">
|
||||
<span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</span>
|
||||
<i class="fa" :class="{ 'fa-toggle-on': isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular }"></i>
|
||||
<span :class="{ 'on': isRegular }">{{ $t('course.regular') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="badge rounded-pill" :class="{ 'bg-primary': isEmergency, 'bg-secondary': !isEmergency }" @click="toggleEmergency">
|
||||
{{ $t('course.emergency') }}
|
||||
</button>
|
||||
<button class="badge rounded-pill" :class="{ 'bg-primary': isConfidential, 'bg-secondary': !isConfidential }" @click="toggleConfidential">
|
||||
{{ $t('course.confidential') }}
|
||||
</button>
|
||||
<div class="text-md-end">
|
||||
<span class="d-block d-sm-inline-block mb-md-2">
|
||||
<a @click="toggleIntensity" class="flag-toggle">
|
||||
<span :class="{ 'on': !isRegular }">{{ $t('course.occasional') }}</span>
|
||||
<i class="fa" :class="{ 'fa-toggle-on': isRegular, 'fa-toggle-on fa-flip-horizontal': !isRegular }"></i>
|
||||
<span :class="{ 'on': isRegular }">{{ $t('course.regular') }}</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<span class="d-block d-sm-inline-block ms-sm-3 ms-md-0">
|
||||
<button class="badge rounded-pill me-1" :class="{ 'bg-primary': isEmergency, 'bg-secondary': !isEmergency }" @click="toggleEmergency">
|
||||
{{ $t('course.emergency') }}
|
||||
</button>
|
||||
<button class="badge rounded-pill" :class="{ 'bg-primary': isConfidential, 'bg-secondary': !isConfidential }" @click="toggleConfidential">
|
||||
{{ $t('course.confidential') }}
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -66,7 +68,6 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
a.flag-toggle {
|
||||
color: white;
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: white;
|
||||
@@ -81,7 +82,6 @@ export default {
|
||||
}
|
||||
}
|
||||
button.badge {
|
||||
margin-left: 0.8em;
|
||||
&.bg-secondary {
|
||||
opacity: 0.5;
|
||||
&:hover {
|
||||
|
@@ -7,13 +7,13 @@
|
||||
|
||||
<div id="picking">
|
||||
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
|
||||
|
||||
|
||||
<div v-for="si in socialIssues">
|
||||
<input type="radio" v-bind:value="si.id" name="socialIssue" v-model="socialIssuePicked"> {{ si.title.fr }}
|
||||
</div>
|
||||
|
||||
<div v-if="hasSocialIssuePicked">
|
||||
<h2>{{ $t('pick_an_action') }}</h2>
|
||||
<h2>{{ $t('pick_an_action') }}</h2>
|
||||
<vue-multiselect
|
||||
v-model="socialActionPicked"
|
||||
label="text"
|
||||
@@ -22,7 +22,7 @@
|
||||
:close-on-select="true"
|
||||
:show-labels="true"
|
||||
track-by="id"
|
||||
></vue-multiselect>
|
||||
></vue-multiselect>
|
||||
</div>
|
||||
|
||||
<div v-if="isLoadingSocialActions">
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
#awc_create_form {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
grid-template-areas:
|
||||
"picking picking"
|
||||
"start_date end_date"
|
||||
"confirm confirm"
|
||||
@@ -123,7 +123,7 @@
|
||||
<script>
|
||||
import { mapState, mapActions, mapGetters } from 'vuex';
|
||||
import VueMultiselect from 'vue-multiselect';
|
||||
import { dateToISO, ISOToDate } from 'ChillMainAssets/js/date.js';
|
||||
import { dateToISO, ISOToDate } from 'ChillMainAssets/chill/js/date.js';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
|
||||
const i18n = {
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
return s;
|
||||
},
|
||||
set(v) {
|
||||
console.log('persons picked', v);
|
||||
console.log('persons picked', v);
|
||||
this.$store.commit('setPersonsPickedIds', v);
|
||||
}
|
||||
},
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
import { createStore } from 'vuex';
|
||||
import { datetimeToISO } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js';
|
||||
import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||
|
||||
@@ -143,7 +143,7 @@ const store = createStore({
|
||||
},
|
||||
submit({ commit, getters, state }) {
|
||||
console.log('submit');
|
||||
let
|
||||
let
|
||||
payload = getters.buildPayloadCreate,
|
||||
errors = [];
|
||||
|
||||
@@ -169,7 +169,7 @@ const store = createStore({
|
||||
});
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
});
|
||||
|
||||
export { store };
|
||||
|
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div id="comment">
|
||||
<label>Commentaire</label>
|
||||
<ckeditor
|
||||
<ckeditor
|
||||
:editor="editor"
|
||||
v-model="note"
|
||||
tag-name="textarea"
|
||||
@@ -32,9 +32,9 @@
|
||||
{{ $t('results_without_objective') }}
|
||||
</div>
|
||||
<div>
|
||||
<add-result :availableResults="resultsForAction" destination="action"></add-result>
|
||||
<add-result :availableResults="resultsForAction" destination="action"></add-result>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- results which **are** attached to an objective -->
|
||||
<div v-for="g in goalsPicked">
|
||||
@@ -42,10 +42,10 @@
|
||||
<div @click="removeGoal(g)" class="objective-title">
|
||||
<i class="fa fa-times"></i>
|
||||
{{ g.goal.title.fr }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<add-result destination="goal" :goal="g.goal"></add-result>
|
||||
<add-result destination="goal" :goal="g.goal"></add-result>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<ul class="list-objectives">
|
||||
<li v-for="g in availableForCheckGoal" @click="addGoal(g)" class="badge bg-primary">
|
||||
<i class="fa fa-plus"></i>
|
||||
{{ g.title.fr }}
|
||||
{{ g.title.fr }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -163,7 +163,7 @@
|
||||
<p>Veuillez corriger les erreurs suivantes:</p>
|
||||
<ul>
|
||||
<li v-for="e in errors">{{ e }}</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
|
||||
#workEditor {
|
||||
display: grid;
|
||||
grid-template-areas:
|
||||
grid-template-areas:
|
||||
"title title"
|
||||
"startDate endDate"
|
||||
"comment comment"
|
||||
@@ -205,7 +205,7 @@
|
||||
|
||||
grid-template-columns: 50%;
|
||||
column-gap: 1rem;
|
||||
|
||||
|
||||
#title {
|
||||
grid-area: title;
|
||||
|
||||
@@ -330,9 +330,9 @@
|
||||
<script>
|
||||
|
||||
import { mapState, mapGetters, } from 'vuex';
|
||||
import { dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { dateToISO, ISOToDate, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
import CKEditor from '@ckeditor/ckeditor5-vue';
|
||||
import ClassicEditor from 'ChillMainAssets/modules/ckeditor5/index.js';
|
||||
import ClassicEditor from 'ChillMainAssets/module/ckeditor5/index.js';
|
||||
import AddResult from './components/AddResult.vue';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
@@ -440,7 +440,7 @@ export default {
|
||||
return s;
|
||||
},
|
||||
set(v) {
|
||||
console.log('persons picked', v);
|
||||
console.log('persons picked', v);
|
||||
this.$store.commit('setPersonsPickedIds', v);
|
||||
}
|
||||
},
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { createStore } from 'vuex';
|
||||
import { datetimeToISO, ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO, ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
import { findSocialActionsBySocialIssue } from 'ChillPersonAssets/vuejs/_api/SocialWorkSocialAction.js';
|
||||
import { create } from 'ChillPersonAssets/vuejs/_api/AccompanyingCourseWork.js';
|
||||
|
||||
@@ -42,7 +42,7 @@ const store = createStore({
|
||||
},
|
||||
resultsPickedForGoal: (state) => (goal) => {
|
||||
let found = state.goalsPicked.find(g => g.goal.id === goal.id);
|
||||
|
||||
|
||||
return found === undefined ? [] : found.results;
|
||||
},
|
||||
hasHandlingThirdParty(state) {
|
||||
|
@@ -22,8 +22,8 @@
|
||||
class="item-bloc"
|
||||
v-bind:key="conc.person.id"
|
||||
>
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
<person :person="conc.person"></person>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
@@ -48,10 +48,10 @@
|
||||
<p class="move_hint">{{ $t('household_members_editor.concerned.move_to') }}:</p>
|
||||
|
||||
<template
|
||||
v-for="position in positions"
|
||||
v-for="position in positions"
|
||||
>
|
||||
|
||||
<button
|
||||
<button
|
||||
class="btn btn-outline-primary"
|
||||
@click="moveToPosition(conc.person.id, position.id)"
|
||||
>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
|
||||
<div v-if="needsPositionning" class="positions">
|
||||
<div
|
||||
<div
|
||||
v-for="position in positions"
|
||||
>
|
||||
<h3>{{ position.label.fr }}</h3>
|
||||
@@ -128,7 +128,7 @@ import { mapGetters } from 'vuex';
|
||||
import AddPersons from 'ChillPersonAssets/vuejs/_components/AddPersons.vue';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import MemberDetails from './MemberDetails.vue';
|
||||
import { ISOToDatetime } from 'ChillMainAssets/js/date.js';
|
||||
import { ISOToDatetime } from 'ChillMainAssets/chill/js/date.js';
|
||||
|
||||
export default {
|
||||
name: 'Concerned',
|
||||
|
@@ -16,7 +16,7 @@
|
||||
<ul v-if="allowChangeHousehold" class="record_actions">
|
||||
<li v-if="!showHouseholdSuggestion">
|
||||
<button
|
||||
class="btn"
|
||||
class="btn btn-misc"
|
||||
@click="toggleHouseholdSuggestion"
|
||||
>
|
||||
{{ $tc('household_members_editor.show_household_suggestion',
|
||||
@@ -25,7 +25,7 @@
|
||||
</li>
|
||||
<li v-if="showHouseholdSuggestion">
|
||||
<button
|
||||
class="btn"
|
||||
class="btn btn-misc"
|
||||
@click="toggleHouseholdSuggestion"
|
||||
>
|
||||
{{ $t('household_members_editor.hide_household_suggestion') }}
|
||||
@@ -37,7 +37,7 @@
|
||||
</button>
|
||||
</li>
|
||||
<li v-if="allowHouseholdSearch">
|
||||
<button class="btn">
|
||||
<button class="btn btn-misc">
|
||||
<i class="fa fa-search"></i>{{ $t('household_members_editor.household.search_household') }}
|
||||
</button>
|
||||
</li>
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn" @click="selectHousehold(h)">
|
||||
<button class="btn btn-misc" @click="selectHousehold(h)">
|
||||
{{ $t('household_members_editor.select_household') }}
|
||||
</button>
|
||||
</li>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
<person :person="conc.person"></person>
|
||||
<span v-if="isHolder" class="badge bg-primary holder">
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div v-if="conc.person.birthdate !== null">{{ $t('person.born', {'gender': conc.person.gender} ) }}</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
@@ -75,7 +75,7 @@ div.participation-details {
|
||||
import { mapGetters } from 'vuex';
|
||||
import Person from 'ChillPersonAssets/vuejs/_components/Person/Person.vue';
|
||||
import CKEditor from '@ckeditor/ckeditor5-vue';
|
||||
import ClassicEditor from 'ChillMainAssets/modules/ckeditor5/index.js';
|
||||
import ClassicEditor from 'ChillMainAssets/module/ckeditor5/index.js';
|
||||
|
||||
export default {
|
||||
name: 'MemberDetails',
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toggleHolder() {
|
||||
this.$store.dispatch('toggleHolder', this.conc);
|
||||
this.$store.dispatch('toggleHolder', this.conc);
|
||||
},
|
||||
removePosition() {
|
||||
this.$store.dispatch('removePosition', this.conc);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { createStore } from 'vuex';
|
||||
import { householdMove, fetchHouseholdSuggestionByAccompanyingPeriod } from './../api.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/js/date.js';
|
||||
import { datetimeToISO } from 'ChillMainAssets/chill/js/date.js';
|
||||
|
||||
const debug = process.env.NODE_ENV !== 'production';
|
||||
|
||||
@@ -72,7 +72,7 @@ const store = createStore({
|
||||
return getters.needsPositionning === false
|
||||
|| (getters.persons.length > 0 && getters.concUnpositionned.length === 0);
|
||||
},
|
||||
persons(state) {
|
||||
persons(state) {
|
||||
return state.concerned.map(conc => conc.person);
|
||||
},
|
||||
concUnpositionned(state) {
|
||||
@@ -85,7 +85,7 @@ const store = createStore({
|
||||
},
|
||||
personByPosition: (state) => (position_id) => {
|
||||
return state.concerned
|
||||
.filter(conc =>
|
||||
.filter(conc =>
|
||||
conc.position !== null ? conc.position.id === position_id : false
|
||||
)
|
||||
.map(conc => conc.person)
|
||||
@@ -93,7 +93,7 @@ const store = createStore({
|
||||
},
|
||||
concByPosition: (state) => (position_id) => {
|
||||
return state.concerned
|
||||
.filter(conc =>
|
||||
.filter(conc =>
|
||||
conc.position !== null ? conc.position.id === position_id : false
|
||||
)
|
||||
;
|
||||
@@ -117,7 +117,7 @@ const store = createStore({
|
||||
;
|
||||
|
||||
if (state.forceLeaveWithoutHousehold === false) {
|
||||
payload.destination = {
|
||||
payload.destination = {
|
||||
id: state.household.id,
|
||||
type: state.household.type
|
||||
};
|
||||
@@ -154,9 +154,9 @@ const store = createStore({
|
||||
addConcerned(state, person) {
|
||||
let persons = state.concerned.map(conc => conc.person.id);
|
||||
if (!persons.includes(person.id)) {
|
||||
state.concerned.push({
|
||||
state.concerned.push({
|
||||
person,
|
||||
position: null,
|
||||
position: null,
|
||||
allowRemove: true,
|
||||
holder: false,
|
||||
comment: "",
|
||||
@@ -182,7 +182,7 @@ const store = createStore({
|
||||
conc.position = null;
|
||||
},
|
||||
removeConcerned(state, conc) {
|
||||
state.concerned = state.concerned.filter(c =>
|
||||
state.concerned = state.concerned.filter(c =>
|
||||
c.person.id !== conc.person.id
|
||||
)
|
||||
},
|
||||
@@ -309,7 +309,7 @@ const store = createStore({
|
||||
error = household;
|
||||
for (let i in error.violations) {
|
||||
let e = error.violations[i];
|
||||
errors.push(e.title);
|
||||
errors.push(e.title);
|
||||
}
|
||||
|
||||
commit('setErrors', errors);
|
||||
|
@@ -0,0 +1,40 @@
|
||||
<div class="border border-danger">
|
||||
<div class="alert alert-danger alert-with-actions mb-0">
|
||||
<div class="message">
|
||||
{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }}
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-chill-pink" data-bs-toggle="collapse" href="#withoutHouseholdList">
|
||||
<i class="fa fa-fw fa-caret-down"></i><span class="text-light">{{ 'Add to household now'|trans }}</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="withoutHouseholdList" class="collapse p-3">
|
||||
<form method="GET"
|
||||
action="{{ chill_path_add_return_path('chill_person_household_members_editor') }}">
|
||||
|
||||
<h3>{{ 'household.Select people to move'|trans }}</h3>
|
||||
<ul>
|
||||
{% for p in withoutHousehold %}
|
||||
<li>
|
||||
<input type="checkbox" name="persons[]" value="{{ p.id }}" checked />
|
||||
{{ p|chill_entity_render_box }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="expand_suggestions" value="true" />
|
||||
<input type="hidden" name="accompanying_period_id" value="{{ accompanyingCourse.id }}" />
|
||||
<ul class="record_actions mb-0">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-edit">
|
||||
{{ 'household.Household editor'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
@@ -3,7 +3,7 @@
|
||||
<div class="container-xxl">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-5">
|
||||
<div class="col-md-6 ps-md-5 ps-xxl-0">
|
||||
<h1>
|
||||
<i class="fa fa-random fa-fw"></i>
|
||||
{{ 'Accompanying Course'|trans }}
|
||||
@@ -12,21 +12,21 @@
|
||||
</div>
|
||||
|
||||
{# vue teleport fragment here #}
|
||||
<div class="col-sm-3" id="banner-flags"></div>
|
||||
<div class="col-md-3 mt-3 mb-1 my-md-3" id="banner-flags"></div>
|
||||
|
||||
{# vue teleport fragment here #}
|
||||
<div class="col-sm-3" id="banner-status"></div>
|
||||
<div class="col-md-3 mt-1 mb-3 my-md-3 pe-md-5 pe-xxl-0" id="banner-status"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div id="header-accompanying_course-details" class="header-details">
|
||||
<div class="container-xxl">
|
||||
<div class="row justify-content-md-right">
|
||||
|
||||
{# vue teleport fragment here #}
|
||||
<div class="col-sm-10" id="banner-social-issues"></div>
|
||||
<div class="col-md-10 ps-md-5 ps-xxl-0" id="banner-social-issues"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,15 +1,25 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% import '@ChillMain/Address/macro.html.twig' as address %}
|
||||
|
||||
{% block title %}
|
||||
{{ 'Resume Accompanying Course'|trans }}
|
||||
{% endblock %}
|
||||
|
||||
{% macro button_person(person) %}
|
||||
{% if person.isSharingHousehold %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': person.getCurrentHousehold.id }) }}"
|
||||
class="btn btn-sm btn-chill-pink" title="{{ 'Show household'|trans ~ ' n° ' ~ person.getCurrentHousehold.id }}">
|
||||
<i class="fa fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanyingcourse-resume">
|
||||
|
||||
{% if 'DRAFT' == accompanyingCourse.step %}
|
||||
<div class="col-8 centered error flash_message">
|
||||
<div class="col-8 alert alert-danger flash_message mb-5">
|
||||
<span>
|
||||
{{ 'This accompanying course is still a draft'|trans }}
|
||||
<a href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id } ) }}">
|
||||
@@ -19,358 +29,116 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if withoutHousehold|length > 0 %}
|
||||
<div class="alert alert-danger alert-with-actions">
|
||||
<div class="message">
|
||||
{{ 'Some peoples does not belong to any household currently. Add them to an household soon'|trans }}
|
||||
</div>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="btn btn-primary" data-toggle="collapse" href="#withoutHouseholdList">
|
||||
{{ 'Add to household now'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<h1>{{ 'Resume Accompanying Course'|trans }}</h1>
|
||||
|
||||
<div id="withoutHouseholdList" class="collapse">
|
||||
<form method="GET" action="{{ chill_path_add_return_path('chill_person_household_members_editor') }}">
|
||||
|
||||
<h3>{{ 'household.Select people to move'|trans }}</h3>
|
||||
<ul>
|
||||
{% for p in withoutHousehold %}
|
||||
<li>
|
||||
<input type="checkbox" name="persons[]" value="{{ p.id }}" checked />
|
||||
{{ p|chill_entity_render_box }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<input type="hidden" name="expand_suggestions" value="true" />
|
||||
<input type="hidden" name="accompanying_period_id", value="{{ accompanyingCourse.id }}" />
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-edit">
|
||||
{{ 'household.Household editor'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
<div class="associated-persons mb-5">
|
||||
<h2 class="mb-3">{{ 'Associated peoples'|trans }}</h2>
|
||||
<div class="flex-table mb-3">
|
||||
{% for participation in accompanyingCourse.participations %}
|
||||
{% if participation.enddate is null %}
|
||||
<div class="item-bloc">
|
||||
{{ participation.person|chill_entity_render_box({
|
||||
'render': 'bloc', 'addLink': false, 'addInfo': true, 'addAltNames': false,
|
||||
'customButtons': { 'before': _self.button_person(participation.person) }
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% if withoutHousehold|length > 0 %}
|
||||
{% include '@ChillPerson/AccompanyingCourse/_join_household.html.twig' with {} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if accompanyingCourse.step != 'DRAFT' and
|
||||
(accompanyingCourse.locationStatus == 'address' or accompanyingCourse.locationStatus == 'none')
|
||||
%}
|
||||
<div class="alert alert-danger">
|
||||
<div class="message">
|
||||
{{ 'This course is located at a temporarily address. You should locate this course to an user'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Associated peoples'|trans }}</h2>
|
||||
<div class="flex-table">
|
||||
{% for p in accompanyingCourse.participations %}
|
||||
{% if p.enddate is null %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>{{ p.person.firstname ~ ' ' ~ p.person.lastname }}</h3>
|
||||
<p>
|
||||
{% set born = (p.person.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (p.person.gender == 'woman') ? 'fa-venus' :
|
||||
(p.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (p.person.gender == 'woman') ? 'femme' :
|
||||
(p.person.gender == 'man') ? 'homme' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ p.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if p.person.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ p.person.mobilenumber }}">
|
||||
{{ p.person.mobilenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if p.person.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ p.person.phonenumber }}">{{ p.person.phonenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if p.person.lastAddress is not empty -%}
|
||||
{{ p.person.currentHouseholdAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_view', { person_id: p.person.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
{% if p.person.isSharingHousehold %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': p.person.getCurrentHousehold.id }) }}"
|
||||
class="btn btn-misc">
|
||||
<i class="fa fa-home"></i>
|
||||
n°
|
||||
{{ p.person.getCurrentHousehold.id }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="requestor mb-5">
|
||||
<h2 class="mb-3">{{ 'Requestor'|trans }}</h2>
|
||||
{% if accompanyingCourse.requestorPerson is not empty %}
|
||||
{% set requestor = accompanyingCourse.requestorPerson %}
|
||||
{% set info = true %}
|
||||
{% elseif accompanyingCourse.requestor is not empty %}
|
||||
{% set requestor = accompanyingCourse.requestorThirdParty %}
|
||||
{% set info = false %}
|
||||
{% endif %}
|
||||
{% if accompanyingCourse.requestor == null %}
|
||||
<p class="chill-no-data-statement">{{ 'Any requestor to this accompanying course'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-bloc row row-cols-1 g-0">
|
||||
<div class="item-bloc col">
|
||||
{{ requestor|chill_entity_render_box({
|
||||
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': info, 'addAltNames': false
|
||||
}) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<h2>{{ 'Requestor'|trans }}</h2>
|
||||
<div class="resources mb-5">
|
||||
<h2 class="mb-3">{{ 'Resources'|trans }}</h2>
|
||||
{% if accompanyingCourse.resources|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-bloc row row-cols-1 row-cols-sm-2 row-cols-xl-3 row-cols-xxl-4 g-0">
|
||||
{% for r in accompanyingCourse.resources %}
|
||||
<div class="item-bloc col">
|
||||
{% if r.person %}
|
||||
{{ r.person|chill_entity_render_box({
|
||||
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': true, 'addAltNames': false
|
||||
}) }}
|
||||
{% endif %}
|
||||
{% if r.thirdParty %}
|
||||
{{ r.thirdParty|chill_entity_render_box({
|
||||
'render': 'bloc', 'addLink': false, 'addEntity': true, 'addInfo': false
|
||||
}) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if accompanyingCourse.requestor == null %}
|
||||
<p>{{ 'Any requestor to this accompanying course'|trans }}</p>
|
||||
{% elseif accompanyingCourse.requestorPerson is not empty %}
|
||||
{% set r = accompanyingCourse.requestorPerson %}
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.firstname ~ ' ' ~ r.lastname }}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Usager' }}</span>
|
||||
</h3>
|
||||
<p>
|
||||
{% set born = (r.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (r.gender == 'woman') ? 'fa-venus' :
|
||||
(r.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (r.gender == 'woman') ? 'femme' :
|
||||
(r.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if r.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.mobilenumber }}">
|
||||
{{ r.mobilenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if r.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ r.phonenumber }}">{{ r.phonenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.lastAddress is not empty -%}
|
||||
{{ r.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_view', { person_id: r.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% elseif accompanyingCourse.requestorThirdParty is not empty %}
|
||||
{% set r = accompanyingCourse.requestorThirdParty %}
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.name }}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Tiers' }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ r.email }}">
|
||||
{{ r.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-phone"></i>
|
||||
{% if r.telephone %}
|
||||
<a href="{{ 'tel:' ~ r.telephone }}">{{ r.telephone|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.address is not empty -%}
|
||||
{{ r.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Resources'|trans }}</h2>
|
||||
|
||||
{% if accompanyingCourse.resources|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'Any resource for this accompanying course'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-bloc">
|
||||
{% for r in accompanyingCourse.resources %}
|
||||
<div class="item-bloc">
|
||||
{% if r.person %}
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.person.firstname ~ ' ' ~ r.person.lastname }}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Usager' }}</span>
|
||||
</h3>
|
||||
<p>
|
||||
{% set born = (r.person.gender == 'woman') ? 'née': 'né' %}
|
||||
{% set gender = (r.person.gender == 'woman') ? 'fa-venus' :
|
||||
(r.person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (r.person.gender == 'woman') ? 'femme' :
|
||||
(r.person.gender == 'homme') ? 'fa-mars' : 'neutre' %}
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle }}"></i>{{ born ~ ' le ' ~ r.person.birthdate|format_date('short') }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% if r.person.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ r.person.mobilenumber }}">{{ r.person.mobilenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if r.person.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ r.person.phonenumber }}">{{ r.person.phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.person.lastAddress is not empty -%}
|
||||
{{ r.person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_view', { person_id: r.person.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% if r.thirdParty %}
|
||||
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h3>
|
||||
{{ r.thirdParty.name }}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Tiers' }}</span>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ r.thirdParty.email }}">
|
||||
{{ r.thirdParty.email|chill_print_or_message("thirdparty.No_email") }}
|
||||
</a>
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-phone"></i>
|
||||
{% if r.thirdParty.telephone %}
|
||||
<a href="{{ 'tel:' ~ r.thirdParty.telephone }}">{{ r.thirdParty.telephone }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
<li><i class="fa fa-li fa-map-marker"></i>
|
||||
{%- if r.thirdParty.address is not empty -%}
|
||||
{{ r.thirdParty.getAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_3party_3party_show', { thirdparty_id: r.thirdParty.id }) }}" class="btn btn-show" target="_blank" title="Voir"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Social actions'|trans }}</h2>
|
||||
|
||||
<div id="accompanying_course_work_list" class="short">
|
||||
{% for w in works %}
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
|
||||
<h2 class="action_title">
|
||||
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
class="btn btn-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="social-actions mb-5">
|
||||
<h2 class="mb-3">{{ 'Social actions'|trans }}</h2>
|
||||
{% for w in works %}
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
<p class="title_label">{{ 'accompanying_course_work.action'|trans }}</p >
|
||||
<h2 class="action_title">
|
||||
{{ w.socialAction|chill_entity_render_box({ 'no-badge': false }) }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% block contentActivity %}
|
||||
<div class="activities mb-5">
|
||||
{% set person = null %}
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with {'context': 'accompanyingCourse', 'context': 'accompanyingCourse'} %}
|
||||
|
||||
{% set person_id = null %}
|
||||
{% if person %}
|
||||
{% set person_id = person.id %}
|
||||
{% endif %}
|
||||
|
||||
{% set accompanying_course_id = null %}
|
||||
{% if accompanyingCourse %}
|
||||
{% set accompanying_course_id = accompanyingCourse.id %}
|
||||
{% endif %}
|
||||
|
||||
<h2>{{ 'Activity list' |trans }}</h2>
|
||||
|
||||
{% include 'ChillActivityBundle:Activity:list.html.twig' with { 'context': 'accompanyingCourse' } %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{# ==> insert accompanyingCourse vue component #}
|
||||
<div id="accompanying-course"></div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('vue_accourse_work_list') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -5,8 +5,10 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
<div class="mt-5">
|
||||
{% block content %}{% endblock %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -4,10 +4,13 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div class="accompanying_course_work-create">
|
||||
|
||||
<div id="accompanying_course_work_create"></div>
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_create"></div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
@@ -4,10 +4,13 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div class="accompanying_course_work-edit">
|
||||
|
||||
<div id="accompanying_course_work_edit"></div>
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_edit"></div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
@@ -4,9 +4,11 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying_course_work-list">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_list">
|
||||
|
||||
{% for w in works %}
|
||||
<div class="item">
|
||||
<div class="title">
|
||||
@@ -94,7 +96,7 @@
|
||||
<div class="actions">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
<a
|
||||
class="btn btn-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}">{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
@@ -104,7 +106,7 @@
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
@@ -115,10 +117,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('vue_accourse_work_list') }}
|
||||
{% endblock %}
|
||||
|
@@ -1,94 +1,92 @@
|
||||
{% block content %}
|
||||
|
||||
{% for accompanying_period in accompanying_periods %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
{{'period'|trans}} <b>#{{ accompanying_period.id }}</b>
|
||||
{% if accompanying_period.emergency %}
|
||||
|
||||
<span class="badge bg-primary">
|
||||
{{- 'Emergency'|trans|upper -}}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.confidential %}
|
||||
|
||||
<span class="badge bg-primary">
|
||||
{{- 'Confidential'|trans|upper -}}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.step == 'DRAFT' %}
|
||||
|
||||
<span class="badge bg-primary">
|
||||
{{- 'Draft'|trans|upper -}}
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge bg-primary">
|
||||
{{- 'Confirmed'|trans|upper -}}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for accompanying_period in accompanying_periods %}
|
||||
<div class="item-bloc">
|
||||
|
||||
<div class="item-col">
|
||||
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
||||
{% if accompanying_period.user %}
|
||||
{{ accompanying_period.user.username }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="item-row">
|
||||
{% if accompanying_period.closingDate == null %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
|
||||
{% else %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
||||
'%opening_date%': accompanying_period.openingDate|format_date('long'),
|
||||
'%closing_date%': accompanying_period.closingDate|format_date('long')}
|
||||
) }}
|
||||
|
||||
{% if accompanying_period.isOpen == false %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>{{ 'Closing motive'|trans }} :</dt>
|
||||
<dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="item-col">
|
||||
<h3>{{ 'Participants'|trans }}</h3>
|
||||
{% if accompanying_period.participations.count > 0 %}
|
||||
{% for p in accompanying_period.participations %}
|
||||
<p>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
|
||||
{{ p.person.firstname ~ ' ' ~ p.person.lastname }}
|
||||
</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<h3>{{ 'Requestor'|trans }}</h3>
|
||||
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
|
||||
{% if accompanying_period.requestorPerson is not null %}
|
||||
<p>{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}</p>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<span class="h3">
|
||||
<i class="fa fa-fw fa-random"></i>
|
||||
<b>{{ accompanying_period.id }}</b>
|
||||
</span>
|
||||
{% if accompanying_period.step == 'DRAFT' %}
|
||||
<span class="badge bg-secondary">{{- 'Draft'|trans|upper -}}</span>
|
||||
{% else %}
|
||||
<span class="badge bg-success">{{- 'Confirmed'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.requestorThirdParty is not null %}
|
||||
<p>{{ accompanying_period.requestorThirdParty.name }}</p>
|
||||
{% if accompanying_period.emergency %}
|
||||
<span class="badge bg-danger">{{- 'Emergency'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% if accompanying_period.confidential %}
|
||||
<span class="badge bg-warning">{{- 'Confidential'|trans|upper -}}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-col"></div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.closingDate == null %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%'|trans({ '%opening_date%': accompanying_period.openingDate|format_date('long') } ) }}
|
||||
{% else %}
|
||||
{{ 'accompanying_period.dates_from_%opening_date%_to_%closing_date%'|trans({
|
||||
'%opening_date%': accompanying_period.openingDate|format_date('long'),
|
||||
'%closing_date%': accompanying_period.closingDate|format_date('long')}
|
||||
) }}
|
||||
{% if accompanying_period.isOpen == false %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>{{ 'Closing motive'|trans }} :</dt>
|
||||
<dd>{{ accompanying_period.closingMotive|chill_entity_render_box }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
{% if chill_accompanying_periods.fields.user == 'visible' %}
|
||||
{% if accompanying_period.user %}
|
||||
{{ accompanying_period.user.username }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No accompanying user'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-col">
|
||||
<div class="item-row separator">
|
||||
<div class="item-col"><h3>{{ 'Participants'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.participations.count > 0 %}
|
||||
{% for p in accompanying_period.participations %}
|
||||
<p>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { person_id: p.person.id }) }}">
|
||||
{{ p.person.firstname ~ ' ' ~ p.person.lastname }}
|
||||
</a>
|
||||
</p>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col"><h3>{{ 'Requestor'|trans }}</h3></div>
|
||||
<div class="item-col">
|
||||
{% if accompanying_period.requestorPerson is not null or accompanying_period.requestorThirdParty is not null %}
|
||||
{% if accompanying_period.requestorPerson is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorPerson.firstname ~ ' ' ~ accompanying_period.requestorPerson.lastname }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if accompanying_period.requestorThirdParty is not null %}
|
||||
<p>
|
||||
{{ accompanying_period.requestorThirdParty.name }}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<h3>{{ 'Social issues'|trans }}</h3>
|
||||
{% if accompanying_period.socialIssues.count > 0 %}
|
||||
{% for si in accompanying_period.socialIssues %}
|
||||
@@ -99,38 +97,46 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}" class="btn btn-show"></a>
|
||||
</li>
|
||||
{#
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="btn btn-update no-content"></a>
|
||||
</li>
|
||||
{% if accompanying_period.isOpen == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}" class="btn btn-update has-hidden change-icon">
|
||||
<i class="fa fa-lock" aria-hidden="true"></i><span class="show-on-hover">{{'Close accompanying period'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if accompanying_period.canBeReOpened(person) == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}" class="btn btn-create change-icon has-hidden">
|
||||
<i class="fa fa-unlock" aria-hidden="true"></i><span class="show-on-hover">{{'Re-open accompanying period'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
#}
|
||||
</ul>
|
||||
<div class="item-row separator">
|
||||
<ul class="record_actions">
|
||||
|
||||
{# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': accompanying_period.id }) }}"
|
||||
class="btn btn-sm btn-show" title="{{ 'See accompanying period'|trans }}">{# {{ 'See this period'|trans }} #}</a>
|
||||
</li>
|
||||
|
||||
{% if person is defined %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_update', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-sm btn-update" title="{{ 'Edit accompanying period'|trans }}"></a>
|
||||
</li>
|
||||
{% if accompanying_period.isOpen == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_close', {'person_id' : person.id}) }}"
|
||||
class="btn btn-sm btn-update change-icon">
|
||||
<i class="fa fa-fw fa-lock" aria-hidden="true"></i>
|
||||
{{'Close accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if accompanying_period.canBeReOpened(person) == true %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_re_open', {'person_id' : person.id, 'period_id' : accompanying_period.id } ) }}"
|
||||
class="btn btn-sm btn-create change-icon">
|
||||
<i class="fa fa-fw fa-unlock" aria-hidden="true"></i>
|
||||
{{'Re-open accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% elseif household is defined %}
|
||||
{# TODO buttons specific for household ? #}
|
||||
{% endif %}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p></p>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
{% endblock content %}
|
||||
|
@@ -5,36 +5,44 @@
|
||||
{% block title %}{{ 'Person accompanying period - %name%'|trans({ '%name%' : person.__toString}) }}{% endblock title %}
|
||||
|
||||
{% block personcontent %}
|
||||
<h1>{{ 'Accompanying period list'|trans }}</h1>
|
||||
<div class="accompanyingcourse-list">
|
||||
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
<h1>{{ 'Accompanying period list'|trans }}</h1>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}" class="btn btn-create">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{#
|
||||
<li>
|
||||
<a href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}" class="btn btn-create has-hidden">
|
||||
<span class="show-on-hover">{{ 'Add an accompanying period in the past'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% if person.isOpen == false %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}" class="btn btn-create change-icon has-hidden">
|
||||
<i class="fa fa-unlock" aria-hidden="true"></i>
|
||||
<span class="show-on-hover">{{'Begin a new accompanying period'|trans }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
#}
|
||||
</ul>
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path ('chill_person_view', {'person_id' : person.id } ) }}"
|
||||
class="btn btn-cancel">{{ 'Person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown">
|
||||
<a class="btn btn-create change-icon dropdown-toggle"
|
||||
href="#" role="button" id="newAccompanyingPeriod" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="newAccompanyingPeriod">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ path ('chill_person_accompanying_course_new', {'person_id' : [ person.id ] } ) }}">
|
||||
<i class="fa fa-fw fa-plus"></i> {{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ path ('chill_person_accompanying_period_create', {'person_id' : person.id } ) }}">
|
||||
<i class="fa fa-fw fa-reply"></i> {{ 'Add an accompanying period in the past'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if person.isOpen == false %}
|
||||
<li>
|
||||
<a class="dropdown-item" href="{{ path('chill_person_accompanying_period_open', {'person_id' : person.id} ) }}">
|
||||
<i class="fa fa-fw fa-unlock"></i> {{'Begin a new accompanying period'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -22,16 +22,12 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="address-new">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="address"></div>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -16,114 +16,125 @@
|
||||
#}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% import '@ChillMain/Address/macro.html.twig' as address_macros %}
|
||||
|
||||
{% set activeRouteKey = '' %}
|
||||
|
||||
{% block title %}{{ 'Addresses history for %name%'|trans({ '%name%': person.firstName ~ ' ' ~ person.lastName } ) }}{% endblock %}
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-addresses">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<h1>{{ 'Addresses history'|trans }}</h1>
|
||||
|
||||
<div class="address-timeline grid">
|
||||
|
||||
{% if person.addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{% else %}
|
||||
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
|
||||
{% endif %}
|
||||
|
||||
{% for address in person.addresses %}
|
||||
|
||||
{# if person address #}
|
||||
<div class="col-a content{{ ' row' ~ loop.index }}">
|
||||
<div class="address">
|
||||
{% if address.isNoAddress == true %}
|
||||
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
||||
{% else %}
|
||||
|
||||
{% if address.street is not empty %}
|
||||
<div class="street">
|
||||
<span class="streetNumber">{{ address.street }}</span>
|
||||
{% if address.streetNumber is not empty %}
|
||||
<span class="streetNumber">, {{ address.streetNumber }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if address.postCode is not empty %}
|
||||
<div class="postCode">
|
||||
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
|
||||
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{# endif #}
|
||||
|
||||
<div class="col-b"></div>
|
||||
|
||||
{# if household address #}{#
|
||||
<div class="col-c content rowXX">
|
||||
<div class="address">...</div>
|
||||
</div>
|
||||
#}{# endif #}
|
||||
|
||||
<div class="date">
|
||||
{% if address.validFrom is not empty %}
|
||||
{{ address.validFrom|format_date('long') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{# TEST HOUSEHOLD POSITION
|
||||
#}
|
||||
<div class="col-b"></div>
|
||||
<div class="col-c content fake">
|
||||
<div class="address">
|
||||
<div class="street">
|
||||
<span class="streetNumber">549, chemin De Sousa</span>
|
||||
<span class="streetNumber">, 45, boulevard Aurore Roux</span>
|
||||
</div>
|
||||
<div class="postCode">
|
||||
<span>10850</span> <span>Nanterre</span> <span class="country">(France)</span>
|
||||
</div>
|
||||
<ul class="record_actions"><li><a href="" class="btn btn-edit"></a></li></ul>
|
||||
</div>
|
||||
<div class="person-address">
|
||||
|
||||
<h1>{{ 'Addresses history'|trans }}</h1>
|
||||
|
||||
<ul class="record_actions my-3">
|
||||
<li style="margin: auto;">
|
||||
<a class="btn btn-lg btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="address-timeline grid">
|
||||
|
||||
{% if person.addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{% else %}
|
||||
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-a">
|
||||
<h3 class="mb-5">{{ 'Person addresses'|trans }}</h3>
|
||||
</div>
|
||||
<div class="col-b"></div>
|
||||
<div class="col-c">
|
||||
<h3 class="mb-5">{{ 'Household addresses'|trans }}</h3>
|
||||
</div>
|
||||
|
||||
{% set row = 0 %}
|
||||
{% set previousRowFrom = null %}
|
||||
|
||||
{% for address in person.addresses %}
|
||||
|
||||
{% set row = row + 1 %}
|
||||
{% if address.validTo is not empty and address.validTo < previousRowFrom %}
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-a action">
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c action">
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
<div class="date">
|
||||
{% if address.validTo is not empty %}
|
||||
{{ address.validTo|format_date('short') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="date">01 janvier 1970</div>
|
||||
{# END TEST #}
|
||||
|
||||
|
||||
{% set row = row + 1 %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{# if person address #}
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-a content">
|
||||
{{ address|chill_entity_render_box({
|
||||
'render': 'bloc',
|
||||
'multiline': true,
|
||||
'extended_infos': true,
|
||||
'has_no_address': true
|
||||
}) }}
|
||||
<ul class="record_actions">
|
||||
<li><a href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{# endif #}
|
||||
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
|
||||
{# if household address #}{#
|
||||
<div class="col-c content rowXX">
|
||||
<div class="address">...</div>
|
||||
</div>
|
||||
#}{# endif #}
|
||||
|
||||
<div class="date">
|
||||
{% if address.validFrom is not empty %}
|
||||
{{ address.validFrom|format_date('short') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_person_view', { 'person_id' : person.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% set previousRowFrom = address.validFrom %}
|
||||
{% endfor %}
|
||||
|
||||
{# TEST HOUSEHOLD POSITION
|
||||
#}
|
||||
<div class="col-b"></div>
|
||||
<div class="col-c content fake">
|
||||
<div class="address">
|
||||
<div class="street">
|
||||
<span class="streetNumber">549, chemin De Sousa</span>
|
||||
<span class="streetNumber">, 45, boulevard Aurore Roux</span>
|
||||
</div>
|
||||
<div class="postCode">
|
||||
<span>10850</span> <span>Nanterre</span> <span class="country">(France)</span>
|
||||
</div>
|
||||
<ul class="record_actions"><li><a href="" class="btn btn-edit"></a></li></ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="date">01/01/1970</div>
|
||||
{# END TEST #}
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_person_view', { 'person_id' : person.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to the person details'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -22,16 +22,12 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="address-new">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="address"></div>
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -1,17 +1,145 @@
|
||||
<span class="chill-entity chill-entity__person">
|
||||
{%- if addLink and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
{%- set showLink = true -%}<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">{%- endif -%}
|
||||
<span class="chill_denomination">{{ person.firstName }}</span>
|
||||
<span class="chill_denomination">{{ person.lastName }}</span>
|
||||
{%- if addAltNames -%}
|
||||
{%- for n in person.altNames -%}
|
||||
{%- if loop.first -%}({% else %} {%- endif -%}
|
||||
<span class="chill-entity__person__alt-name chill-entity__person__altname--{{ n.key }}">
|
||||
{{- n.label -}}
|
||||
</span>
|
||||
{%- if loop.last -%}) {%- endif -%}
|
||||
{%- endfor -%}
|
||||
{#
|
||||
Template to render a person
|
||||
OPTIONS
|
||||
* render string ['raw'|'label'|'bloc']
|
||||
* addAltNames bool
|
||||
* addLink bool
|
||||
* addEntity bool
|
||||
* addId bool
|
||||
* addInfo bool
|
||||
* addAge bool
|
||||
* addCenter bool
|
||||
* hLevel integer
|
||||
* address_multiline bool
|
||||
* customButtons [
|
||||
'before' Twig\Markup, (injected with macro)
|
||||
'replace' Twig\Markup,
|
||||
'after' Twig\Markup
|
||||
]
|
||||
#}
|
||||
|
||||
{% macro raw(person, options) %}
|
||||
<span class="firstname">{{ person.firstName }}</span>
|
||||
<span class="lastname">{{ person.lastName }}</span>
|
||||
{%- if options['addAltNames'] -%}
|
||||
<span class="altnames">
|
||||
{%- for n in person.altNames -%}
|
||||
<span class="altname altname-{{ n.key }}">
|
||||
{{- n.label -}}
|
||||
</span>
|
||||
{%- endfor -%}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
{%- if showLink is defined -%}</a>{%- endif -%}
|
||||
{#- tricks to remove easily whitespace after template -#}
|
||||
{%- if true -%}</span>{%- endif -%}
|
||||
{% endmacro raw %}
|
||||
|
||||
{% macro label(person, options) %}
|
||||
<div class="entity-label">
|
||||
<div class="denomination {{ 'h' ~ options['hLevel'] }}">
|
||||
{%- if options['addLink'] and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">
|
||||
{{ _self.raw(person, options) }}
|
||||
</a>
|
||||
{%- else -%}
|
||||
{{ _self.raw(person, options) }}
|
||||
{%- endif -%}
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span>
|
||||
{%- endif -%}
|
||||
{%- if options['addId'] -%}
|
||||
<span class="id-number" title="{{ 'Person'|trans ~ ' n° ' ~ person.id }}">
|
||||
{{ person.id|upper }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- if options['addInfo'] -%}
|
||||
{% set gender = (person.gender == 'woman') ? 'fa-venus' :
|
||||
(person.gender == 'man') ? 'fa-mars' : 'fa-neuter' %}
|
||||
{% set genderTitle = (person.gender == 'woman') ? 'woman' :
|
||||
(person.gender == 'man') ? 'man' : 'neuter' %}
|
||||
<p class="moreinfo">
|
||||
<i class="fa fa-fw {{ gender }}" title="{{ genderTitle|trans }}"></i>
|
||||
<time datetime="{{ person.birthdate|date('Y-m-d') }}" title="{{ 'Birthdate'|trans }}">
|
||||
{{ 'Born the date'|trans({'gender': person.gender,
|
||||
'birthdate': person.birthdate|format_date("medium") }) }}
|
||||
</time>
|
||||
{%- if options['addAge'] -%}
|
||||
<span class="age">
|
||||
{{ 'years_old'|trans({ 'age': person.age }) }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</p>
|
||||
{%- endif -%}
|
||||
{#- tricks to remove easily whitespace after template -#}
|
||||
{%- if true -%}</div>{%- endif -%}
|
||||
{% endmacro label %}
|
||||
|
||||
|
||||
{%- if render == 'raw' -%}
|
||||
<span class="entity-raw">
|
||||
{{ _self.raw(person, options) }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if render == 'label' -%}
|
||||
{{ _self.label(person, options) }}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if render == 'bloc' -%}
|
||||
<div class="item-row entity-bloc">
|
||||
<div class="item-col">
|
||||
{{ _self.label(person, options) }}
|
||||
</div>
|
||||
<div class="item-col separator">
|
||||
<ul class="list-content fa-ul">
|
||||
{% set multiline = (options['address_multiline']) ? true : false %}
|
||||
{{ person.getLastAddress|chill_entity_render_box({
|
||||
'render': 'list',
|
||||
'with_picto': true,
|
||||
'multiline': multiline,
|
||||
'with_valid_from': false
|
||||
}) }}
|
||||
<li>
|
||||
{% if person.mobilenumber %}
|
||||
<i class="fa fa-li fa-mobile"></i><a href="{{ 'tel:' ~ person.mobilenumber }}">
|
||||
{{ person.mobilenumber|chill_format_phonenumber }}
|
||||
</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if person.phonenumber %}
|
||||
<a href="{{ 'tel:' ~ person.phonenumber }}">
|
||||
{{ person.phonenumber|chill_format_phonenumber }}
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if options['addCenter'] %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person.center }}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
{% if options['customButtons']['before'] is defined %}
|
||||
{{ options['customButtons']['before'] }}
|
||||
{% endif %}
|
||||
|
||||
{%- if options['customButtons']['replace'] is not defined and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
<li>
|
||||
<a class="btn btn-sm btn-show" target="_blank" title="{{ 'Show person'|trans }}"
|
||||
href="{{ path('chill_person_view', { person_id: person.id }) }}"></a>
|
||||
</li>
|
||||
{%- else -%}
|
||||
{{ options['customButtons']['replace'] }}
|
||||
{%- endif -%}
|
||||
|
||||
{% if options['customButtons']['after'] is defined %}
|
||||
{{ options['customButtons']['after'] }}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
|
@@ -3,23 +3,26 @@
|
||||
{% block title 'Household accompanying period'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div class="household-members">
|
||||
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div class="form_control">
|
||||
<ul class="record_actions">
|
||||
{% include 'ChillPersonBundle:AccompanyingPeriod:_list.html.twig' %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path ('chill_person_household_summary', {'household_id' : household.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Household summary'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{#<li>
|
||||
{#
|
||||
<li>
|
||||
<a href="{{ path ('chill_person_household_accompanying_course_new', {'household_id' : [ household.id ] } ) }}" class="btn btn-create">
|
||||
{{ 'Create an accompanying period'|trans }}
|
||||
</a>
|
||||
</li>#}
|
||||
</li>
|
||||
#}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -3,67 +3,86 @@
|
||||
{% block title 'Addresses history for household'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div class="household-address">
|
||||
|
||||
<div class="address-timeline grid">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% if household.addresses|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
{% else %}
|
||||
|
||||
<ul class="record_actions my-3">
|
||||
<li style="margin: auto;">
|
||||
<a class="btn btn-lg btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="address-timeline grid">
|
||||
|
||||
<div class="top"><i class="fa fa-caret-up fa-3x"></i></div>
|
||||
{% endif %}
|
||||
|
||||
{% for address in household.addresses %}
|
||||
{% set row = 0 %}
|
||||
{% set previousRowFrom = null %}
|
||||
|
||||
<div class="col-b"></div>
|
||||
{% for address in household.addresses %}
|
||||
|
||||
<div class="col-c content{{ ' row' ~ loop.index }}">
|
||||
<div class="address">
|
||||
{% if address.isNoAddress == true %}
|
||||
<div class="chill_address_is_noaddress">{{ 'address.consider homeless'|trans }}</div>
|
||||
{% else %}
|
||||
{% if address.street is not empty %}
|
||||
<div class="street">
|
||||
<span class="streetNumber">{{ address.street }}</span>
|
||||
{% if address.streetNumber is not empty %}
|
||||
<span class="streetNumber">, {{ address.streetNumber }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if address.postCode is not empty %}
|
||||
<div class="postCode">
|
||||
<span>{{ address.postCode.code }}</span> <span>{{ address.postCode.name }}</span>
|
||||
<span class="country">({{ address.postCode.country.name|localize_translatable_string }})</span>
|
||||
</div>
|
||||
{% set row = row + 1 %}
|
||||
{% if address.validTo is not empty and address.validTo < previousRowFrom %}
|
||||
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c action">
|
||||
<a href="" class="btn btn-sm btn-create">{{ 'Insert an address'|trans }}</a></div>
|
||||
<div class="date">
|
||||
{% if address.validTo is not empty %}
|
||||
{{ address.validTo|format_date('short') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% set row = row + 1 %}
|
||||
{% endif %}
|
||||
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-b"></div>
|
||||
<div class="{{ 'row' ~ row ~ ' ' }}col-c content">
|
||||
{{ address|chill_entity_render_box({
|
||||
'render': 'bloc',
|
||||
'multiline': true,
|
||||
'extended_infos': true,
|
||||
'has_no_address': true
|
||||
}) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="date">
|
||||
{% if address.validFrom is not empty %}
|
||||
{{ address.validFrom|format_date('short') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_household_address_edit', { 'household_id': household.id, 'address_id' : address.id } ) }}" class="btn btn-edit"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% set previousRowFrom = address.validFrom %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="date">
|
||||
{% if address.validFrom is not empty %}
|
||||
{{ address.validFrom|format_date('long') }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_person_household_summary', { 'household_id' : household.id } ) }}" class="btn btn-cancel">
|
||||
{{ 'Back to household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-create"
|
||||
href="{{ chill_path_add_return_path('chill_person_household_address_move', { 'household_id': household.id }) }}">
|
||||
{{ 'Move household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
@@ -2,8 +2,8 @@
|
||||
<div id="header-household-name" class="header-name">
|
||||
<div class="container-xxl">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-5">
|
||||
|
||||
<div class="col-md-4 col-lg-3 ps-md-5 ps-xxl-0">
|
||||
<h1>
|
||||
<i class="fa fa-home"></i>
|
||||
{{ 'household.Household'|trans }}
|
||||
@@ -11,56 +11,60 @@
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div class="col-sm">
|
||||
<ul class="list-content fa-ul">
|
||||
<li>
|
||||
{% set address = household.currentAddress %}
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{% if address is empty %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p>
|
||||
{% else %}
|
||||
{{ address|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
|
||||
<div class="col-md-8 col-lg-9">
|
||||
<div class="household-members my-3 pe-md-5 pe-xxl-0 justify-content-md-end">
|
||||
{%- set members = household.getCurrentMembersOrdered() -%}
|
||||
{%- if members|length > 0 -%}
|
||||
<span class="current-members-explain" style="display: none;">
|
||||
{{- 'household.Current household members'|trans }}
|
||||
<i class="fa fa-fw fa-users" title="{{- 'household.Current household members'|trans }}"></i>
|
||||
</span>
|
||||
|
||||
{%- for m in members|slice(0, 5) -%}
|
||||
<span
|
||||
class="badge-member{%- if m.holder %} holder{% endif -%}{%- if m.position.ordering >= 2 %} child{% endif -%}"
|
||||
title="{{ m.position.label.fr }}">
|
||||
{%- if m.holder %}
|
||||
<span class="badge bg-chill-light-gray text-chill-gray">
|
||||
{{ 'household.holder'|trans }}
|
||||
</span>
|
||||
{% endif -%}
|
||||
{{- m.person|chill_entity_render_box({'addLink': false}) -}}
|
||||
</span>
|
||||
{%- endfor -%}
|
||||
|
||||
{% if members|length > 5 %}
|
||||
<span class="current-members-more">
|
||||
{{ 'household.and x other persons'|trans({'x': members|length-5}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="header-household-details" class="header-details">
|
||||
<div class="container-xxl">
|
||||
<div class="row justify-content-md-right">
|
||||
|
||||
<div class="col-sm-10 members" id="banner-misc">
|
||||
{%- set members = household.getCurrentMembersOrdered() -%}
|
||||
{%- if members|length > 0 -%}
|
||||
<span class="current-members-explain" style="display: none;">
|
||||
{{- 'household.Current household members'|trans }}
|
||||
<i class="fa fa-fw fa-users" title="{{- 'household.Current household members'|trans }}"></i>
|
||||
|
||||
<div class="contact col-md-12 ps-md-5 ps-xxl-0">
|
||||
{% set address = household.currentAddress %}
|
||||
{% if address is empty %}
|
||||
<span class="chill-no-data-statement">
|
||||
{{ 'household.Household does not have any address currently'|trans }}
|
||||
</span>
|
||||
|
||||
{%- for m in members|slice(0, 5) -%}
|
||||
<span
|
||||
class="badge-member{%- if m.holder %} holder{% endif -%}{%- if m.position.ordering >= 2 %} child{% endif -%}"
|
||||
title="{{ m.position.label.fr }}">
|
||||
{%- if m.holder %}
|
||||
<span class="badge bg-chill-light-gray text-chill-gray">
|
||||
{{ 'household.holder'|trans }}
|
||||
</span>
|
||||
{% endif -%}
|
||||
{{- m.person|chill_entity_render_box({'addLink': false}) -}}
|
||||
</span>
|
||||
{%- endfor -%}
|
||||
|
||||
{% if members|length > 5 %}
|
||||
<span class="current-members-more">
|
||||
{{ 'household.and x other persons'|trans({'x': members|length-5}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
{% else %}
|
||||
<span class=" d-block d-sm-inline-block">
|
||||
{{ address|chill_entity_render_box({
|
||||
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
|
||||
}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_members', { 'household_id': household.id }) }}"
|
||||
class="btn btn-cancel"
|
||||
/>
|
||||
@@ -38,5 +38,5 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('household_edit_metadata') }}
|
||||
{{ encore_entry_script_tags('page_household_edit_metadata') }}
|
||||
{% endblock %}
|
||||
|
@@ -5,8 +5,10 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
<div class="mt-5">
|
||||
{% block content %}{% endblock %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -1,195 +0,0 @@
|
||||
{% extends '@ChillPerson/Household/layout.html.twig' %}
|
||||
|
||||
{% block title 'household.Household members'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% if form is not null %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{{ form_row(form.commentMembers) }}
|
||||
|
||||
<div id="waitingForBirthContainer">
|
||||
{{ form_row(form.waitingForBirth) }}
|
||||
</div>
|
||||
|
||||
<div id="waitingForBirthDateContainer">
|
||||
{{ form_row(form.waitingForBirthDate) }}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button type="submit" class="btn btn-save">
|
||||
{{ 'Save'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if not household.commentMembers.isEmpty() %}
|
||||
{{ household.commentMembers|chill_entity_render_box }}
|
||||
{% endif %}
|
||||
|
||||
{% if household.waitingForBirth %}
|
||||
{% if household.waitingForBirthDate is not null %}
|
||||
{{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }}
|
||||
{% else %}
|
||||
{{ 'household.Expecting for birth'|trans }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">
|
||||
{{ 'household.Any expecting birth'|trans }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_members', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-edit"
|
||||
>
|
||||
{{ 'household.Comment and expecting birth'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% for p in positions %}
|
||||
<h3>{{ p.label|localize_translatable_string }}</h3>
|
||||
|
||||
{% if false == p.shareHousehold %}
|
||||
<p>{{ 'household.Those members does not share address'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{%- set members = household.currentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
{% if m.endDate is not empty %}
|
||||
<li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ m.person.id ], 'allow_leave_without_household': true } ) }}"
|
||||
class="btn btn-misc" title="{{ 'household.Leave household'|trans }}" />
|
||||
<i class="fa fa-sign-out"></i>
|
||||
{{ 'household.Leave household'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit" title="{{ 'household.Update membership'|trans }}"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if m.comment is not empty %}
|
||||
<div class="item-row comment">
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ m.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% set members = household.nonCurrentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<p><!-- force a space after table --></p>
|
||||
<button class="btn btn-green" type="button" data-toggle="collapse" data-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
|
||||
{{ 'household.Show future or past memberships'|trans({'length': members|length}) }}
|
||||
</button>
|
||||
|
||||
<div id="nonCurrent_{{ p.id }}" class="collapse">
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
<span class="badge bg-primary">{{ 'household.holder'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div>
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
{% if m.endDate is not empty %}
|
||||
<li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit" title="{{ 'household.Update membership'|trans }}" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if m.comment is not empty %}
|
||||
<div class="item-row comment">
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ m.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
class="btn btn-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('household_edit_metadata') }}
|
||||
{% endblock %}
|
@@ -4,12 +4,12 @@
|
||||
{% block title 'household.Edit household members'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-12 parent">
|
||||
<div class="col-10 push-1 parent">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="household_members_editor"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10 col-xxl household-members">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="household_members_editor"></div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
|
@@ -3,6 +3,8 @@
|
||||
{% block title 'household.Household summary'|trans %}
|
||||
|
||||
{% block content %}
|
||||
<div class="household-summary">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<h2>{{ 'household.Current address'|trans }}</h2>
|
||||
@@ -61,10 +63,8 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-edit"
|
||||
>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_summary', { 'household_id': household.id, 'edit': 1 }) }}"
|
||||
class="btn btn-edit">
|
||||
{{ 'household.Comment and expecting birth'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -85,8 +85,8 @@
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
@@ -97,7 +97,7 @@
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
@@ -108,7 +108,7 @@
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit" />
|
||||
{{ 'household.Update membership'|trans }}
|
||||
</a>
|
||||
@@ -147,7 +147,7 @@
|
||||
{% set members = household.nonCurrentMembersByPosition(p) %}
|
||||
{% if members|length > 0 %}
|
||||
<p><!-- force a space after table --></p>
|
||||
<button class="btn btn-green" type="button" data-toggle="collapse" data-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
|
||||
<button class="btn btn-green" type="button" data-bs-toggle="collapse" data-bs-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members">
|
||||
{{ 'household.Show future or past memberships'|trans({'length': members|length}) }}
|
||||
</button>
|
||||
|
||||
@@ -155,8 +155,8 @@
|
||||
<div class="flex-table list-household-members">
|
||||
{% for m in members %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
<div class="item-col box-person">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div>
|
||||
{{ m.person|chill_entity_render_box({'addLink': true}) }}
|
||||
{% if m.holder %}
|
||||
@@ -167,7 +167,7 @@
|
||||
{{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-col box-where">
|
||||
<div class="item-col">
|
||||
<ul class="list-content fa-ul">
|
||||
{% if m.startDate is not empty %}
|
||||
<li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li>
|
||||
@@ -178,10 +178,8 @@
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit"
|
||||
/>
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
|
||||
class="btn btn-edit">
|
||||
{{ 'household.Update membership'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -205,16 +203,16 @@
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a
|
||||
href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
<a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}"
|
||||
class="btn btn-create">
|
||||
{{ 'household.Add a member'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_script_tags('household_edit_metadata') }}
|
||||
{{ encore_entry_script_tags('page_household_edit_metadata') }}
|
||||
{% endblock %}
|
||||
|
@@ -2,108 +2,65 @@
|
||||
<div id="header-person-name" class="header-name">
|
||||
<div class="container-xxl">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6 ps-md-5 ps-xxl-0">
|
||||
{{ person|chill_entity_render_box({
|
||||
'render': 'label', 'addInfo': true, 'addAge': true, 'addId': true, 'hLevel': 1
|
||||
}) }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<h1>
|
||||
{% set gender =
|
||||
(person.gender == "woman") ? 'female' :
|
||||
(person.gender == "both") ? 'neuter' : 'male'
|
||||
%}
|
||||
<i class="fa fa-fw fa-{{ gender }}" title="{{ gender|capitalize|trans }}"></i>
|
||||
|
||||
{{ person|chill_entity_render_string }}
|
||||
|
||||
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}">
|
||||
{{ person.id|upper }}
|
||||
</span>
|
||||
</h1>
|
||||
{{ include('@ChillPerson/Person/banner_custom.html.twig') }}
|
||||
</div>
|
||||
|
||||
<div class="col-md-auto ps-4 ps-md-2">
|
||||
<ul class="list-content fa-ul my-2">
|
||||
{% if person.email %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
|
||||
{{ person.email }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if person.mobilenumber %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-mobile"></i>
|
||||
<a href="{{ 'tel:' ~ person.mobilenumber }}" class="phone mr-3" title="{{ 'Mobilenumber'|trans }}">
|
||||
{{ person.mobilenumber|chill_format_phonenumber }}</a>
|
||||
</li>
|
||||
{% elseif person.phonenumber %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
<a href="{{ 'tel:' ~ person.phonenumber }}" class="phone mr-3" title="{{ 'Phonenumber'|trans }}">
|
||||
{{ person.phonenumber|chill_format_phonenumber }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-md ps-4 ps-md-2">
|
||||
<ul class="list-content fa-ul">
|
||||
{%- if person.currentHouseholdAddress is not empty -%}
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ person.currentHouseholdAddress|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
|
||||
</li>
|
||||
{%- elseif person.lastAddress is not empty -%}
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{{ person.lastAddress|chill_entity_render_box({'multiline': false, 'with_valid_from': false}) }}
|
||||
</li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="header-person-details" class="header-details">
|
||||
<div class="container-xxl">
|
||||
<div class="row justify-content-between">
|
||||
|
||||
<div class="col-md-6 ps-4">
|
||||
<span class="open_sansbold">
|
||||
{{ 'Birthdate'|trans|upper }} :
|
||||
</span>
|
||||
{% if person.birthdate == null %}
|
||||
{{ 'Unknown date of birth'|trans }}
|
||||
{% else %}
|
||||
{{ person.birthdate|format_date('short') }}
|
||||
<span class="age">
|
||||
{{ 'years_old'|trans({ 'age': person.age }) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-md-12 ps-md-5 ps-xxl-0">
|
||||
<div class="contact">
|
||||
{% if person.phonenumber %}
|
||||
<span class="phonenumber d-block d-sm-inline-block">
|
||||
<i class="fa fa-fw fa-phone"></i>
|
||||
<a href="{{ 'tel:' ~ person.phonenumber }}" class="phone mr-3" title="{{ 'Phonenumber'|trans }}">
|
||||
{{ person.phonenumber|chill_format_phonenumber }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if person.mobilenumber %}
|
||||
<span class="mobilenumber d-block d-sm-inline-block">
|
||||
<i class="fa fa-fw fa-mobile"></i>
|
||||
<a href="{{ 'tel:' ~ person.mobilenumber }}" class="phone mr-3" title="{{ 'Mobilenumber'|trans }}">
|
||||
{{ person.mobilenumber|chill_format_phonenumber }}</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if person.email %}
|
||||
<span class="email d-block d-sm-inline-block">
|
||||
<i class="fa fa-fw fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
|
||||
{{ person.email }}
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
|
||||
{% set address = null %}
|
||||
{%- if person.currentHouseholdAddress is not empty -%}
|
||||
{% set address = person.currentHouseholdAddress %}
|
||||
{%- elseif person.lastAddress is not empty -%}
|
||||
{% set address = person.lastAddress %}
|
||||
{%- endif -%}
|
||||
{%- if address is not null -%}
|
||||
<span class=" d-block d-sm-inline-block">
|
||||
{{ address|chill_entity_render_box({
|
||||
'render': 'inline', 'multiline': false, 'with_picto': true, 'with_delimiter': true
|
||||
}) }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
<div class="col-md-auto ps-4 ps-md-2">
|
||||
<span class="open_sansbold">
|
||||
{{ 'Nationality'|trans|upper}} :
|
||||
</span>
|
||||
{% if person.nationality is not null %}
|
||||
{{ person.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
{% trans %}Without nationality{% endtrans %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
<div class="col-md ps-4 ps-md-2 text-md-end text-start pe-4">
|
||||
<span class="open_sansbold">
|
||||
{{ 'Center'|trans|upper}} :
|
||||
</span>
|
||||
{{ person.center.name|upper }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -0,0 +1,27 @@
|
||||
{#
|
||||
Overwrite this file to display client specific datas in custom area
|
||||
#}
|
||||
<div id="banner-person-custom" class="my-3 pe-md-5 pe-xxl-0 justify-content-end">
|
||||
<div class="text-md-end mb-1">
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
<span class="open_sansbold">
|
||||
{{ 'Nationality'|trans|upper}} :
|
||||
</span>
|
||||
{% if person.nationality is not null %}
|
||||
{{ person.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">
|
||||
{% trans %}Without nationality{% endtrans %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="text-md-end">
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
<span class="open_sansbold">
|
||||
{{ 'Center'|trans|upper}} :
|
||||
</span>
|
||||
{{ person.center.name|upper }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</div>
|
@@ -16,37 +16,33 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'Add a person'|trans }}{% endblock title %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="person-new col-12 my-5">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-md-10 col-xxl">
|
||||
{{ form_start(form) }}
|
||||
|
||||
<h1>{{ 'Add a person'|trans }}</h1>
|
||||
|
||||
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
|
||||
|
||||
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }}
|
||||
|
||||
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
|
||||
|
||||
{{ form_rest(form) }}
|
||||
|
||||
<button class="btn btn-create" type="submit" alt="add a person">
|
||||
{{ 'Add the person'|trans }}
|
||||
</button>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-10 col-xxl person-new">
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<h1>{{ 'Add a person'|trans }}</h1>
|
||||
|
||||
{{ form_row(form.firstName, { 'label' : 'First name'|trans }) }}
|
||||
|
||||
{{ form_row(form.lastName, { 'label' : 'Last name'|trans }) }}
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_row(form.birthdate, { 'label' : 'Date of birth'|trans }) }}
|
||||
|
||||
{{ form_row(form.gender, { 'label' : 'Gender'|trans }) }}
|
||||
|
||||
{{ form_rest(form) }}
|
||||
|
||||
<button class="btn btn-create" type="submit" alt="add a person">
|
||||
{{ 'Add the person'|trans }}
|
||||
</button>
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@@ -17,84 +17,81 @@
|
||||
{% extends "@ChillMain/layout.html.twig" %}
|
||||
|
||||
{% block title %}{{ 'Alreay existing person'|trans }}{% endblock title %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="person-new col-12 my-5">
|
||||
<div class="row justify-content-center">
|
||||
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<div class="alert alert-warning flash_message">
|
||||
<span>
|
||||
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
|
||||
%nb% person with similar name. Please verify that this is a new person
|
||||
{% endtranschoice %}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{% if alternatePersons is not empty %}
|
||||
<table class="table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{{ 'Name'|trans }}</th>
|
||||
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
|
||||
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in alternatePersons %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
|
||||
{{ person|chill_entity_render_string }}{% apply spaceless %}
|
||||
{% if person.isOpen == false %}
|
||||
<i class="icon-lock"></i>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %} {% endif %}</td>
|
||||
<td>
|
||||
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<div id="person_details" class="my-5">
|
||||
{{ form_start(form) }}
|
||||
<h2>{{ 'You will create this person'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'Name'|trans }}</dt>
|
||||
<dd>{{ person|chill_entity_render_string }}</dd>
|
||||
|
||||
<dt>{{ 'Date of birth'|trans }}</dt>
|
||||
{% if birthdate is empty %}
|
||||
<dd>{{ 'Unknown date of birth'|trans }}</dd>
|
||||
{% else %}
|
||||
<dd>{{ birthdate|format_date('long') }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ 'Gender'|trans }}</dt>
|
||||
<dd>{{ gender|trans }}</dd>
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{# mark as rendered #}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="sc-button bt-create change-icon" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10 col-xxl person-new">
|
||||
|
||||
<div class="alert alert-warning flash_message">
|
||||
<span>
|
||||
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
|
||||
%nb% person with similar name. Please verify that this is a new person
|
||||
{% endtranschoice %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if alternatePersons is not empty %}
|
||||
<table class="table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{{ 'Name'|trans }}</th>
|
||||
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
|
||||
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in alternatePersons %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
|
||||
{{ person|chill_entity_render_string }}{% apply spaceless %}
|
||||
{% if person.isOpen == false %}
|
||||
<i class="icon-lock"></i>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %} {% endif %}</td>
|
||||
<td>
|
||||
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
<div id="person_details" class="my-5">
|
||||
{{ form_start(form) }}
|
||||
<h2>{{ 'You will create this person'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'Name'|trans }}</dt>
|
||||
<dd>{{ person|chill_entity_render_string }}</dd>
|
||||
|
||||
<dt>{{ 'Date of birth'|trans }}</dt>
|
||||
{% if birthdate is empty %}
|
||||
<dd>{{ 'Unknown date of birth'|trans }}</dd>
|
||||
{% else %}
|
||||
<dd>{{ birthdate|format_date('long') }}</dd>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ 'Gender'|trans }}</dt>
|
||||
<dd>{{ gender|trans }}</dd>
|
||||
|
||||
{% if form.altNames is defined %}
|
||||
{# mark as rendered #}
|
||||
{{ form_widget(form.altNames) }}
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<button class="sc-button bt-create change-icon" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@@ -22,9 +22,7 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-edit">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
|
||||
<h1>{{ 'Update details for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName|capitalize } ) }}</h1>
|
||||
|
||||
{% form_theme form '@ChillMain/Form/fields.html.twig' %}
|
||||
@@ -140,11 +138,9 @@
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ encore_entry_link_tags('person') }}
|
||||
{{ encore_entry_link_tags('page_person') }}
|
||||
{% endblock %}
|
||||
|
@@ -6,8 +6,6 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-household">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<h2>{{ 'household.Household shared'|trans }}</h2>
|
||||
@@ -177,7 +175,5 @@
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -23,8 +23,10 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block layout_wvm_content %}
|
||||
<div class="mt-5">
|
||||
{% block personcontent %}{# block personcontent empty #}{% endblock %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
{% block personcontent %}{# block personcontent empty #}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
@@ -14,105 +14,107 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
<h2>{{ title|default('Person search results')|trans }}</h2>
|
||||
<div class="list-person">
|
||||
<h2>{{ title|default('Person search results')|trans }}</h2>
|
||||
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
|
||||
{% if persons|length > 0 %}
|
||||
{% if persons|length > 0 %}
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
|
||||
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Nationality{% endtrans %}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in persons %}
|
||||
<table class="table table-bordered border-dark align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = person.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{ person|chill_entity_render_box }}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if person.birthdate is not null %}
|
||||
{{ person.birthdate|format_date('long') }}
|
||||
{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if person.nationality is not null %}
|
||||
{{person.nationality.name | localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ 'Without nationality'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
|
||||
<th class="chill-orange">{% trans %}Name{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Date of birth{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Nationality{% endtrans %}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in persons %}
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = person.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{ person|chill_entity_render_box }}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if person.birthdate is not null %}
|
||||
{{ person.birthdate|format_date('long') }}
|
||||
{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if person.nationality is not null %}
|
||||
{{person.nationality.name | localize_translatable_string }}
|
||||
{% else %}
|
||||
{{ 'Without nationality'|trans }}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if search_name != "person_similarity" %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
{% if search_name != "person_similarity" %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -14,94 +14,96 @@
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
<h2>{{ title|default('Person search results by phonenumber')|trans }}</h2>
|
||||
<div class="list-by-phonenumber">
|
||||
<h2>{{ title|default('Person search results by phonenumber')|trans }}</h2>
|
||||
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
|
||||
{% if persons|length > 0 %}
|
||||
{% if persons|length > 0 %}
|
||||
|
||||
<table class="person-list__--by-phonenumber">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="chill-red">{% trans %}Name{% endtrans %}</th>
|
||||
<th class="chill-green">{% trans %}Date of birth{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Phonenumber{% endtrans %}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in persons %}
|
||||
<table class="table table-bordered border-dark align-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = person.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{person.firstName}} {{person.lastName}}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
<th class="chill-orange">{% trans %}Name{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Date of birth{% endtrans %}</th>
|
||||
<th class="chill-orange">{% trans %}Phonenumber{% endtrans %}</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in persons %}
|
||||
<tr>
|
||||
<td>
|
||||
{% set is_open = person.isOpen() %}
|
||||
<a href="{{ path('chill_person_view', { person_id : person.getId }) }}" {% if chill_person.fields.accompanying_period == 'visible' %}{% if is_open %} alt="{{ 'An accompanying period is open'|trans|e('html_attr') }}"{% else %} alt="{{ 'Any accompanying periods are open'|trans|e('html_attr') }}" {% endif %}{% endif %}>
|
||||
{{person.firstName}} {{person.lastName}}
|
||||
{% apply spaceless %}
|
||||
{% if chill_person.fields.accompanying_period == 'visible' %}
|
||||
{% if is_open == false %}
|
||||
<i class="fa fa-lock" ></i>
|
||||
{% else %}
|
||||
<i class="fa fa-unlock" ></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||
</td>
|
||||
<td class="person-list__--by-phonenumber__phones">
|
||||
<ul>
|
||||
{% if person.phonenumber is not empty %}
|
||||
<li>
|
||||
<a href="tel:{{ person.phonenumber }}"><img src="{{ asset('build/images/mobile-alt-solid.svg') }}"> <pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if person.birthdate is not null %}{{person.birthdate|format_date('long') }}{% else %}{{ 'Unknown date of birth'|trans }}{% endif %}
|
||||
</td>
|
||||
<td class="person-list__--by-phonenumber__phones">
|
||||
<ul>
|
||||
{% if person.phonenumber is not empty %}
|
||||
<li>
|
||||
<a href="tel:{{ person.phonenumber }}"><img src="{{ asset('build/images/mobile-alt-solid.svg') }}"> <pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if person.mobilenumber is not empty%}
|
||||
<li>
|
||||
<a href="tel:{{ person.mobilenumber }}"><img src="{{ asset('build/images/phone-alt-solid.svg') }}"> <pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if person.mobilenumber is not empty%}
|
||||
<li>
|
||||
<a href="tel:{{ person.mobilenumber }}"><img src="{{ asset('build/images/phone-alt-solid.svg') }}"> <pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li><a class="btn btn-show" href="{{ path('chill_person_view', { person_id : person.getId }) }}"></a></li>
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<li><a class="btn btn-update" href="{{ path('chill_person_general_edit', { person_id : person.getId }) }}"></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@@ -1,178 +1,145 @@
|
||||
<h2>{{ title|default('Person search results')|trans }}</h2>
|
||||
{% macro button_person(person) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id }) }}"
|
||||
class="btn btn-sm btn-primary" title="{{ 'See accompanying periods'|trans }}"><i class="fa fa-random"></i></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
<div class="list-with-period">
|
||||
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
<h2>{{ title|default('Person search results')|trans }}</h2>
|
||||
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if search_name != "person_similarity" %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
|
||||
{{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons | length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<p>
|
||||
{{ '%total% persons matching the search pattern:'|transchoice( total, { '%total%' : total}) }}
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-sm">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ pattern }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
{% if persons|length > 0 %}
|
||||
|
||||
<div class="flex-table list-with-period">
|
||||
{% for person in persons %}
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row person">
|
||||
|
||||
<div class="item-col box-person">
|
||||
<div>{{ person|chill_entity_render_box({'addLink': true}) }}</div>
|
||||
<div>{{ 'Born the %date%'|transchoice(person.genderNumeric, { '%date%': person.birthdate|format_date("medium") }) }}</div>
|
||||
</div>
|
||||
|
||||
<div class="item-col box-where">
|
||||
<ul class="list-content fa-ul">
|
||||
<li><i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person.center }}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
{% if person.mobilenumber is not empty %}
|
||||
<i class="fa fa-li fa-mobile"></i> <a href="{{ 'tel:' ~ person.mobilenumber }}">{{ person.mobilenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<i class="fa fa-li fa-phone"></i>
|
||||
{% if person.phonenumber is not empty %}
|
||||
<a href="{{ 'tel:' ~ person.phonenumber }}">{{ person.phonenumber|chill_format_phonenumber }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<i class="fa fa-li fa-map-marker"></i>
|
||||
{% if person.getLastAddress is not null %}
|
||||
{{ person.getLastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No address'|trans }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_view', { 'person_id' : person.id }) }}" class="btn btn-chill-blue" />
|
||||
<i class="fa fa-folder-open-o"></i> {{ 'Open person file'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_period_list', { 'person_id' : person.id }) }}" class="btn btn-chill-green" title="{{ 'See accompanying periods'|trans }}"/>
|
||||
<i class="fa fa-random"></i></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{#- 'apps' is for AccompanyingPeriodParticipationS #}
|
||||
{#- filter using acl -#}
|
||||
{%- set apps = [] %}
|
||||
{%- for app in person.openedParticipations %}
|
||||
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', app.accompanyingPeriod) %}
|
||||
{%- set apps = apps|merge([app]) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% if apps|length > 0 %}
|
||||
{% for app in apps %}
|
||||
<div class="item-row periods">
|
||||
|
||||
<div class="header">
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': app.accompanyingPeriod.id }) }}"
|
||||
class="btn btn-chill-green" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-fw fa-random"></i>
|
||||
</a>
|
||||
<span>{{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }}</span>
|
||||
{% if app.accompanyingPeriod.user is not null %}
|
||||
<span class="user">
|
||||
<abbr class="referrer" title="{{ 'Referrer'|trans }}">ref:</abbr>
|
||||
{{ app.accompanyingPeriod.user|chill_entity_render_box }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="list-content">
|
||||
{% for issue in app.accompanyingPeriod.socialIssues|slice(0,2) %}
|
||||
<span>{{ issue|chill_entity_render_box }}</span>
|
||||
{% endfor %}
|
||||
|
||||
{% if app.accompanyingPeriod.socialIssues|length > 2 %}
|
||||
<span class="more">{{ 'and %number% other'|transchoice(app.accompanyingPeriod.socialIssues|length-2) }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
<p>{{ 'Results %start%-%end% of %total%'|trans({ '%start%' : start, '%end%': start + persons|length, '%total%' : total } ) }}</p>
|
||||
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if search_name != "person_similarity" %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i>
|
||||
{{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% if preview == true and persons | length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
{% if persons|length > 0 %}
|
||||
<div class="flex-table">
|
||||
{% for person in persons %}
|
||||
<div class="item-bloc">
|
||||
|
||||
{{ person|chill_entity_render_box({
|
||||
'render': 'bloc',
|
||||
'addLink': true,
|
||||
'addInfo': true,
|
||||
'addAltNames': false,
|
||||
'addCenter': true,
|
||||
'address_multiline': true,
|
||||
'customButtons': { 'after': _self.button_person(person) }
|
||||
}) }}
|
||||
|
||||
{#- 'apps' is for AccompanyingPeriodParticipationS #}
|
||||
{#- filter using acl -#}
|
||||
{%- set apps = [] %}
|
||||
{%- for app in person.openedParticipations %}
|
||||
{%- if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_SEE', app.accompanyingPeriod) %}
|
||||
{%- set apps = apps|merge([app]) %}
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
|
||||
{% if apps|length > 0 %}
|
||||
<div class="item-row separator periods">
|
||||
{% for app in apps %}
|
||||
|
||||
<div class="header">
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': app.accompanyingPeriod.id }) }}"
|
||||
class="btn btn-chill-green" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-random"></i>
|
||||
</a>
|
||||
<span>
|
||||
{{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }}
|
||||
</span>
|
||||
{% if app.accompanyingPeriod.user is not null %}
|
||||
<span class="user">
|
||||
<abbr class="referrer" title="{{ 'Referrer'|trans }}">ref:</abbr>
|
||||
{{ app.accompanyingPeriod.user|chill_entity_render_box }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="list-content">
|
||||
{% for issue in app.accompanyingPeriod.socialIssues|slice(0,2) %}
|
||||
<span>{{ issue|chill_entity_render_box }}</span>
|
||||
{% endfor %}
|
||||
{% if app.accompanyingPeriod.socialIssues|length > 2 %}
|
||||
<span class="more">{{ 'and %number% other'|transchoice(app.accompanyingPeriod.socialIssues|length-2) }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<ul class="record_actions">
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_new') }}" class="btn btn-create">
|
||||
{{ 'Add a person'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if search_name != "person_similarity" %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if preview == true and persons|length < total %}
|
||||
<li>
|
||||
<a href="{{ path('chill_main_search', { "name": search_name|default('abcd'), "q" : pattern }) }}" class="btn btn-misc">
|
||||
{{ 'See all results'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% else %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_main_advanced_search', { "name": search_name, "q": pattern } ) }}" class="btn btn-action">
|
||||
<i class="fa fa-fw fa-search" aria-hidden="true"></i> {{ 'Advanced search'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if preview == false %}
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
@@ -16,8 +16,6 @@
|
||||
#}
|
||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
||||
|
||||
{% import '@ChillMain/Address/macro.html.twig' as address %}
|
||||
|
||||
{% set activeRouteKey = 'chill_person_view' %}
|
||||
|
||||
{#
|
||||
@@ -37,225 +35,268 @@ This view should receive those arguments:
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-view">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<div class="row">
|
||||
{% if person.memo is not empty and chill_person.fields.memo == 'visible' %}
|
||||
<div class="col-12">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'Memo'|trans }}</h2>
|
||||
|
||||
<div class="chill-user-quote">
|
||||
{{ person.memo|chill_markdown_to_html }}
|
||||
</div>
|
||||
|
||||
</figure>
|
||||
<div class="row">
|
||||
{% if person.memo is not empty and chill_person.fields.memo == 'visible' %}
|
||||
<div class="col-12">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'Memo'|trans }}</h2>
|
||||
<div class="chill-user-quote">
|
||||
{{ person.memo|chill_markdown_to_html }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'General information'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'First name'|trans }} :</dt>
|
||||
<dd>{{ person.firstName }}</dd>
|
||||
</figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<dt>{{ 'Last name'|trans }} :</dt>
|
||||
<dd>{{ person.lastName }}</dd>
|
||||
{% for el in person.altNames %}
|
||||
{% if el.key in alt_names|keys %}
|
||||
<dt>{{ alt_names[el.key]|localize_translatable_string }} :</dt>
|
||||
<dd>{{ el.label }}</dd>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-red">{{ 'General information'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'First name'|trans }} :</dt>
|
||||
<dd>{{ person.firstName }}</dd>
|
||||
|
||||
<dt>{{ 'Gender'|trans }} :</dt>
|
||||
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
||||
</dl>
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-green"><i class="fa fa-birthday-cake"></i> {{ 'Birth information'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'Date of birth'|trans }} :</dt>
|
||||
<dd>
|
||||
{%- if person.birthdate is not null -%}
|
||||
{{ person.birthdate|format_date('long') }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown date of birth'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
|
||||
{%- if chill_person.fields.place_of_birth == 'visible' -%}
|
||||
<dt>{{ 'Place of birth'|trans }} :</dt>
|
||||
{% if person.placeOfBirth is not empty %}
|
||||
<dd>{{ person.placeOfBirth }}</dd>
|
||||
{% else %}
|
||||
<dd><span class="chill-no-data-statement">{{ 'Not given'|trans }}</span></dd>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.country_of_birth == 'visible' -%}
|
||||
<dt>{{ 'Country of birth'|trans }} :</dt>
|
||||
<dd>{% apply spaceless %}
|
||||
{% if person.countryOfBirth is not null %}
|
||||
{{ person.countryOfBirth.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown country of birth'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endapply %}</dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%}
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-orange">{{ 'Administrative information'|trans }}</h2>
|
||||
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Nationality'|trans }} :</dt>
|
||||
<dd>
|
||||
{% if person.nationality is not null %}
|
||||
{{ person.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'Without nationality'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Spoken languages'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.spokenLanguages|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown spoken languages'|trans }}</span>
|
||||
{% else %}
|
||||
{% for lang in person.spokenLanguages %}
|
||||
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.marital_status == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Marital status'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.maritalStatus is not null %}
|
||||
{{ person.maritalStatus.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.email == 'visible'
|
||||
or chill_person.fields.phonenumber == 'visible'
|
||||
or chill_person.fields.mobilenumber == 'visible'
|
||||
or chill_person.fields.contact_info == 'visible' -%}
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i> {{ 'Contact information'|trans }}</h2>
|
||||
|
||||
{%- if chill_person.fields.address == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Address'|trans }}</dt>
|
||||
<dd>
|
||||
{%- if person.lastAddress is not empty -%}
|
||||
{{ address._render(person.lastAddress, {'has_no_address': true}) }}
|
||||
|
||||
<ul class="list-inline text-right mt-2">
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-warning btn-sm" title="{{ 'Edit'|trans }}"
|
||||
href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : person.lastAddress.id } ) }}">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-secondary btn-sm" title="{{ "Addresses history"|trans }}"
|
||||
href="{{ path('chill_person_address_list', { 'person_id': person.id } ) }}">
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}" class="">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
{%- if chill_person.fields.email == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Email'|trans }} :</dt>
|
||||
<dd>{% if person.email is not empty %}<blockquote class="chill-user-quote">{{ person.email|nl2br }}</blockquote>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.phonenumber == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Phonenumber'|trans }} :</dt>
|
||||
<dd>{% if person.phonenumber is not empty %}<a href="tel:{{ person.phonenumber }}"><pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
<dt>{{ 'Last name'|trans }} :</dt>
|
||||
<dd>{{ person.lastName }}</dd>
|
||||
{% for el in person.altNames %}
|
||||
{% if el.key in alt_names|keys %}
|
||||
<dt>{{ alt_names[el.key]|localize_translatable_string }} :</dt>
|
||||
<dd>{{ el.label }}</dd>
|
||||
{% endif %}
|
||||
{%- if chill_person.fields.mobilenumber == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{%- if chill_person.fields.contact_info == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Notes on contact information'|trans }} :</dt>
|
||||
<dd>{% if person.contactInfo is not empty %}{{ person.contactInfo|nl2br }}{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>{% endif %}</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
||||
{% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}
|
||||
<div class="row">
|
||||
<div class="col-12 custom-fields">
|
||||
<figure class="person-details">
|
||||
{{ chill_custom_fields_group_widget(person.cFData, cFGroup) }}
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<figure class="person-details"></figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<ul class="sticky-form-buttons record_actions">
|
||||
<li>
|
||||
<a class="btn btn-update" href="{{ path('chill_person_general_edit', { 'person_id': person.id }) }}">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<dt>{{ 'Gender'|trans }} :</dt>
|
||||
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
|
||||
|
||||
</dl>
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-green"><i class="fa fa-birthday-cake"></i> {{ 'Birth information'|trans }}</h2>
|
||||
<dl>
|
||||
<dt>{{ 'Date of birth'|trans }} :</dt>
|
||||
<dd>
|
||||
{%- if person.birthdate is not null -%}
|
||||
{{ person.birthdate|format_date('long') }}
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown date of birth'|trans }}</span>
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
|
||||
{%- if chill_person.fields.place_of_birth == 'visible' -%}
|
||||
<dt>{{ 'Place of birth'|trans }} :</dt>
|
||||
{% if person.placeOfBirth is not empty %}
|
||||
<dd>{{ person.placeOfBirth }}</dd>
|
||||
{% else %}
|
||||
<dd><span class="chill-no-data-statement">{{ 'Not given'|trans }}</span></dd>
|
||||
{% endif %}
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.country_of_birth == 'visible' -%}
|
||||
<dt>{{ 'Country of birth'|trans }} :</dt>
|
||||
<dd>{% apply spaceless %}
|
||||
{% if person.countryOfBirth is not null %}
|
||||
{{ person.countryOfBirth.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown country of birth'|trans }}</span>
|
||||
{% endif %}
|
||||
{% endapply %}</dd>
|
||||
{%- endif -%}
|
||||
</dl>
|
||||
</figure>
|
||||
</div>
|
||||
|
||||
{% if person.genderComment.comment is not empty %}
|
||||
<div class="col-12">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-beige">{{ 'Gender comment'|trans }} :</h2>
|
||||
<div class="chill-user-quote">
|
||||
{{ person.genderComment.comment|chill_markdown_to_html }}
|
||||
</div>
|
||||
</figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%}
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-orange">{{ 'Administrative information'|trans }}</h2>
|
||||
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Nationality'|trans }} :</dt>
|
||||
<dd>
|
||||
{% if person.nationality is not null %}
|
||||
{{ person.nationality.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'Without nationality'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Spoken languages'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.spokenLanguages|length == 0 %}
|
||||
<span class="chill-no-data-statement">{{ 'Unknown spoken languages'|trans }}</span>
|
||||
{% else %}
|
||||
{% for lang in person.spokenLanguages %}
|
||||
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
{%- if chill_person.fields.marital_status == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{'Marital status'|trans}} :</dt>
|
||||
<dd>
|
||||
{% if person.maritalStatus is not null %}
|
||||
{{ person.maritalStatus.name|localize_translatable_string }}
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
|
||||
<dt>{{ 'Comment on the marital status'|trans }} :</dt>
|
||||
<dd>
|
||||
{% if person.maritalStatusComment.comment is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ person.maritalStatusComment.comment|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.email == 'visible'
|
||||
or chill_person.fields.phonenumber == 'visible'
|
||||
or chill_person.fields.mobilenumber == 'visible'
|
||||
or chill_person.fields.contact_info == 'visible' -%}
|
||||
<div class="col-sm-6 my-3">
|
||||
<figure class="person-details">
|
||||
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i> {{ 'Contact information'|trans }}</h2>
|
||||
|
||||
{%- if chill_person.fields.address == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Address'|trans }}</dt>
|
||||
<dd>
|
||||
{%- if person.lastAddress is not empty -%}
|
||||
{{ person.lastAddress|chill_entity_render_box({
|
||||
'render': 'bloc',
|
||||
'multiline': true,
|
||||
'extended_infos': true,
|
||||
'has_no_address': true
|
||||
}) }}
|
||||
|
||||
<ul class="list-inline text-right mt-2">
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-warning btn-sm" title="{{ 'Edit'|trans }}"
|
||||
href="{{ path('chill_person_address_edit', { 'person_id': person.id, 'address_id' : person.lastAddress.id } ) }}">
|
||||
<i class="fa fa-pencil fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="list-inline-item">
|
||||
<a class="btn btn-secondary btn-sm" title="{{ "Addresses history"|trans }}"
|
||||
href="{{ path('chill_person_address_list', { 'person_id': person.id } ) }}">
|
||||
<i class="fa fa-list fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{%- else -%}
|
||||
<span class="chill-no-data-statement">{{ 'No address given'|trans }}</span>
|
||||
<a href="{{ path('chill_person_address_new', { 'person_id' : person.id } ) }}" class="">
|
||||
{{ 'Add an address'|trans }}
|
||||
</a>
|
||||
{%- endif -%}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.email == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Email'|trans }} :</dt>
|
||||
<dd>{% if person.email is not empty %}
|
||||
<a href="{{ 'mailto:' ~ person.email }}" class="email">{{ person.email|nl2br }}</a>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
{%- if chill_person.fields.phonenumber == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Phonenumber'|trans }} :</dt>
|
||||
<dd>{% if person.phonenumber is not empty %}<a href="tel:{{ person.phonenumber }}"><pre>{{ person.phonenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
{%- if chill_person.fields.mobilenumber == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Mobilenumber'|trans }} :</dt>
|
||||
<dd>{% if person.mobilenumber is not empty %}<a href="tel:{{ person.mobilenumber }}"><pre>{{ person.mobilenumber|chill_format_phonenumber }}</pre></a>{% else %}<span class="chill-no-data-statement">{{ 'No data given'|trans }}{% endif %}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
|
||||
{# TODO
|
||||
display collection of others phonenumbers
|
||||
#}
|
||||
|
||||
{%- if chill_person.fields.contact_info == 'visible' -%}
|
||||
<dl>
|
||||
<dt>{{ 'Notes on contact information'|trans }} :</dt>
|
||||
<dd>
|
||||
{% if person.contactInfo is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ person.contactInfo|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No data given'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
</dl>
|
||||
{%- endif -%}
|
||||
|
||||
</figure>
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
</div>
|
||||
|
||||
{% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}
|
||||
<div class="row">
|
||||
<div class="col-12 custom-fields">
|
||||
<figure class="person-details">
|
||||
{{ chill_custom_fields_group_widget(person.cFData, cFGroup) }}
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<figure class="person-details"></figure>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
|
||||
<ul class="sticky-form-buttons record_actions">
|
||||
<li>
|
||||
<a class="btn btn-update" href="{{ path('chill_person_general_edit', { 'person_id': person.id }) }}">
|
||||
{{ 'Edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
{%- macro details(person, options) -%}
|
||||
|
||||
{% import '@ChillMain/Address/macro.html.twig' as address %}
|
||||
|
||||
<ul>
|
||||
<li><b>{{ 'gender'|trans }}</b>:
|
||||
{{ person.gender|trans }}</li>
|
||||
@@ -24,7 +22,9 @@
|
||||
<li><b>{{ 'memo'|trans }}</b>:
|
||||
{{ person.memo }}</li>
|
||||
<li><b>{{ 'address'|trans }}</b>:
|
||||
{%- if person.lastAddress is not empty -%}{{ address._render(person.lastAddress, {'with_valid_from': false}) }}{% endif %}</li>
|
||||
{%- if person.lastAddress is not empty -%}
|
||||
{{ person.lastAddress|chill_entity_render_box({'with_valid_from': false}) }}
|
||||
{% endif %}</li>
|
||||
<li><b>{{ 'spokenLanguages'|trans }}</b>:
|
||||
{% for lang in person.spokenLanguages %}{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}{% endfor %}</li>
|
||||
<li><b>{{ 'contactInfo'|trans }}</b>:
|
||||
@@ -43,4 +43,4 @@
|
||||
<li><b>{{ person.counters.nb_addresses }}</b> {{ (person.counters.nb_addresses > 1)? 'adresses' : 'adresse' }}</li>
|
||||
|
||||
</ul>
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
@@ -8,8 +8,6 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-duplicate">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<h1>{{ 'Désigner un dossier doublon'|trans }}</h1>
|
||||
|
||||
@@ -29,7 +27,5 @@
|
||||
|
||||
{{ form_end(form) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -7,8 +7,6 @@
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="person-duplicate">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
<h1>{{ title|default('Person duplicate')|trans }}</h1>
|
||||
|
||||
@@ -159,7 +157,5 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -28,8 +28,6 @@ This view should receive those arguments:
|
||||
|
||||
{% block personcontent %}
|
||||
<div class="timeline">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
|
||||
{{ timeline|raw }}
|
||||
|
||||
@@ -37,7 +35,5 @@ This view should receive those arguments:
|
||||
{{ chill_pagination(paginator) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,9 +1,11 @@
|
||||
{% if is_granted('CHILL_PERSON_CREATE') %}
|
||||
<div class="col-8 mb-5 text-center homepage_widget">
|
||||
<a href="{{ path('chill_person_new') }}">
|
||||
<div class="btn btn-lg btn-primary mt-4" style="float: inherit;">
|
||||
{{ 'Add a person'|trans }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="col-8 mt-5 homepage_widget">
|
||||
<center>
|
||||
<a href="{{ path('chill_person_new') }}">
|
||||
<div class="btn btn-lg btn-primary">
|
||||
{{ 'Add a person'|trans }}
|
||||
</div>
|
||||
</a>
|
||||
</center>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@@ -15,9 +15,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#}
|
||||
|
||||
<div class="list-group vertical-menu menu-person">
|
||||
<div class="list-group vertical-menu {{ 'menu-' ~ menus.name }}">
|
||||
{% for menu in menus %}
|
||||
<a class="list-group-item list-group-item-action"
|
||||
<a class="list-group-item list-group-item-action"
|
||||
href="{{ menu.uri }}">
|
||||
{{ menu.label|upper }}
|
||||
</a>
|
||||
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Service\Import;
|
||||
|
||||
interface ChillImporter
|
||||
{
|
||||
public function import(iterable $dataset): bool;
|
||||
}
|
@@ -0,0 +1,298 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Service\Import;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\Evaluation;
|
||||
use Chill\PersonBundle\Entity\SocialWork\Goal;
|
||||
use Chill\PersonBundle\Entity\SocialWork\Result;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
|
||||
use Chill\PersonBundle\Repository\SocialWork\EvaluationRepository;
|
||||
use Chill\PersonBundle\Repository\SocialWork\GoalRepository;
|
||||
use Chill\PersonBundle\Repository\SocialWork\ResultRepository;
|
||||
use Chill\PersonBundle\Repository\SocialWork\SocialActionRepository;
|
||||
use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\Query\Expr\Comparison;
|
||||
use Doctrine\Persistence\ObjectRepository;
|
||||
use Exception;
|
||||
|
||||
final class SocialWorkMetadata implements SocialWorkMetadataInterface
|
||||
{
|
||||
private SocialIssueRepository $socialIssueRepository;
|
||||
|
||||
private SocialActionRepository $socialActionRepository;
|
||||
|
||||
private GoalRepository $goalRepository;
|
||||
|
||||
private ResultRepository $resultRepository;
|
||||
|
||||
private EvaluationRepository $evaluationRepository;
|
||||
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
public function __construct(
|
||||
SocialIssueRepository $socialIssueRepository,
|
||||
SocialActionRepository $socialActionRepository,
|
||||
GoalRepository $goalRepository,
|
||||
ResultRepository $resultRepository,
|
||||
EvaluationRepository $evaluationRepository,
|
||||
EntityManagerInterface $entityManager
|
||||
) {
|
||||
$this->socialIssueRepository = $socialIssueRepository;
|
||||
$this->socialActionRepository = $socialActionRepository;
|
||||
$this->goalRepository = $goalRepository;
|
||||
$this->resultRepository = $resultRepository;
|
||||
$this->evaluationRepository = $evaluationRepository;
|
||||
$this->entityManager = $entityManager;
|
||||
}
|
||||
|
||||
public function import(iterable $dataset): bool
|
||||
{
|
||||
foreach ($dataset as $row) {
|
||||
$this->import1(
|
||||
array_map(
|
||||
static fn (string $column): ?string => '' === $column ? null : $column,
|
||||
array_map('trim', $row)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private function import1(array $row): void
|
||||
{
|
||||
// Structure:
|
||||
// Index 0: SocialIssue.parent
|
||||
// Index 1: SocialIssue
|
||||
// Index 2: SocialAction.parent
|
||||
// Index 3: SocialAction
|
||||
// Index 4: Goal
|
||||
// Index 5: Result
|
||||
// Index 6: Evaluation
|
||||
|
||||
$socialIssue = $this->handleSocialIssue($row[0], $row[1]);
|
||||
|
||||
$socialAction = $this->handleSocialAction($row[2], $row[3], $socialIssue);
|
||||
|
||||
$goal = $this->handleGoal($row[4], $socialAction);
|
||||
|
||||
$result = $this->handleResult($row[5], $socialAction, $goal);
|
||||
|
||||
$eval = $this->handleEvaluation($row[6], $socialAction);
|
||||
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
|
||||
private function handleSocialIssue(?string $socialIssueTitle = null, ?string $socialIssueChildrenTitle = null): SocialIssue
|
||||
{
|
||||
if (null !== $socialIssueChildrenTitle) {
|
||||
/** @var SocialIssue $socialIssueChildren */
|
||||
$socialIssueChildren = $this->getOrCreateEntity($this->socialIssueRepository, 'title', ['fr' => $socialIssueChildrenTitle]);
|
||||
$socialIssueChildren->setTitle(['fr' => $socialIssueChildrenTitle]);
|
||||
|
||||
$this->entityManager->persist($socialIssueChildren);
|
||||
}
|
||||
|
||||
/** @var SocialIssue $socialIssue */
|
||||
$socialIssue = $this->getOrCreateEntity($this->socialIssueRepository, 'title', ['fr' => $socialIssueTitle]);
|
||||
$socialIssue->setTitle(['fr' => $socialIssueTitle]);
|
||||
|
||||
if (null !== $socialIssueChildrenTitle) {
|
||||
$socialIssue->addChild($socialIssueChildren);
|
||||
}
|
||||
|
||||
$this->entityManager->persist($socialIssue);
|
||||
|
||||
return null === $socialIssueChildrenTitle ? $socialIssue : $socialIssueChildren;
|
||||
}
|
||||
|
||||
private function handleSocialAction(?string $socialActionTitle, ?string $socialActionChildrenTitle, SocialIssue $socialIssue): SocialAction
|
||||
{
|
||||
if (null !== $socialActionChildrenTitle) {
|
||||
/** @var SocialAction $socialActionChildren */
|
||||
$socialActionChildren = $this->getOrCreateEntity($this->socialActionRepository, 'title', ['fr' => $socialActionChildrenTitle]);
|
||||
$socialActionChildren->setTitle(['fr' => $socialActionChildrenTitle]);
|
||||
|
||||
$this->entityManager->persist($socialActionChildren);
|
||||
}
|
||||
|
||||
/** @var SocialIssue $socialIssue */
|
||||
$socialAction = $this->getOrCreateEntity($this->socialActionRepository, 'title', ['fr' => $socialActionTitle]);
|
||||
$socialAction->setTitle(['fr' => $socialActionTitle]);
|
||||
|
||||
if (null !== $socialActionChildrenTitle) {
|
||||
$socialActionChildren->setIssue($socialIssue);
|
||||
$this->entityManager->persist($socialActionChildren);
|
||||
|
||||
$socialAction->addChild($socialActionChildren);
|
||||
} else {
|
||||
$socialAction->setIssue($socialIssue);
|
||||
}
|
||||
|
||||
$this->entityManager->persist($socialAction);
|
||||
|
||||
return null === $socialActionChildrenTitle ? $socialAction : $socialActionChildren;
|
||||
}
|
||||
|
||||
private function handleGoal(?string $goalTitle = null, ?SocialAction $socialAction = null): ?Goal
|
||||
{
|
||||
if (null === $goalTitle) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @var Goal $goal */
|
||||
$goal = $this->getOrCreateEntity($this->goalRepository, 'title', ['fr' => $goalTitle]);
|
||||
$goal->setTitle(['fr' => $goalTitle]);
|
||||
|
||||
if (null !== $socialAction) {
|
||||
$socialAction->addGoal($goal);
|
||||
$goal->addSocialAction($socialAction);
|
||||
|
||||
$this->entityManager->persist($socialAction);
|
||||
}
|
||||
|
||||
$this->entityManager->persist($goal);
|
||||
|
||||
return $goal;
|
||||
}
|
||||
|
||||
private function handleResult(?string $resultTitle = null, ?SocialAction $socialAction = null, ?Goal $goal = null): ?Result
|
||||
{
|
||||
if (null === $resultTitle) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @var Result $result */
|
||||
$result = $this->getOrCreateEntity($this->resultRepository, 'title', ['fr' => $resultTitle]);
|
||||
$result->setTitle(['fr' => $resultTitle]);
|
||||
|
||||
if (null !== $goal) {
|
||||
$result->addGoal($goal);
|
||||
$goal->addResult($result);
|
||||
|
||||
$this->entityManager->persist($goal);
|
||||
} else {
|
||||
$result->addSocialAction($socialAction);
|
||||
}
|
||||
|
||||
$result->addSocialAction($socialAction);
|
||||
$socialAction->addResult($result);
|
||||
|
||||
$this->entityManager->persist($result);
|
||||
$this->entityManager->persist($socialAction);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function handleEvaluation(?string $evaluationTitle, SocialAction $socialAction): ?Evaluation
|
||||
{
|
||||
if (null === $evaluationTitle) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @var Evaluation $eval */
|
||||
$eval = $this->getOrCreateEntity($this->evaluationRepository, 'title', ['fr' => $evaluationTitle]);
|
||||
$eval->setTitle(['fr' => $evaluationTitle]);
|
||||
$eval->setSocialAction($socialAction);
|
||||
|
||||
$this->entityManager->persist($eval);
|
||||
|
||||
return $eval;
|
||||
}
|
||||
|
||||
private function findByJson(ObjectRepository $repository, string $field, array $jsonCriterias): array
|
||||
{
|
||||
$qb = $this
|
||||
->entityManager
|
||||
->createQueryBuilder()
|
||||
->select('s')
|
||||
->from($repository->getClassName(), 's');
|
||||
|
||||
$expr = $qb->expr();
|
||||
|
||||
$temporaryJsonCriterias = $jsonParameters = [];
|
||||
|
||||
foreach ($jsonCriterias as $key => $value) {
|
||||
$temporaryJsonCriterias[] = [$field, $key, $value, sprintf(':placeholder_%s_%s', $field, $key)];
|
||||
}
|
||||
|
||||
$jsonParameters = array_reduce(
|
||||
$temporaryJsonCriterias,
|
||||
static function (array $carry, array $row): array
|
||||
{
|
||||
[,, $value, $placeholder] = $row;
|
||||
|
||||
return array_merge(
|
||||
$carry,
|
||||
[
|
||||
$placeholder => sprintf('"%s"', $value),
|
||||
]
|
||||
);
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
$jsonPredicates = array_map(
|
||||
static function (array $row) use ($expr): Comparison
|
||||
{
|
||||
[$field, $key,, $placeholder] = $row;
|
||||
|
||||
$left = sprintf(
|
||||
"GET_JSON_FIELD_BY_KEY(s.%s, '%s')",
|
||||
$field,
|
||||
$key
|
||||
);
|
||||
|
||||
return $expr
|
||||
->eq(
|
||||
$left,
|
||||
$placeholder
|
||||
);
|
||||
},
|
||||
$temporaryJsonCriterias
|
||||
);
|
||||
|
||||
$query = $qb
|
||||
->select('s')
|
||||
->where(...$jsonPredicates)
|
||||
->setParameters($jsonParameters)
|
||||
->getQuery();
|
||||
|
||||
return $query->getResult();
|
||||
}
|
||||
|
||||
private function getOrCreateEntity(ObjectRepository $repository, string $field, array $jsonCriterias = [])
|
||||
{
|
||||
$results = $this
|
||||
->findByJson(
|
||||
$repository,
|
||||
$field,
|
||||
$jsonCriterias
|
||||
);
|
||||
|
||||
switch (true) {
|
||||
case count($results) === 0:
|
||||
$entity = $repository->getClassName();
|
||||
$entity = new $entity();
|
||||
break;
|
||||
case count($results) === 1;
|
||||
$entity = current($results);
|
||||
break;
|
||||
case count($results) > 1;
|
||||
throw new Exception(
|
||||
sprintf(
|
||||
'More than one entity(%s) found.',
|
||||
$repository->getClassName()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return $entity;
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\PersonBundle\Service\Import;
|
||||
|
||||
interface SocialWorkMetadataInterface extends ChillImporter
|
||||
{
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* Copyright (C) 2014-2019, Champs Libres Cooperative SCRLFS,
|
||||
* Copyright (C) 2014-2019, Champs Libres Cooperative SCRLFS,
|
||||
* <http://www.champs-libres.coop>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@@ -25,7 +25,6 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper;
|
||||
use Symfony\Component\Templating\EngineInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Render a Person
|
||||
*
|
||||
@@ -35,7 +34,7 @@ class PersonRender extends AbstractChillEntityRender
|
||||
private ConfigPersonAltNamesHelper $configAltNamesHelper;
|
||||
|
||||
private EngineInterface $engine;
|
||||
|
||||
|
||||
public function __construct(
|
||||
ConfigPersonAltNamesHelper $configAltNamesHelper,
|
||||
EngineInterface $engine
|
||||
@@ -43,26 +42,40 @@ class PersonRender extends AbstractChillEntityRender
|
||||
$this->configAltNamesHelper = $configAltNamesHelper;
|
||||
$this->engine = $engine;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param Person $person
|
||||
* @param array $options
|
||||
* @return string
|
||||
*/
|
||||
public function renderBox($person, array $options): string
|
||||
{
|
||||
return $this->engine->render('@ChillPerson/Entity/person.html.twig',
|
||||
[
|
||||
$params = [
|
||||
'addAltNames' => $options['addAltNames'] ?? $this->configAltNamesHelper->hasAltNames(),
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addId' => $options['addId'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'addAge' => $options['addAge'] ?? false,
|
||||
'addCenter' => $options['addCenter'] ?? false,
|
||||
'address_multiline' => $options['address_multiline'] ?? false,
|
||||
'hLevel' => $options['hLevel'] ?? 3,
|
||||
'customButtons' => $options['customButtons'] ?? [],
|
||||
];
|
||||
|
||||
return
|
||||
$this->getDefaultOpeningBox('person') .
|
||||
$this->engine->render('@ChillPerson/Entity/person.html.twig', [
|
||||
'person' => $person,
|
||||
'addAltNames' => $this->configAltNamesHelper->hasAltNames(),
|
||||
'addLink' => $options['addLink'] ?? false
|
||||
]
|
||||
);
|
||||
'render' => $options['render'] ?? 'raw',
|
||||
'options' => $params
|
||||
]) .
|
||||
$this->getDefaultClosingBox();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param Person $person
|
||||
* @param array $options
|
||||
* @return string
|
||||
@@ -73,10 +86,10 @@ class PersonRender extends AbstractChillEntityRender
|
||||
.$this->addAltNames($person, false);
|
||||
}
|
||||
|
||||
protected function addAltNames(Person $person, bool $addSpan)
|
||||
protected function addAltNames(Person $person, bool $addSpan): string
|
||||
{
|
||||
$str = '';
|
||||
|
||||
|
||||
if ($this->configAltNamesHelper->hasAltNames()) {
|
||||
$altNames = $this->configAltNamesHelper->getChoices();
|
||||
$isFirst = true;
|
||||
@@ -91,21 +104,21 @@ class PersonRender extends AbstractChillEntityRender
|
||||
$str.= " ";
|
||||
}
|
||||
if ($addSpan) {
|
||||
$str .= '<span class="chill-entity__person__alt-name chill-entity__person__altname--'.$altName->getKey().'">';
|
||||
$str .= '<span class="altname altname-'.$altName->getKey().'">';
|
||||
}
|
||||
$str .= $altName->getLabel();
|
||||
|
||||
|
||||
if ($addSpan) {
|
||||
$str .= "</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$isFirst) {
|
||||
$str .= ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// this file loads all assets from the Chill person bundle
|
||||
module.exports = function(encore, entries)
|
||||
{
|
||||
entries.push(__dirname + '/Resources/public/index.js');
|
||||
entries.push(__dirname + '/Resources/public/chill/index.js');
|
||||
|
||||
// Aliases are used when webpack is trying to resolve modules path
|
||||
encore.addAliases({
|
||||
@@ -13,8 +13,7 @@ module.exports = function(encore, entries)
|
||||
encore.addEntry('vue_accourse', __dirname + '/Resources/public/vuejs/AccompanyingCourse/index.js');
|
||||
encore.addEntry('vue_accourse_work_create', __dirname + '/Resources/public/vuejs/AccompanyingCourseWorkCreate/index.js');
|
||||
encore.addEntry('vue_accourse_work_edit', __dirname + '/Resources/public/vuejs/AccompanyingCourseWorkEdit/index.js');
|
||||
|
||||
encore.addEntry('vue_accourse_work_list', __dirname + '/Resources/public/modules/accompanying_course_work_list/index.js'); // why in modules ?
|
||||
encore.addEntry('household_edit_metadata', __dirname + '/Resources/public/modules/household_edit_metadata/index.js');
|
||||
encore.addEntry('person', __dirname + '/Resources/public/js/person.js');
|
||||
|
||||
encore.addEntry('page_household_edit_metadata', __dirname + '/Resources/public/page/household_edit_metadata/index.js');
|
||||
encore.addEntry('page_person', __dirname + '/Resources/public/page/person/index.js');
|
||||
};
|
||||
|
@@ -6,12 +6,24 @@ services:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Chill\PersonBundle\Service\:
|
||||
resource: '../Service/'
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
|
||||
Chill\PersonBundle\Serializer\Normalizer\:
|
||||
resource: '../Serializer/Normalizer/'
|
||||
autowire: true
|
||||
tags:
|
||||
- { name: 'serializer.normalizer', priority: 64 }
|
||||
|
||||
Chill\PersonBundle\Command\:
|
||||
resource: '../Command/'
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
chill.person.form.type.select2maritalstatus:
|
||||
class: Chill\PersonBundle\Form\Type\Select2MaritalStatusType
|
||||
arguments:
|
||||
@@ -49,7 +61,7 @@ services:
|
||||
tags:
|
||||
- { name: security.voter }
|
||||
- { name: chill.role }
|
||||
|
||||
|
||||
chill.person.birthdate_validation:
|
||||
class: Chill\PersonBundle\Validator\Constraints\BirthdateValidator
|
||||
arguments:
|
||||
|
@@ -1,19 +0,0 @@
|
||||
services:
|
||||
Chill\PersonBundle\Command\ChillPersonMoveCommand:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$mover: '@Chill\PersonBundle\Actions\Remove\PersonMove'
|
||||
$chillLogger: '@chill.main.logger'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
Chill\PersonBundle\Command\ImportPeopleFromCSVCommand:
|
||||
arguments:
|
||||
$logger: '@logger'
|
||||
$helper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$customFieldProvider: '@Chill\CustomFieldsBundle\Service\CustomFieldProvider'
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
$formFactory: '@form.factory'
|
||||
tags:
|
||||
- { name: console.command }
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Person;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20210623142046 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_action ALTER defaultnotificationdelay DROP NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_action ALTER defaultNotificationDelay SET NOT NULL');
|
||||
}
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Person;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20210624131722 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay DROP NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER delay SET NOT NULL');
|
||||
}
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\Migrations\Person;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20210624131723 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay DROP NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('ALTER TABLE chill_person_social_work_evaluation ALTER notificationdelay SET NOT NULL');
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ nationality: nationalité
|
||||
'Without nationality': 'Sans nationalité'
|
||||
Gender: Genre
|
||||
gender: genre
|
||||
Gender comment: Remarque sur le genre
|
||||
Gender comment: Remarques sur le genre
|
||||
'Creation date': 'Date d''ouverture'
|
||||
'Not given': 'Non renseigné'
|
||||
'Place of birth': 'Lieu de naissance'
|
||||
@@ -34,7 +34,7 @@ countryOfBirth: 'Pays de naissance'
|
||||
'Unknown country of birth': 'Pays inconnu'
|
||||
'Marital status': 'État civil'
|
||||
Date of last marital status change: État civil depuis le
|
||||
Comment on the marital status: Commentaires sur l'état civil
|
||||
Comment on the marital status: Remarques sur l'état civil
|
||||
'Number of children': 'Nombre d''enfants'
|
||||
'{0} No child|{1} One child | ]1,Inf] %nb% children': '{0} Aucun enfant|{1} Un enfant | ]1,Inf] %nb% enfants'
|
||||
'National number': 'Numéro national'
|
||||
@@ -119,6 +119,7 @@ address_country_code: Code pays
|
||||
|
||||
'Alreay existing person': 'Dossiers déjà encodés'
|
||||
'Add the person': 'Ajouter la personne'
|
||||
Show person: Voir le dossier de la personne
|
||||
'Confirm the creation': 'Confirmer la création'
|
||||
'You will create this person': 'Vous allez créer le dossier suivant'
|
||||
Return: Retour
|
||||
@@ -135,7 +136,7 @@ Reset: 'Remise à zéro'
|
||||
'Person search results': 'Recherche de personnes'
|
||||
Person search results by phonenumber: Recherche de personnes par numéro de téléphone
|
||||
'Search within persons': 'Recherche parmi les personnes'
|
||||
Open person file: Ouvrir
|
||||
Open person file: Ouvrir le dossier de la personne
|
||||
and %number% other: '{0} et aucun autre| {1} et une autre |]1, Inf] et %number% autres'
|
||||
'%total% persons matching the search pattern:': '{0} Aucune personne ne correspond aux termes de recherche : | {1} Une personne a été trouvée par la recherche : | ]1,Inf] %total% personnes correspondent aux termes de recherche :'
|
||||
'Last opening since %last_opening%': 'Dernière ouverture le %last_opening%.'
|
||||
@@ -191,7 +192,9 @@ Social issues: Problématiques sociales
|
||||
Last events on accompanying course: Dernières actions de suivi
|
||||
Edit & activate accompanying course: Modifier et valider
|
||||
See accompanying periods: Voir les périodes d'accompagnement
|
||||
See accompanying period: Voir cette période d'accompagnement
|
||||
See accompanying period: Voir la période
|
||||
Edit accompanying period: Modifier la période
|
||||
See this period: Voir cette période
|
||||
Referrer: Référent
|
||||
Some peoples does not belong to any household currently. Add them to an household soon: Certaines personnes n'appartiennent à aucun ménage actuellement. Renseignez leur appartenance à un ménage dès que possible.
|
||||
Add to household now: Ajouter à un ménage
|
||||
@@ -351,6 +354,8 @@ Addresses history for household: Historique des adresses
|
||||
Household accompanying period: Parcours d'accompagnement du ménage
|
||||
Household summary: Résumé du ménage
|
||||
Edit household address: Modifier l'adresse du ménage
|
||||
Show household: Voir le ménage
|
||||
Back to household: Revenir au ménage
|
||||
|
||||
# accompanying course work
|
||||
Accompanying Course Actions: Actions d'accompagnements
|
||||
@@ -368,3 +373,8 @@ accompanying_course_work:
|
||||
results: Résultats - orientations
|
||||
goal: Objectif - motif - dispositif
|
||||
Any work: Aucune action d'accompagnement
|
||||
|
||||
#
|
||||
Person addresses: Adresses de résidence
|
||||
Household addresses: Adresses de domicile
|
||||
Insert an address: Insérer une adresse
|
||||
|
Reference in New Issue
Block a user