mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'VSR-issues' into 'master'
VSR issues See merge request Chill-Projet/chill-bundles!471
This commit is contained in:
commit
f9b151e4db
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@ composer
|
||||
composer.phar
|
||||
composer.lock
|
||||
docs/build/
|
||||
node_modules/*
|
||||
.php_cs.cache
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
|
@ -50,7 +50,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
{
|
||||
$where = $qb->getDQLPart('where');
|
||||
$join = $qb->getDQLPart('join');
|
||||
$clause = $qb->expr()->in('reasons', ':selected_activity_reasons');
|
||||
$clause = $qb->expr()->in('actreasons', ':selected_activity_reasons');
|
||||
|
||||
if (!in_array('actreasons', $qb->getAllAliases(), true)) {
|
||||
$qb->join('activity.reasons', 'actreasons');
|
||||
@ -77,6 +77,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt
|
||||
'class' => ActivityReason::class,
|
||||
'choice_label' => fn (ActivityReason $reason) => $this->translatableStringHelper->localize($reason->getName()),
|
||||
'group_by' => fn (ActivityReason $reason) => $this->translatableStringHelper->localize($reason->getCategory()->getName()),
|
||||
'attr' => ['class' => 'select2 '],
|
||||
'multiple' => true,
|
||||
'expanded' => false,
|
||||
]);
|
||||
|
@ -36,7 +36,6 @@ final class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 5000,
|
||||
'icons' => ['exchange'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Activity Reasons', [
|
||||
|
@ -156,7 +156,7 @@
|
||||
<dd>
|
||||
<section class="chill-entity entity-comment-embeddable">
|
||||
<blockquote class="chill-user-quote private-quote">
|
||||
{{ entity.privateComment.comments[userId] }}
|
||||
{{ entity.privateComment.comments[userId]|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</section>
|
||||
</dd>
|
||||
@ -172,7 +172,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
</dd>
|
||||
{% endif %}
|
||||
|
@ -12,8 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\AsideActivityBundle\Form;
|
||||
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivity;
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
|
||||
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
|
||||
use Chill\AsideActivityBundle\Form\Type\PickAsideActivityCategoryType;
|
||||
use Chill\MainBundle\Form\Type\ChillDateType;
|
||||
use Chill\MainBundle\Form\Type\ChillTextareaType;
|
||||
use Chill\MainBundle\Form\Type\PickUserDynamicType;
|
||||
@ -21,8 +20,6 @@ use DateInterval;
|
||||
use DateTime;
|
||||
use DateTimeImmutable;
|
||||
use DateTimeZone;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\DataTransformer\DateTimeToTimestampTransformer;
|
||||
@ -37,20 +34,16 @@ use function in_array;
|
||||
|
||||
final class AsideActivityFormType extends AbstractType
|
||||
{
|
||||
private CategoryRender $categoryRender;
|
||||
|
||||
private TokenStorageInterface $storage;
|
||||
|
||||
private array $timeChoices;
|
||||
|
||||
public function __construct(
|
||||
ParameterBagInterface $parameterBag,
|
||||
TokenStorageInterface $storage,
|
||||
CategoryRender $categoryRender
|
||||
TokenStorageInterface $storage
|
||||
) {
|
||||
$this->timeChoices = $parameterBag->get('chill_aside_activity.form.time_duration');
|
||||
$this->storage = $storage;
|
||||
$this->categoryRender = $categoryRender;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
@ -81,28 +74,10 @@ final class AsideActivityFormType extends AbstractType
|
||||
'required' => true,
|
||||
]
|
||||
)
|
||||
->add(
|
||||
'type',
|
||||
EntityType::class,
|
||||
[
|
||||
'label' => 'Type',
|
||||
'required' => true,
|
||||
'class' => AsideActivityCategory::class,
|
||||
'placeholder' => 'Choose the activity category',
|
||||
'query_builder' => static function (EntityRepository $er) {
|
||||
$qb = $er->createQueryBuilder('ac');
|
||||
$qb->where($qb->expr()->eq('ac.isActive', 'TRUE'))
|
||||
->addOrderBy('ac.ordering', 'ASC');
|
||||
|
||||
return $qb;
|
||||
},
|
||||
'choice_label' => function (AsideActivityCategory $asideActivityCategory) {
|
||||
$options = [];
|
||||
|
||||
return $this->categoryRender->renderString($asideActivityCategory, $options);
|
||||
},
|
||||
]
|
||||
)
|
||||
->add('type', PickAsideActivityCategoryType::class, [
|
||||
'label' => 'Type',
|
||||
'required' => true,
|
||||
])
|
||||
->add('duration', ChoiceType::class, $durationTimeOptions)
|
||||
->add('note', ChillTextareaType::class, [
|
||||
'label' => 'Note',
|
||||
|
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\AsideActivityBundle\Form\Type;
|
||||
|
||||
use Chill\AsideActivityBundle\Entity\AsideActivityCategory;
|
||||
use Chill\AsideActivityBundle\Templating\Entity\CategoryRender;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
final class PickAsideActivityCategoryType extends AbstractType
|
||||
{
|
||||
private CategoryRender $categoryRender;
|
||||
|
||||
public function __construct(
|
||||
CategoryRender $categoryRender
|
||||
) {
|
||||
$this->categoryRender = $categoryRender;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
$resolver
|
||||
->setDefaults([
|
||||
'class' => AsideActivityCategory::class,
|
||||
'placeholder' => 'Choose the activity category',
|
||||
'query_builder' => static function (EntityRepository $er) {
|
||||
$qb = $er->createQueryBuilder('ac');
|
||||
$qb->where($qb->expr()->eq('ac.isActive', 'TRUE'))
|
||||
->addOrderBy('ac.ordering', 'ASC');
|
||||
|
||||
return $qb;
|
||||
},
|
||||
'choice_label' => function (AsideActivityCategory $asideActivityCategory) {
|
||||
$options = [];
|
||||
|
||||
return $this->categoryRender->renderString($asideActivityCategory, $options);
|
||||
},
|
||||
'attr' => ['class' => 'select2'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParent(): string
|
||||
{
|
||||
return EntityType::class;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<div class="{% block crud_content_main_div_class %}col-10 centered{% endblock %}">
|
||||
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': 'Aside Activity' }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
@ -27,4 +27,4 @@
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
|
||||
|
@ -87,5 +87,5 @@
|
||||
</li>
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends '@ChillMain/Admin/layout.html.twig' %}
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
@ -14,7 +14,7 @@
|
||||
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block admin_content %}
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% block content_form_actions_save_and_show %}{% endblock %}
|
||||
{% endembed %}
|
||||
|
@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 6000,
|
||||
'icons' => ['calendar'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Cancel reason', [
|
||||
|
@ -3,7 +3,7 @@
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
|
||||
<div class="accompanying_course_work-list">
|
||||
<div class="accompanying-course-work">
|
||||
<table class="obj-res-eval my-3">
|
||||
<thead>
|
||||
<th class="eval">
|
||||
|
@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 4500,
|
||||
'icons' => ['plus'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Custom fields group', [
|
||||
|
@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 4000,
|
||||
'icons' => ['file-pdf-o'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Document category list', [
|
||||
|
@ -6,7 +6,7 @@
|
||||
{{ 'workflow.Document deleted'|trans }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="flex-table accompanying-course-work">
|
||||
<div class="item-bloc document-item bg-chill-llight-gray">
|
||||
<div class="row justify-content-center my-4">
|
||||
<div class="col-2">
|
||||
@ -22,7 +22,6 @@
|
||||
{{ document.description }}
|
||||
</blockquote>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,3 +13,19 @@
|
||||
{{ 'Download'|trans }}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro download_button_small(storedObject, filename = null) %}
|
||||
{% if storedObject is null %}
|
||||
<!-- No document to download -->
|
||||
{% else %}
|
||||
<a class="btn btn-sm btn-download"
|
||||
data-label-preparing="{{ ('Preparing'|trans ~ '...')|escape('html_attr') }}"
|
||||
data-label-ready="{{ 'Ready to show'|trans|escape('html_attr') }}"
|
||||
data-download-button
|
||||
data-key="{{ storedObject.keyInfos|json_encode|escape('html_attr') }}"
|
||||
data-iv="{{ storedObject.iv|json_encode|escape('html_attr') }}"
|
||||
data-temp-url-get-generator="{{ storedObject|generate_url|escape('html_attr') }}"
|
||||
data-mime-type="{{ storedObject.type|escape('html_attr') }}" {% if filename is not null %}data-filename="{{ filename|escape('html_attr') }}"{% endif %}>
|
||||
{{ 'Download'|trans }}</a>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
@ -48,8 +48,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<div class="metadata">
|
||||
<span class="metadata">
|
||||
<i class="fa {{ icon }} fa-lg me-1"></i>
|
||||
{{ label|capitalize }}
|
||||
</div>
|
||||
</span>
|
||||
{% endmacro %}
|
@ -14,7 +14,7 @@ Edit attributes: Modifier les propriétés du document
|
||||
Existing document: Document existant
|
||||
No document to download: Aucun document à télécharger
|
||||
'Choose a document category': Choisissez une catégorie de document
|
||||
Any document found: Aucun document trouvé
|
||||
No document found: Aucun document trouvé
|
||||
The document is successfully registered: Le document est enregistré
|
||||
The document is successfully updated: Le document est mis à jour
|
||||
Any description: Aucune description
|
||||
|
25
src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
Normal file
25
src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
class ScopeApiController extends ApiController
|
||||
{
|
||||
protected function customizeQuery(string $action, Request $request, $query): void
|
||||
{
|
||||
if ('_index' === $action) {
|
||||
$query->andWhere($query->expr()->eq('e.active', "'TRUE'"));
|
||||
}
|
||||
}
|
||||
}
|
@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Pagination\PaginatorInterface;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -70,4 +71,13 @@ class UserApiController extends ApiController
|
||||
$query->andWhere($query->expr()->eq('e.enabled', "'TRUE'"));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $query
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator, $_format)
|
||||
{
|
||||
return $query->orderBy('e.label', 'ASC');
|
||||
}
|
||||
}
|
||||
|
@ -655,6 +655,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
[
|
||||
'class' => \Chill\MainBundle\Entity\Scope::class,
|
||||
'controller' => \Chill\MainBundle\Controller\ScopeApiController::class,
|
||||
'name' => 'scope',
|
||||
'base_path' => '/api/1.0/main/scope',
|
||||
'base_role' => 'ROLE_USER',
|
||||
|
@ -13,6 +13,7 @@ namespace Chill\MainBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Form\Type\TranslatableStringFormType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
@ -21,7 +22,12 @@ class ScopeType extends AbstractType
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('name', TranslatableStringFormType::class);
|
||||
->add('name', TranslatableStringFormType::class)
|
||||
->add('active', ChoiceType::class, [
|
||||
'choices' => [
|
||||
'Active' => true,
|
||||
'Inactive' => false,
|
||||
], ]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -221,12 +221,8 @@ footer.footer {
|
||||
*/
|
||||
|
||||
div.admin {
|
||||
flex-direction: row-reverse;
|
||||
div.vertical-menu {
|
||||
font-size: 0.9em;
|
||||
.list-group-item {
|
||||
padding: 0.3rem 0.7rem;
|
||||
}
|
||||
.list-group-item {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -307,12 +303,12 @@ table.table-bordered {
|
||||
/// meta-data
|
||||
div.createdBy,
|
||||
div.updatedBy,
|
||||
div.metadata {
|
||||
.metadata {
|
||||
span.user, span.date {
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
}
|
||||
div.metadata {
|
||||
.metadata {
|
||||
font-size: smaller;
|
||||
color: $gray-600;
|
||||
span.user, span.date {
|
||||
@ -368,6 +364,19 @@ div#flashMessages {
|
||||
}
|
||||
}
|
||||
|
||||
/// unbullet lists
|
||||
ul.unbullet {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
/// libellé
|
||||
span.dt {
|
||||
font-size: 90%;
|
||||
font-weight: bolder;
|
||||
background-color: var(--bs-chill-light-gray);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* SPECIFIC RULES
|
||||
*/
|
||||
|
@ -106,18 +106,5 @@ section.chill-entity {
|
||||
// used for comment-embeddable
|
||||
&.entity-comment-embeddable {
|
||||
width: 100%;
|
||||
|
||||
/* already defined !!
|
||||
div.metadata {
|
||||
font-size: smaller;
|
||||
color: $gray-600;
|
||||
span.user, span.date {
|
||||
text-decoration: underline dotted;
|
||||
&:hover {
|
||||
color: $gray-700;
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
@ -48,33 +48,35 @@
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<div class="mt-4" v-else>
|
||||
<suggest-pane v-if="flag.suggestPane"
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress">
|
||||
<template v-else>
|
||||
<div v-if="flag.suggestPane" class="mt-4 flex-grow-1">
|
||||
<suggest-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
@pick-address="this.pickAddress"
|
||||
ref="suggestAddress">
|
||||
|
||||
<template v-slot:before v-if="!bypassFirstStep">
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button @click="openEditPane"
|
||||
class="btn btn-create">
|
||||
{{ $t('create_a_new_address')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
<template v-slot:before v-if="!bypassFirstStep">
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button @click="openEditPane"
|
||||
class="btn btn-create">
|
||||
{{ $t('create_a_new_address')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
</suggest-pane>
|
||||
</div>
|
||||
</suggest-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- step 2 -->
|
||||
<teleport to="body" v-if="inModal">
|
||||
@ -118,40 +120,42 @@
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<div class="mt-4" v-else>
|
||||
<edit-pane v-if="flag.editPane"
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:errors="this.errors"
|
||||
v-bind:checkErrors="this.checkErrors"
|
||||
v-bind:insideModal="false"
|
||||
@getCities="getCities"
|
||||
@getReferenceAddresses="getReferenceAddresses">
|
||||
<template v-else>
|
||||
<div v-if="flag.editPane" class="mt-4 flex-grow-1">
|
||||
<edit-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:errors="this.errors"
|
||||
v-bind:checkErrors="this.checkErrors"
|
||||
v-bind:insideModal="false"
|
||||
@getCities="getCities"
|
||||
@getReferenceAddresses="getReferenceAddresses">
|
||||
|
||||
<template v-slot:before>
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li v-if="!this.context.edit && this.useDatePane">
|
||||
<button class="btn btn-update change-icon" @click="closeEditPane">
|
||||
{{ $t('nav.next')}}
|
||||
<i class="fa fa-fw fa-arrow-right"></i>
|
||||
</button>
|
||||
</li>
|
||||
<li v-else>
|
||||
<button class="btn btn-save" @click="closeEditPane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
<template v-slot:before>
|
||||
<a class="btn btn-cancel" @click="resetPane">
|
||||
{{ $t('action.cancel') }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li v-if="!this.context.edit && this.useDatePane">
|
||||
<button class="btn btn-update change-icon" @click="closeEditPane">
|
||||
{{ $t('nav.next')}}
|
||||
<i class="fa fa-fw fa-arrow-right"></i>
|
||||
</button>
|
||||
</li>
|
||||
<li v-else>
|
||||
<button class="btn btn-save" @click="closeEditPane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
</edit-pane>
|
||||
</div>
|
||||
</edit-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- step 3 -->
|
||||
<teleport to="body" v-if="inModal">
|
||||
@ -192,32 +196,34 @@
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<div class="mt-4" v-else>
|
||||
<date-pane v-if="flag.datePane"
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
ref="dateAddress">
|
||||
<template v-else>
|
||||
<div v-if="flag.datePane" class="mt-4 flex-grow-1">
|
||||
<date-pane
|
||||
v-bind:context="this.context"
|
||||
v-bind:options="this.options"
|
||||
v-bind:defaultz="this.defaultz"
|
||||
v-bind:entity="this.entity"
|
||||
v-bind:flag="this.flag"
|
||||
v-bind:insideModal="false"
|
||||
ref="dateAddress">
|
||||
|
||||
<template v-slot:before>
|
||||
<button class="btn btn-misc" @click="openEditPane">
|
||||
<i class="fa fa-fw fa-arrow-left"></i>
|
||||
{{ $t('nav.previous')}}
|
||||
</button>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button class="btn btn-save" @click="closeDatePane">
|
||||
{{ $t('action.save')}}
|
||||
<template v-slot:before>
|
||||
<button class="btn btn-misc" @click="openEditPane">
|
||||
<i class="fa fa-fw fa-arrow-left"></i>
|
||||
{{ $t('nav.previous')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
<template v-slot:action>
|
||||
<li>
|
||||
<button class="btn btn-save" @click="closeDatePane">
|
||||
{{ $t('action.save')}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
</date-pane>
|
||||
</div>
|
||||
</date-pane>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
|
@ -98,6 +98,11 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (typeof this.value.point !== 'undefined') {
|
||||
this.updateMapCenter(this.value.point);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
transName(value) {
|
||||
return value.streetNumber === undefined ? value.street : `${value.streetNumber}, ${value.street}`
|
||||
|
@ -187,6 +187,7 @@ div.address-form {
|
||||
div#address_map {
|
||||
height: 400px;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<div v-if="!onlyButton">
|
||||
<div v-if="!onlyButton" class="mt-4 flex-grow-1">
|
||||
<div class="loading">
|
||||
<i v-if="flag.loading" class="fa fa-circle-o-notch fa-spin fa-2x fa-fw"></i>
|
||||
<span class="sr-only">{{ $t('loading') }}</span>
|
||||
@ -37,12 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="this.context.edit" class="mb-3 row">
|
||||
<div class="col-sm-4"></div>
|
||||
<div class="address-container col-sm-8">
|
||||
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||
</div>
|
||||
</div>
|
||||
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||
|
||||
<div v-if="this.context.target.name === 'household' || this.context.edit">
|
||||
<action-buttons
|
||||
@ -50,7 +45,7 @@
|
||||
:defaultz="this.defaultz">
|
||||
<template v-slot:action>
|
||||
<button @click.prevent="$emit('openEditPane')"
|
||||
class="btn btn-sm" :class="getClassButton"
|
||||
class="btn" :class="getClassButton"
|
||||
type="button" name="button" :title="$t(getTextButton)">
|
||||
<span v-if="displayTextButton">{{ $t(getTextButton) }}</span>
|
||||
</button>
|
||||
@ -58,10 +53,6 @@
|
||||
</action-buttons>
|
||||
</div>
|
||||
|
||||
<div v-if="!this.context.edit">
|
||||
<address-render-box :address="address" :isMultiline="false" :useDatePane="useDatePane"></address-render-box>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="onlyButton">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="accompanying_course_work">
|
||||
<div class="accompanying-course-work">
|
||||
<div class="alert alert-light">{{ $t('my_evaluations.description') }}</div>
|
||||
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||
<tab-table v-else>
|
||||
|
@ -1,6 +1,6 @@
|
||||
// CURRENTLY NOT IN USE
|
||||
<template>
|
||||
<div class="accompanying_course_work">
|
||||
<div class="accompanying-course-work">
|
||||
<div class="alert alert-light">{{ $t('my_works.description') }}</div>
|
||||
<span v-if="noResults" class="chill-no-data-statement">{{ $t('no_data') }}</span>
|
||||
<tab-table v-else>
|
||||
|
@ -29,9 +29,14 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% block admin_content %}
|
||||
<!-- block admin content empty -->
|
||||
{% endblock %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-10 col-xxl">
|
||||
{% block admin_content %}
|
||||
<!-- block admin content empty -->
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
{% block vertical_menu_content %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="{% block crud_content_main_div_class %}col-10 centered{% endblock %}">
|
||||
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
@ -34,4 +34,4 @@
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set formId = crudMainFormId|default('crud_main_form') %}
|
||||
<div class="{% block crud_content_main_div_class %}col-10 centered{% endblock %}">
|
||||
{% set formId = crudMainFormId|default('crud_main_form') %}
|
||||
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_edit')|trans }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
@ -64,4 +64,4 @@
|
||||
{% endblock %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
<div class="col-10 centered">
|
||||
|
||||
{% block index_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}</h1>
|
||||
{% endblock index_header %}
|
||||
@ -16,7 +14,7 @@
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% block table_entities %}
|
||||
<table>
|
||||
<table class="table table-bordered border-dark">
|
||||
<thead>
|
||||
<tr>
|
||||
{% block table_entities_thead_tr %}
|
||||
@ -54,4 +52,3 @@
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
{% set formId = crudMainFormId|default('crud_main_form') %}
|
||||
<div class="{% block crud_content_main_div_class %}col-10 centered{% endblock %}">
|
||||
{% set formId = crudMainFormId|default('crud_main_form') %}
|
||||
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
@ -52,4 +52,4 @@
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="{% block crud_content_main_div_class %}col-10 centered{% endblock %}">
|
||||
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
@ -60,4 +60,4 @@
|
||||
{% endblock crud_content_view_actions %}
|
||||
|
||||
{% endblock crud_content_view %}
|
||||
</div>
|
||||
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
@ -16,5 +14,10 @@
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'btn btn-update' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
{% endblock %}
|
||||
|
@ -1,39 +1,50 @@
|
||||
{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'Center list'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'Center list'|trans }}</h1>
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.name }}</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% block index_header %}
|
||||
<h1>{{ 'Center list'|trans }}</h1>
|
||||
{% endblock %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_new') }}" class="btn btn-create">{{ 'Create a new center'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% block filter_order %}{% endblock %}
|
||||
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>id</th>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.name }}</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_center_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination %}{% endblock %}
|
||||
|
||||
{% block list_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_center_new') }}" class="btn btn-create">{{ 'Create a new center'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
@ -7,8 +7,6 @@
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
|
||||
{{ form_end(form) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
@ -16,5 +14,10 @@
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-save' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -7,8 +7,7 @@
|
||||
|
||||
{{ form_start(edit_form) }}
|
||||
{{ form_row(edit_form.name) }}
|
||||
{{ form_row(edit_form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
|
||||
{{ form_end(edit_form) }}
|
||||
{{ form_row(edit_form.active) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
@ -16,5 +15,11 @@
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(edit_form.submit, { 'attr' : { 'class' : 'btn btn-update' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{ form_end(edit_form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,39 +1,58 @@
|
||||
{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block title %}{{ 'List circles'|trans }}{% endblock %}
|
||||
|
||||
{% block admin_content -%}
|
||||
<h1>{{ 'List circles'|trans }}</h1>
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
|
||||
<table class="records_list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% block index_header %}
|
||||
<h1>{{ 'List circles'|trans }}</h1>
|
||||
{% endblock %}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% block filter_order %}{% endblock %}
|
||||
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>id</th>
|
||||
<th>{{ 'Name'|trans }}</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
<td>{{ entity.name|localize_translatable_string }}</td>
|
||||
<td style="text-align:center;">
|
||||
{%- if entity.active -%}
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
{%- else -%}
|
||||
<i class="fa fa-square-o"></i>
|
||||
{%- endif -%}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_edit', { 'id': entity.id }) }}" class="btn btn-edit">{{ 'edit'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
{% block pagination %}{% endblock %}
|
||||
|
||||
{% block list_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('admin_scope_new') }}" class="btn btn-create">{{ 'Create a new circle'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
@ -7,8 +7,7 @@
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_row(form.name) }}
|
||||
{{ form_row(form.submit, { 'attr' : { 'class' : 'btn btn-chill-green' } } ) }}
|
||||
{{ form_end(form) }}
|
||||
{{ form_row(form.active) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
@ -16,5 +15,9 @@
|
||||
{{ 'Back to the list'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
{{ form_widget(form.submit, { 'attr' : { 'class' : 'btn btn-save' }}) }}
|
||||
</li>
|
||||
</ul>
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
|
@ -1,83 +1,99 @@
|
||||
{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %}
|
||||
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
||||
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
|
||||
<h1>{{"Users"|trans}}</h1>
|
||||
{% block index_header %}
|
||||
<h1>{{"Users"|trans}}</h1>
|
||||
{% endblock %}
|
||||
|
||||
{{ filter_order|chill_render_filter_order_helper }}
|
||||
{% block filter_order %}{{ filter_order|chill_render_filter_order_helper }}{% endblock %}
|
||||
|
||||
{% for entity in entities %}
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
{% if entity.civility is not null %}
|
||||
{% if entity.civility.name|length > 0 %}
|
||||
{{ entity.civility.name|first }}
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Username'|trans }}</th>
|
||||
<th>{{ 'Datas'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if entity.isEnabled %}
|
||||
<i class="fa fa-check-square-o"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-square-o"></i>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{{ entity.label }}
|
||||
{% if entity.isEnabled %}
|
||||
<i class="fa fa-check chill-green"></i>
|
||||
{% else %}
|
||||
<i class="fa fa-times chill-red"></i>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="item-col"><i>{{ entity.email }}</i></div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
login: {{ entity.username|e('html_attr') }}
|
||||
</div>
|
||||
<div class="item-col">
|
||||
{% if entity.userJob %}
|
||||
{{ entity.userJob.label|localize_translatable_string }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
{% if entity.mainScope %}
|
||||
{{ entity.mainScope.name|localize_translatable_string }}
|
||||
{% endif %}
|
||||
{% if entity.mainCenter %}
|
||||
, {{ entity.mainCenter.name }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-row">
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-edit" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
</td>
|
||||
<td>
|
||||
{#
|
||||
{% if entity.civility is not null %}
|
||||
{% if entity.civility.name|length > 0 %}
|
||||
{{ entity.civility.name|first }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
#}
|
||||
{{ entity.label }}
|
||||
</td>
|
||||
<td>
|
||||
<ul class="unbullet">
|
||||
<li>
|
||||
<span class="dt">login:</span>
|
||||
{{ entity.username|e('html_attr') }}
|
||||
</li>
|
||||
<li>
|
||||
<span class="dt">email:</span>
|
||||
{{ entity.email }}
|
||||
</li>
|
||||
<li>
|
||||
<span class="dt">métier:</span>
|
||||
{% if entity.userJob %}{{ entity.userJob.label|localize_translatable_string }}{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
<span class="dt">cercle/centre:</span>
|
||||
{% if entity.mainScope %}
|
||||
{{ entity.mainScope.name|localize_translatable_string }}
|
||||
{% endif %}
|
||||
{% if entity.mainCenter %}, {{ entity.mainCenter.name }}{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td>
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}" href="{{ path('chill_crud_admin_user_edit', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
|
||||
{% if allow_change_password is same as(true) %}
|
||||
<li>
|
||||
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if allow_change_password is same as(true) %}
|
||||
<li>
|
||||
<a class="btn btn-chill-red" href="{{ path('admin_user_edit_password', { 'id' : entity.id }) }}" title="{{ 'Edit password'|trans|e('html_attr') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||
<li>
|
||||
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if is_granted('ROLE_ALLOWED_TO_SWITCH') %}
|
||||
<li>
|
||||
<a class="btn btn-chill-blue" href="{{ path('chill_main_homepage', {'_switch_user': entity.username }) }}" title="{{ "Impersonate"|trans|e('html_attr') }}"><i class="fa fa-user-secret"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% block pagination %}{{ chill_pagination(paginator) }}{% endblock %}
|
||||
|
||||
{{ chill_pagination(paginator) }}
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_admin_user_new') }}" class="btn btn-create">{{ 'Create'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% block list_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class='cancel'>
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('chill_crud_admin_user_new') }}" class="btn btn-create">{{ 'Create'|trans }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
@ -2,12 +2,14 @@
|
||||
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>id</th>
|
||||
<th>{{ 'label'|trans }}</th>
|
||||
<th>{{ 'active'|trans }}</th>
|
||||
<th> </th>
|
||||
<th>{{ 'Label'|trans }}</th>
|
||||
<th>{{ 'Active'|trans }}</th>
|
||||
<th>{{ 'Actions'|trans }}</th>
|
||||
{% endblock %}
|
||||
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
@ -36,5 +38,6 @@
|
||||
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
|
||||
{% endembed %}
|
||||
{% endblock %}
|
||||
|
@ -1,4 +1,7 @@
|
||||
{# TODO Adapt condition #}
|
||||
{# TODO
|
||||
Check if this template is used
|
||||
Adapt condition or Delete it
|
||||
#}
|
||||
{% if random(1) == 0 %}
|
||||
|
||||
{# For a document #}
|
||||
@ -22,7 +25,7 @@
|
||||
{# For an action #}
|
||||
<h2>{{ 'Accompanying Course Action'|trans ~ 'target'|trans }}</h2>
|
||||
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="flex-table accompanying-course-work">
|
||||
{# dynamic insertion
|
||||
::: TODO delete all static insertion, remove condition and pass work object in inclusion
|
||||
#}{% if dynamic is defined %}
|
||||
|
@ -40,7 +40,6 @@ class AdminLanguageMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 1200,
|
||||
'icons' => ['globe-w'],
|
||||
]);
|
||||
$menu->addChild('Language list', [
|
||||
'route' => 'chill_crud_main_language_index',
|
||||
|
@ -40,7 +40,6 @@ class AdminLocationMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 1300,
|
||||
'icons' => ['map-marker'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Location type list', [
|
||||
|
@ -46,7 +46,6 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 1000,
|
||||
'icons' => ['key'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Center list', [
|
||||
|
@ -41,6 +41,7 @@ Last updated on: Dernière mise à jour le
|
||||
by_user: "par "
|
||||
lifecycleUpdate: Evenements de création et mise à jour
|
||||
address_fields: Données liées à l'adresse
|
||||
Datas: Données
|
||||
|
||||
inactive: inactif
|
||||
|
||||
@ -70,6 +71,7 @@ Centers: Centres
|
||||
center: centre
|
||||
comment: commentaire
|
||||
Comment: Commentaire
|
||||
Comments: Commentaires
|
||||
Pinned comment: Commentaire épinglé
|
||||
Any comment: Aucun commentaire
|
||||
Read more: Lire la suite
|
||||
|
@ -178,6 +178,27 @@ class AccompanyingCourseWorkController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route(
|
||||
* "{_locale}/person/accompanying-period/work/{id}/show",
|
||||
* name="chill_person_accompanying_period_work_show",
|
||||
* methods={"GET"}
|
||||
* )
|
||||
*/
|
||||
public function showWork(AccompanyingPeriodWork $work): Response
|
||||
{
|
||||
if (null === $work) {
|
||||
throw $this->createNotFoundException('Unable to find Work entity.');
|
||||
}
|
||||
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodWorkVoter::SEE, $work);
|
||||
|
||||
return $this->render('@ChillPerson/AccompanyingCourseWork/show.html.twig', [
|
||||
'accompanyingCourse' => $work->getAccompanyingPeriod(),
|
||||
'work' => $work,
|
||||
]);
|
||||
}
|
||||
|
||||
private function createDeleteForm(int $id): Form
|
||||
{
|
||||
$params = [];
|
||||
|
@ -14,6 +14,7 @@ namespace Chill\PersonBundle\Controller;
|
||||
use Chill\MainBundle\CRUD\Controller\ApiController;
|
||||
use Chill\MainBundle\Pagination\PaginatorFactory;
|
||||
use Chill\MainBundle\Serializer\Model\Collection;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use Chill\PersonBundle\Repository\SocialWork\SocialIssueRepository;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -41,7 +42,12 @@ class SocialWorkSocialActionApiController extends ApiController
|
||||
throw $this->createNotFoundException('socialIssue not found');
|
||||
}
|
||||
|
||||
$socialActions = $socialIssue->getRecursiveSocialActions();
|
||||
$socialActions = $socialIssue->getRecursiveSocialActions()->toArray();
|
||||
|
||||
usort($socialActions, static function (SocialAction $sa, SocialAction $sb) {
|
||||
return $sa->getOrdering() <=> $sb->getOrdering();
|
||||
});
|
||||
|
||||
$pagination = $this->paginator->create(count($socialActions));
|
||||
// max one page
|
||||
$pagination->setItemsPerPage(count($socialActions));
|
||||
|
@ -39,7 +39,6 @@ class AdminAccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 2200,
|
||||
'icons' => ['random'],
|
||||
]);
|
||||
|
||||
$menu->addChild('person_admin.closing motives', [
|
||||
|
@ -39,7 +39,6 @@ class AdminHouseholdMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 2100,
|
||||
'icons' => ['home'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Position', [
|
||||
|
@ -39,7 +39,6 @@ class AdminPersonMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 2000,
|
||||
'icons' => ['child'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Civility', [
|
||||
|
@ -39,7 +39,6 @@ class AdminSocialWorkMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 2300,
|
||||
'icons' => ['handshake-o'],
|
||||
]);
|
||||
|
||||
$menu->addChild('person_admin.social_action', [
|
||||
|
@ -1,13 +1,16 @@
|
||||
/// AccompanyingCourse Work list Page
|
||||
div.accompanying_course_work-list {
|
||||
/// AccompanyingCourse Work Pages
|
||||
div.accompanying-course-work {
|
||||
|
||||
table.obj-res-eval {
|
||||
border-collapse: collapse;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1em;
|
||||
&, tr, th, td {
|
||||
border: 1px solid lightgray;
|
||||
padding: 0.3em;
|
||||
background-color: $white;
|
||||
}
|
||||
th {
|
||||
h4.title_label {
|
||||
@ -26,6 +29,11 @@ div.accompanying_course_work-list {
|
||||
}
|
||||
td.eval {
|
||||
width: 100%;
|
||||
div.download {
|
||||
.row > * {
|
||||
transform: scale(0.85);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,10 +55,32 @@ div.accompanying_course_work-list {
|
||||
}
|
||||
}
|
||||
|
||||
div.item-bloc {
|
||||
&.short {}
|
||||
&.long {}
|
||||
&.uniq {}
|
||||
&.extended {
|
||||
table.obj-res-eval {
|
||||
margin-top: 0;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.colored {
|
||||
background-color: $chill-llight-gray;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
div.flex-table div.item-bloc:nth-child(2n) table.obj-res-eval {
|
||||
&, tr, th, td {
|
||||
background-color: $chill-llight-gray;
|
||||
/// item-bloc with background-color altern: even case
|
||||
div.flex-table div.item-bloc:nth-child(2n) {
|
||||
|
||||
// set table background
|
||||
table.obj-res-eval {
|
||||
&, tr, th, td {
|
||||
background-color: $chill-llight-gray;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ ul.columns { // XS:1 SM:2 MD:1 LG:2 XL:2 XXL:2
|
||||
}
|
||||
|
||||
/// dashboard_like_badge in AccompanyingCourse Work list Page
|
||||
div[class*='accompanying_course_work'] {
|
||||
div[class*='accompanying-course-work'] {
|
||||
div.dashboard,
|
||||
h4.badge-title,
|
||||
h3.badge-title,
|
||||
|
@ -785,7 +785,7 @@ let initPromise = (root) => Promise.all([getScopesPromise(root), accompanyingCou
|
||||
return makeFetch('PATCH', url, body)
|
||||
.then((response) => {
|
||||
commit('updateReferrer', response.user);
|
||||
if (null !== payload.user_job && payload.user_job !== state.accompanyingCourse.job) {
|
||||
if (null !== payload && null !== payload.user_job && payload.user_job !== state.accompanyingCourse.job) {
|
||||
this.dispatch('updateJob', payload.user_job);
|
||||
}
|
||||
// commit('setFilteredReferrersSuggested'); // this mutation doesn't exist?
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="workEditor" class="accompanying_course_work_edit my-4">
|
||||
<div id="workEditor" class="my-4">
|
||||
<div id="title" class="action-row">
|
||||
<div>
|
||||
<p class="wl-item social-issues">
|
||||
|
@ -1,4 +1,10 @@
|
||||
<div class="item-bloc accompanying_course_work-item{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
{#
|
||||
# OPTIONS
|
||||
# - itemBlocClass: [uniq|colored|extended]
|
||||
# - displayContent: [short|long] default: short
|
||||
# - displayAction: [true|false] default: false
|
||||
#}
|
||||
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
|
||||
<div class="item-row">
|
||||
<h2 class="badge-title">
|
||||
@ -15,6 +21,13 @@
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ w.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
@ -25,7 +38,7 @@
|
||||
<div class="item-row separator">
|
||||
<div class="wrap-list">
|
||||
|
||||
{%- if w.persons -%}
|
||||
{%- if w.persons -%}{# Usagers du parcours #}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'Persons in accompanying course'|trans }}</h3>
|
||||
@ -45,7 +58,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{%- if w.handlingThierParty -%}
|
||||
{%- if w.handlingThierParty -%}{# Tiers traitant #}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'Thirdparty handling'|trans }}</h3>
|
||||
@ -62,23 +75,25 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{%- if w.referrers -%}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'Referrers'|trans }}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
<div class="wl-row">{# Agents traitants #}
|
||||
<div class="wl-col title">
|
||||
<h3>{%- if w.referrers|length > 1 -%}{{ 'Referrers'|trans }}{% else %}{{ 'Referrer2'|trans }}{% endif %}</h3>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{%- if w.referrers|length > 0 -%}
|
||||
{% for u in w.referrers %}
|
||||
<span class="wl-item">
|
||||
{{ u|chill_entity_render_box }}
|
||||
{% if not loop.last %}, {% endif %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No referrer'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{%- if w.socialAction.issue -%}
|
||||
{%- if w.socialAction.issue -%}{# Problématique sociale #}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<h3>{{ 'Social issue'|trans }}</h3>
|
||||
@ -94,56 +109,94 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item-row column">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' %}
|
||||
</div>
|
||||
|
||||
<div class="item-row separator">
|
||||
<div class="item-col item-meta">
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) %}
|
||||
{% if notif_counter.total > 0 %}
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }}
|
||||
{% endif %}
|
||||
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
|
||||
{{ macro.updatedBy(w) }}
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row column">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if displayAction is defined and displayAction == true %}
|
||||
<ul class="item-col record_actions">
|
||||
{% set suppEvaluations = [] %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation', 'relatedEntityId': e.id }
|
||||
]) %}
|
||||
{% if displayContent is not defined or displayContent == 'short' %}
|
||||
<div class="item-row separator">
|
||||
|
||||
{% for d in e.documents %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id }
|
||||
]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<li>
|
||||
{{ chill_entity_workflow_list(
|
||||
'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork',
|
||||
w.id, [], suppEvaluations) }}
|
||||
</li>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
||||
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
||||
|
||||
<div class="item-col item-meta">
|
||||
{{ macro.metadata(w) }}
|
||||
</div>
|
||||
|
||||
{% if displayAction is defined and displayAction == true %}
|
||||
<ul class="item-col record_actions">
|
||||
<li>{{ macro.workflowButton(w) }}</li>
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
<a class="btn btn-show" title="{{ 'Show'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_show', {'id': w.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-edit" title="{{ 'Edit'|trans }}"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', w) %}
|
||||
<li>
|
||||
<a class="btn btn-delete" title="{{ 'Delete'|trans }}"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': w.id } ) }}"
|
||||
></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
{#
|
||||
# This is for 'long' version of content
|
||||
# Note: this include is wrapped in a flex-table container.
|
||||
# We start by closing the flex-table so we can add more.
|
||||
# At the end we leave the last flex-table open, as it will be closed in the container.
|
||||
#}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
</div>
|
||||
|
||||
{% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<h2 class="chill-blue">{{ 'Dispositifs' }}</h2>
|
||||
|
||||
<div class="flex-table">{# new flex-table wrapper #}
|
||||
<div class="item-bloc colored{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
|
||||
'displayContent': displayContent
|
||||
} %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2 class="chill-blue">{{ 'Comments'|trans }}</h2>
|
||||
|
||||
<div class="flex-table">
|
||||
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Public</h3>
|
||||
{% if w.note is not empty %}
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ w.note|chill_entity_render_box({'metadata': true }) }}
|
||||
</blockquote>
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No comment associated'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if w.privateComment.hasCommentForUser(app.user) %}
|
||||
<div class="item-bloc no-altern{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
|
||||
<h3 class="chill-beige">Privé</h3>
|
||||
<blockquote class="chill-user-quote private-quote">
|
||||
{{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }}
|
||||
</blockquote>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# Here flex-table stay open ! read above #}
|
||||
|
||||
{% endif %}
|
||||
|
@ -0,0 +1,23 @@
|
||||
{% macro metadata(w) %}
|
||||
{% set notif_counter = chill_count_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) %}
|
||||
{% if notif_counter.total > 0 %}
|
||||
{{ chill_counter_notifications('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id) }}
|
||||
{% endif %}
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as macro %}
|
||||
{{ macro.updatedBy(w) }}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro workflowButton(w) %}
|
||||
{% set suppEvaluations = [] %}
|
||||
{% for e in w.accompanyingPeriodWorkEvaluations %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluation', 'relatedEntityId': e.id }
|
||||
]) %}
|
||||
{% for d in e.documents %}
|
||||
{% set suppEvaluations = suppEvaluations|merge([
|
||||
{'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id }
|
||||
]) %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{{ chill_entity_workflow_list('Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWork', w.id, [], suppEvaluations) }}
|
||||
{% endmacro %}
|
@ -1,6 +1,9 @@
|
||||
|
||||
{#
|
||||
# OPTIONS
|
||||
# - displayContent: [short|long] default: short
|
||||
#}
|
||||
{% if w.results|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<table class="obj-res-eval">
|
||||
<thead>
|
||||
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
|
||||
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
|
||||
@ -23,7 +26,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if w.goals|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<table class="obj-res-eval">
|
||||
<thead>
|
||||
<th class="obj"><h4 class="title_label">{{ 'accompanying_course_work.goal'|trans }}</h4></th>
|
||||
<th class="res"><h4 class="title_label">{{ 'accompanying_course_work.results'|trans }}</h4></th>
|
||||
@ -54,7 +57,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if w.accompanyingPeriodWorkEvaluations|length > 0 %}
|
||||
<table class="obj-res-eval my-3">
|
||||
<table class="obj-res-eval">
|
||||
<thead>
|
||||
<th class="eval">
|
||||
<h4 class="title_label">{{ 'accompanying_course_work.evaluations'|trans }}</h4>
|
||||
@ -72,28 +75,84 @@
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
|
||||
{% if e.endDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if e.maxDate %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ e.maxDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.max_date'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if e.warningInterval and e.warningInterval.d > 0 %}
|
||||
<li>
|
||||
{% set days = (e.warningInterval.d + e.warningInterval.m * 30) %}
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
{{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
|
||||
</li>
|
||||
{% else %}
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
<li>
|
||||
<span class="item-key">{{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }}</span>
|
||||
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
{% if displayContent is defined and displayContent == 'long' %}
|
||||
|
||||
{% if e.comment is not empty %}
|
||||
<blockquote class="chill-user-quote">{{ e.comment|chill_entity_render_box }}</blockquote>
|
||||
{% endif %}
|
||||
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
|
||||
<div class="download mb-4 container">
|
||||
{% if e.documents|length > 0 %}
|
||||
|
||||
{% for d in e.documents %}
|
||||
<div class="row">
|
||||
<div class="col text-start">
|
||||
{{ d.title }}
|
||||
</div>
|
||||
<div class="col-md-auto text-center">
|
||||
{{ mm.mimeIcon(d.storedObject.type) }}
|
||||
</div>
|
||||
<div class="col col-lg-4 text-end">
|
||||
{{ m.download_button_small(d.storedObject, d.title) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% else %}
|
||||
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying_course_work-create">
|
||||
<div class="accompanying-course-work">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div id="accompanying_course_work_create"></div>
|
||||
<div id="accompanying_course_work_create"></div>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="accompanying_course_work-list">
|
||||
<div class="accompanying-course-work">
|
||||
<h2 class="badge-title">
|
||||
<span class="title_label"></span>
|
||||
<span class="title_action">{{ work.socialAction|chill_entity_render_string }}</span>
|
||||
|
@ -9,7 +9,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying_course_work-edit">
|
||||
<div class="accompanying-course-work">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
<div id="accompanying_course_work_edit"></div>
|
||||
</div>
|
||||
|
@ -13,16 +13,20 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying_course_work">
|
||||
<div class="accompanying-course-work">
|
||||
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
{% if works|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}</p>
|
||||
{% else %}
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="flex-table">
|
||||
{% for w in works %}
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with { 'displayAction': true } %}
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
|
||||
'displayAction': true,
|
||||
'displayContent': 'short',
|
||||
'itemBlocClass': ''
|
||||
} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="accompanying_course_work-list">
|
||||
<div class="accompanying-course-work">
|
||||
{% for w in works | slice(0,5) %}
|
||||
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"
|
||||
|
@ -0,0 +1,60 @@
|
||||
{% extends '@ChillPerson/AccompanyingCourse/layout.html.twig' %}
|
||||
|
||||
{% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
|
||||
|
||||
{% block title 'accompanying_course_work.Show accompanying course work'|trans %}
|
||||
|
||||
{% block css %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_link_tags('mod_async_upload') }}
|
||||
{{ encore_entry_link_tags('mod_entity_workflow_pick') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{{ parent() }}
|
||||
{{ encore_entry_script_tags('mod_async_upload') }}
|
||||
{{ encore_entry_script_tags('mod_entity_workflow_pick') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="accompanying-course-work">
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div class="flex-table mt-4">
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
|
||||
'w': work,
|
||||
'displayAction': false,
|
||||
'displayContent': 'long',
|
||||
'itemBlocClass': 'uniq extended',
|
||||
} %}
|
||||
<div class="p-3 mt-3">{{ macro.metadata(work) }}</div>
|
||||
</div>
|
||||
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
<li class="cancel">
|
||||
<a href="{{ path('chill_person_accompanying_period_work_list', { 'id': accompanyingCourse.id }) }}"
|
||||
class="btn btn-cancel">{{ 'Back to the list'|trans }}</a>
|
||||
</li>
|
||||
<li>{{ macro.workflowButton(work) }}</li>
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', work) %}
|
||||
<li>
|
||||
<a class="btn btn-edit"
|
||||
href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': work.id }) }}"
|
||||
>{{ 'Edit'|trans }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_DELETE', work) %}
|
||||
<li>
|
||||
<a class="btn btn-delete"
|
||||
href="{{ path('chill_person_accompanying_period_work_delete', { 'id': work.id } ) }}"
|
||||
>{{ 'Delete'|trans }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block block_post_menu %}
|
||||
<div class="post-menu pt-4"></div>
|
||||
{% endblock %}
|
@ -5,16 +5,14 @@
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
useValidTo: true,
|
||||
} %}
|
||||
</div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
useValidTo: true,
|
||||
} %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -5,17 +5,13 @@
|
||||
{% block content %}
|
||||
<h1>{{ block('title') }}</h1>
|
||||
|
||||
<div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
{#
|
||||
#}
|
||||
</div>
|
||||
{# include vue_address component #}
|
||||
{% include '@ChillMain/Address/_insert_vue_address.html.twig' with {
|
||||
targetEntity: { name: 'household', id: household.id },
|
||||
backUrl: path('chill_person_household_addresses', { 'household_id': household.id }),
|
||||
openPanesInModal: false,
|
||||
stickyActions: true,
|
||||
useValidFrom: true,
|
||||
} %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -3,10 +3,10 @@
|
||||
{% block admin_content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>{{ 'Id'|trans }}</th>
|
||||
<th>{{ 'Id' }}</th>
|
||||
<th>{{ 'Title'|trans }}</th>
|
||||
<th>{{ 'Social issue'|trans }}</th>
|
||||
<th>{{ 'Ordering'|trans }}</th>
|
||||
<th>{{ 'Order'|trans }}</th>
|
||||
<th>{{ 'goal.desactivationDate'|trans }}</th>
|
||||
<th> </th>
|
||||
{% endblock %}
|
||||
|
@ -3,13 +3,6 @@
|
||||
{{ 'workflow.SocialAction deleted'|trans }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
|
||||
'w': work,
|
||||
'itemBlocClass': 'bg-chill-llight-gray'
|
||||
} %}
|
||||
</div>
|
||||
|
||||
{% if display_action is defined and display_action == true %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="flex-table accompanying-course-work">
|
||||
<div class="item-bloc evaluation-item bg-chill-llight-gray">
|
||||
<div class="item-row mb-2">
|
||||
<h2 class="badge-title">
|
||||
|
@ -5,7 +5,7 @@
|
||||
{{ 'workflow.doc for evaluation deleted'|trans }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="flex-table accompanying_course_work-list">
|
||||
<div class="flex-table accompanying-course-work">
|
||||
<div class="item-bloc evaluation-item bg-chill-llight-gray">
|
||||
<div class="item-row mb-2">
|
||||
<h1>{{ doc.title }}</h1>
|
||||
|
@ -232,6 +232,8 @@ No resources: "Pas d'interlocuteurs privilégiés"
|
||||
Persons associated: Personnes concernés
|
||||
Referrer: Référent
|
||||
Referrers: Agents traitants
|
||||
Referrer2: Agent traitant
|
||||
No referrer: Pas d'agent traitant
|
||||
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 ménage dès que possible.
|
||||
Add to household now: Ajouter à un ménage
|
||||
Any resource for this accompanying course: Aucun interlocuteur privilégié pour ce parcours
|
||||
@ -886,6 +888,7 @@ accompanying_course_work:
|
||||
create: Créer une action
|
||||
Create accompanying course work: Créer une action d'accompagnement
|
||||
Edit accompanying course work: Modifier une action d'accompagnement
|
||||
Show accompanying course work: Action d'accompagnement
|
||||
List accompanying course work: Liste des actions d'accompagnement
|
||||
action: Action
|
||||
create_date: Date de création
|
||||
|
@ -1,4 +1,4 @@
|
||||
{% extends 'ChillMainBundle::layout.html.twig' %}
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title 'My tasks'|trans %}
|
||||
|
||||
|
@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
|
||||
->setAttribute('class', 'list-group-item-header')
|
||||
->setExtras([
|
||||
'order' => 3000,
|
||||
'icons' => ['male'],
|
||||
]);
|
||||
|
||||
$menu->addChild('Third party category', [
|
||||
|
@ -22,7 +22,7 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface
|
||||
private const LOCK_DURATION = 60 * 30;
|
||||
|
||||
/**
|
||||
* Number of seconds to keep the lock after the delete lock operation
|
||||
* Number of seconds to keep the lock after the delete lock operation.
|
||||
*/
|
||||
private const LOCK_GRACEFUL_DURATION_TIME = 3;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user