diff --git a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig index a3203d806..53bd3e8a7 100644 --- a/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig +++ b/src/Bundle/ChillActivityBundle/Resources/views/Activity/show.html.twig @@ -172,7 +172,7 @@ {% endfor %} {% else %} - {{ 'Any document found'|trans }} + {{ 'No document found'|trans }} {% endif %} {% endif %} diff --git a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_documents.twig.html b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_documents.twig.html index a568ec009..499fb0a83 100644 --- a/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_documents.twig.html +++ b/src/Bundle/ChillCalendarBundle/Resources/views/Calendar/_documents.twig.html @@ -3,7 +3,7 @@ {% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %} -
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
index e9147ed4a..44dbcb9f4 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/AccompanyingCourseDocument/_workflow.html.twig
@@ -1,7 +1,7 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
-
+
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
index 886544b1e..0e739d94b 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro.html.twig
@@ -13,3 +13,19 @@
{{ 'Download'|trans }}
{% endif %}
{% endmacro %}
+
+{% macro download_button_small(storedObject, filename = null) %}
+ {% if storedObject is null %}
+
+ {% else %}
+
+ {{ 'Download'|trans }}
+ {% endif %}
+{% endmacro %}
\ No newline at end of file
diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
index a9bc07e2f..7079a0d94 100644
--- a/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
+++ b/src/Bundle/ChillDocStoreBundle/Resources/views/Macro/macro_mimeicon.html.twig
@@ -48,8 +48,8 @@
{% endif %}
{% endfor %}
-
+
{{ 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 17326b299..3dda25797 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/Resources/public/chill/chillmain.scss b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
index f9a90c286..04b1da942 100644
--- a/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
+++ b/src/Bundle/ChillMainBundle/Resources/public/chill/chillmain.scss
@@ -302,12 +302,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 {
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/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') }}
{{ '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/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index 37672d449..a1e2b435e 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -62,6 +62,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..6baaf03da 100644
--- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
+++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php
@@ -178,6 +178,28 @@ 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/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/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..579487824 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 }}@@ -93,57 +108,96 @@
- {% 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
+ } %}
-
- {% if displayAction is defined and displayAction == true %}
-
+
+ {% import '@ChillPerson/AccompanyingCourseWork/_macros.html.twig' as macro %}
+
+
+
+ {{ 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 }}+ +
+
+
+ {% set userId = app.user.id %}
+ {% if w.privateComment.comments|length > 0 and w.privateComment.comments[userId] %}
+ 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 %}
\ No newline at end of file
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..800d39935 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.comments[userId]|chill_markdown_to_html }} ++
|
---|