diff --git a/.gitignore b/.gitignore index 38d06d315..ebdc16e56 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ composer composer.phar composer.lock docs/build/ +node_modules/* .php_cs.cache ###> symfony/framework-bundle ### diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index 5634358c7..c55d579e4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -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, ]); diff --git a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php index 5e10c9a14..71a9e3c2a 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php @@ -36,7 +36,6 @@ final class AdminMenuBuilder implements LocalMenuBuilderInterface ->setAttribute('class', 'list-group-item-header') ->setExtras([ 'order' => 5000, - 'icons' => ['exchange'], ]); $menu->addChild('Activity Reasons', [ diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index 49e71bfad..53bd3e8a7 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -156,7 +156,7 @@
diff --git a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
index 7ac745b12..db63ad6ac 100644
--- a/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillCustomFieldsBundle/Menu/AdminMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 4500,
- 'icons' => ['plus'],
]);
$menu->addChild('Custom fields group', [
diff --git a/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
index 6848ed65a..466c3bace 100644
--- a/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
+++ b/src/Bundle/ChillDocStoreBundle/Menu/AdminMenuBuilder.php
@@ -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', [
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
index 299183cca..f914bd7f5 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
@@ -6,7 +6,7 @@
{{ 'workflow.Document deleted'|trans }}
{% else %}
-
+
@@ -22,7 +22,6 @@
{{ document.description }}
{% endif %}
-
+
{{ label|capitalize }}
-
+
{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
index 400e37236..4fbad1546 100644
--- a/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillDocStoreBundle/translations/messages.fr.yml
@@ -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
diff --git a/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php b/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
new file mode 100644
index 000000000..85041f0f3
--- /dev/null
+++ b/src/Bundle/ChillMainBundle/Controller/ScopeApiController.php
@@ -0,0 +1,25 @@
+andWhere($query->expr()->eq('e.active', "'TRUE'"));
+ }
+ }
+}
diff --git a/src/Bundle/ChillMainBundle/Controller/UserApiController.php b/src/Bundle/ChillMainBundle/Controller/UserApiController.php
index b29fe7c8e..da873e118 100644
--- a/src/Bundle/ChillMainBundle/Controller/UserApiController.php
+++ b/src/Bundle/ChillMainBundle/Controller/UserApiController.php
@@ -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');
+ }
}
diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
index 23a4bee89..69546016a 100644
--- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
+++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php
@@ -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',
diff --git a/src/Bundle/ChillMainBundle/Form/ScopeType.php b/src/Bundle/ChillMainBundle/Form/ScopeType.php
index 691328500..86335c554 100644
--- a/src/Bundle/ChillMainBundle/Form/ScopeType.php
+++ b/src/Bundle/ChillMainBundle/Form/ScopeType.php
@@ -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,
+ ], ]);
}
/**
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
index aa1d24844..3c9fc8601 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
@@ -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
*/
diff --git a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
index 4d0bfcf8e..19da5aed3 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/scss/render_box.scss
@@ -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;
- }
- }
- }
- */
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
index 30a240938..21ab5e3d0 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress.vue
@@ -48,33 +48,35 @@
-
-
+
+
+
+
-
+
+
+
+
-
+
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
index 2c8e17687..f1cac5254 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/AddAddress/AddressSelection.vue
@@ -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}`
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
index 4ab117395..c0e42a7b1 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/EditPane.vue
@@ -187,6 +187,7 @@ div.address-form {
div#address_map {
height: 400px;
width: 100%;
+ z-index: 1;
}
}
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
index bc246d542..5048815e2 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/Address/components/ShowPane.vue
@@ -1,6 +1,6 @@
-
+
{{ $t('loading') }}
@@ -36,21 +36,16 @@
-
-
-
+
+
-
-
-
-
diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
index a872a2f43..bc043c666 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
+++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/HomepageWidget/MyEvaluations.vue
@@ -1,5 +1,5 @@
-
+ {{ $t('my_evaluations.description') }}
{{ $t('no_data') }}
+
{{ $t('my_works.description') }}
{{ $t('no_data') }}
+
+
+ {% block admin_content %}
+
+ {% endblock %}
+
+
{% block vertical_menu_content %}
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
index c47f4fbf4..8ba0a21f6 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_delete_content.html.twig
@@ -1,4 +1,4 @@
-
+
{% block crud_content_header %}
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
index a26eb2e4a..e23949162 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_edit_content.html.twig
@@ -1,5 +1,5 @@
-{% set formId = crudMainFormId|default('crud_main_form') %}
-{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}{% endblock crud_content_header %} @@ -34,4 +34,4 @@ {{ form_end(form) }} -
+ {% set formId = crudMainFormId|default('crud_main_form') %}
+
{% block crud_content_header %}
+
diff --git a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
index 15774bdf6..eaacc1f73 100644
--- a/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
+++ b/src/Bundle/ChillMainBundle/Resources/views/CRUD/_index.html.twig
@@ -1,5 +1,3 @@
-{{ ('crud.'~crud_name~'.title_edit')|trans }}{% endblock crud_content_header %} @@ -64,4 +64,4 @@ {% endblock %} {% endblock %} -
-
{% block index_header %}
{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock index_header %} @@ -16,7 +14,7 @@ {% endblock %} {% else %} {% block table_entities %} -
{{ 'Center list'|trans }}+ {% endblock %} + + {% block filter_order %}{% endblock %} + + {% block table_entities_thead_tr %} +id |
+ {{ 'Name'|trans }} |
+ {{ 'Actions'|trans }} |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+ {{ entity.id }} |
+ {{ entity.name }} |
+
+ |
+
{{ 'List circles'|trans }}+ {% embed '@ChillMain/CRUD/_index.html.twig' %} + + {% block index_header %} +{{ 'List circles'|trans }}+ {% endblock %} + + {% block filter_order %}{% endblock %} + + {% block table_entities_thead_tr %} +id |
+ {{ 'Name'|trans }} |
+ {{ 'Active'|trans }} |
+ {{ 'Actions'|trans }} |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+ {{ entity.id }} |
+ {{ entity.name|localize_translatable_string }} |
+
+ {%- if entity.active -%}
+
+ {%- else -%}
+
+ {%- endif -%}
+ |
+
+ |
+
{{"Users"|trans}}- - {{ filter_order|chill_render_filter_order_helper }} - - {% for entity in entities %} -
-
-
-
- {% if entity.civility is not null %}
- {% if entity.civility.name|length > 0 %}
- {{ entity.civility.name|first }}
+ {% embed '@ChillMain/CRUD/_index.html.twig' %}
+
+ {% block index_header %}
+ {{"Users"|trans}}+ {% endblock %} + + {% block filter_order %}{{ filter_order|chill_render_filter_order_helper }}{% endblock %} + + {% block table_entities_thead_tr %} +{{ 'Active'|trans }} |
+ {{ 'Username'|trans }} |
+ {{ 'Datas'|trans }} |
+ {{ 'Actions'|trans }} |
+ {% endblock %}
+
+ {% block table_entities_tbody %}
+ {% for entity in entities %}
+
+ {% if entity.isEnabled %}
+
+ {% else %}
+
{% endif %}
- {% endif %}
- {{ entity.label }}
- {% if entity.isEnabled %}
-
- {% else %}
-
- {% endif %}
-
- |
+ {{ entity.email }}
-
-
-
-
- login: {{ entity.username|e('html_attr') }}
-
-
- {% if entity.userJob %}
- {{ entity.userJob.label|localize_translatable_string }}
- {% endif %}
-
-
-
-
- {% if entity.mainScope %}
- {{ entity.mainScope.name|localize_translatable_string }}
- {% endif %}
- {% if entity.mainCenter %}
- , {{ entity.mainCenter.name }}
- {% endif %}
-
-
-
-
-
-
-
- {% endfor %}
-
- {{ chill_pagination(paginator) }}
-
-
+ {#
+ {% if entity.civility is not null %}
+ {% if entity.civility.name|length > 0 %}
+ {{ entity.civility.name|first }}
+ {% endif %}
+ {% endif %}
+ #}
+ {{ entity.label }}
+ |
+
+ |
+
+
+ |
+
id |
- {{ 'label'|trans }} |
- {{ 'active'|trans }} |
- |
+ {{ 'Label'|trans }} |
+ {{ 'Active'|trans }} |
+ {{ 'Actions'|trans }} |
{% endblock %}
+
{% block table_entities_tbody %}
{% for entity in entities %}
{{ 'Accompanying Course Action'|trans ~ 'target'|trans }}-
+
{# dynamic insertion
::: TODO delete all static insertion, remove condition and pass work object in inclusion
#}{% if dynamic is defined %}
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
index a13b33a1e..0d91a0438 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLanguageMenuBuilder.php
@@ -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',
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
index 081d5d84a..b69399daf 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminLocationMenuBuilder.php
@@ -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', [
diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
index 96fdcb60d..7bd23c81f 100644
--- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
+++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php
@@ -46,7 +46,6 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 1000,
- 'icons' => ['key'],
]);
$menu->addChild('Center list', [
diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index f779cf87f..b092805c6 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -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
diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
index 7b77252be..8d15ca30f 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
@@ -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 = [];
diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
index a0d15b6db..3ae5c5b7c 100644
--- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php
@@ -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));
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
index f75d2844b..42c5dd4c2 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminAccompanyingCourseMenuBuilder.php
@@ -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', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
index 6a9e9dedc..0cbc48330 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminHouseholdMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminHouseholdMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2100,
- 'icons' => ['home'],
]);
$menu->addChild('Position', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
index 8459e4b89..ee2dad9dc 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminPersonMenuBuilder.php
@@ -39,7 +39,6 @@ class AdminPersonMenuBuilder implements LocalMenuBuilderInterface
->setAttribute('class', 'list-group-item-header')
->setExtras([
'order' => 2000,
- 'icons' => ['child'],
]);
$menu->addChild('Civility', [
diff --git a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
index cec672dd2..2b98c98a6 100644
--- a/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
+++ b/src/Bundle/ChillPersonBundle/Menu/AdminSocialWorkMenuBuilder.php
@@ -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', [
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
index ed474911f..eeb2eb2be 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
+++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/accompanying_period_work.scss
@@ -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;
+ }
}
}
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
index b359f84d6..072f13949 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
+++ b/src/Bundle/ChillPersonBundle/Resources/public/chill/scss/badge.scss
@@ -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,
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
index 8324a3d82..c2ded503b 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/store/index.js
@@ -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?
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
index 04c753358..9a105dd8d 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue
@@ -1,5 +1,5 @@
-
+ diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig index 3d4f46425..8ab7a932c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig @@ -1,4 +1,10 @@ -
+{#
+# OPTIONS
+# - itemBlocClass: [uniq|colored|extended]
+# - displayContent: [short|long] default: short
+# - displayAction: [true|false] default: false
+#}
+ @@ -15,6 +21,13 @@ {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} {{ w.endDate|format_date('short') }} + {% else %} + {% if displayContent is defined and displayContent == 'long' %} +
- {%- if w.persons -%}
+ {%- if w.persons -%}{# Usagers du parcours #}
{{ 'Persons in accompanying course'|trans }}@@ -45,7 +58,7 @@{{ 'Thirdparty handling'|trans }}@@ -62,23 +75,25 @@
-
+
+ {% if w.results|length > 0 or w.goals|length > 0 or w.accompanyingPeriodWorkEvaluations|length > 0 %}
+
-
- {{ 'Referrers'|trans }}-
+
- {%- if w.socialAction.issue -%}
+ {%- if w.socialAction.issue -%}{# Problématique sociale #}
{# Agents traitants #}
+
- {% endif %}
+
+
+ {%- if w.referrers|length > 1 -%}{{ 'Referrers'|trans }}{% else %}{{ 'Referrer2'|trans }}{% endif %}+
+ {%- if w.referrers|length > 0 -%}
{% for u in w.referrers %}
{{ u|chill_entity_render_box }}
{% if not loop.last %}, {% endif %}
{% endfor %}
-
+ {% else %}
+ {{ 'No referrer'|trans }}
+ {% endif %}
{{ 'Social issue'|trans }}@@ -94,56 +109,94 @@
- {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' %}
-
-
-
-
+
+{#
+ # 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' %}
+
- {% 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' %}
+
+ {% endif %}
+ {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
+ 'displayContent': displayContent
+ } %}
+ {% endif %}
- {% if displayAction is defined and displayAction == true %}
-
- {% for d in e.documents %}
- {% set suppEvaluations = suppEvaluations|merge([
- {'relatedEntityClass': 'Chill\\PersonBundle\\Entity\\AccompanyingPeriod\\AccompanyingPeriodWorkEvaluationDocument', 'relatedEntityId': d.id }
- ]) %}
- {% endfor %}
- {% endfor %}
-
+
+ {{ macro.metadata(w) }}
+
+
+ {% if displayAction is defined and displayAction == true %}
+
{{ 'Dispositifs' }}+ +{# new flex-table wrapper #}
+
+ {% endif %}
+
+
+ {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
+ 'displayContent': displayContent
+ } %}
+
+ {{ 'Comments'|trans }}+ +
+
+
+ {% if w.privateComment.hasCommentForUser(app.user) %}
+ Public+ {% if w.note is not empty %} ++ {{ w.note|chill_entity_render_box({'metadata': true }) }} ++ {% else %} + {{ 'No comment associated'|trans }} + {% endif %} +
+
+ {% endif %}
+ {# Here flex-table stay open ! read above #}
+
+{% endif %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig
new file mode 100644
index 000000000..10a0f94c7
--- /dev/null
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_macros.html.twig
@@ -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 %}
\ No newline at end of file
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
index ffa5da9ca..aa3838348 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig
@@ -1,6 +1,9 @@
-
+{#
+# OPTIONS
+# - displayContent: [short|long] default: short
+#}
{% if w.results|length > 0 %}
- Privé++ {{ w.privateComment.commentForUser(app.user)|chill_markdown_to_html }} ++
|
---|