diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig index 4c056eec5..78a08f845 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_item.html.twig @@ -115,7 +115,8 @@
{% include '@ChillPerson/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig' with { - 'displayContent': displayContent + 'displayContent': displayContent, + 'onlyone': false } %}
{% endif %} @@ -195,7 +196,8 @@
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with { - 'displayContent': displayContent + 'displayContent': displayContent, + 'onlyone' : false } %}
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 57305095d..fc2891ca6 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 @@ -3,6 +3,7 @@ # - displayContent: [short|long] default: short #} {% if w.results|length > 0 %} + @@ -64,9 +65,11 @@ - {% for e in w.accompanyingPeriodWorkEvaluations %} - - + + - - {% endfor %} + + + {% endfor %} + {% endif %}

{{ 'accompanying_course_work.goal'|trans }}

+ {% if onlyone %} + {% for e in w.accompanyingPeriodWorkEvaluations %} + {% if evalId is defined and evalId == e.id %} +
  • {{ e.evaluation.title|localize_translatable_string }} @@ -78,13 +81,15 @@ {% if e.endDate %}
  • - {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} + {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} {{ e.endDate|format_date('short') }}
  • {% else %} {% if displayContent is defined and displayContent == 'long' %}
  • - {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} + {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} {{ 'Not given'|trans }}
  • {% endif %} @@ -92,13 +97,15 @@ {% if e.maxDate %}
  • - {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} + {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} {{ e.maxDate|format_date('short') }}
  • {% else %} {% if displayContent is defined and displayContent == 'long' %}
  • - {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} + {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} {{ 'Not given'|trans }}
  • {% endif %} @@ -107,13 +114,15 @@ {% if e.warningInterval and e.warningInterval.d > 0 %}
  • {% set days = (e.warningInterval.d + e.warningInterval.m * 30) %} - {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} + {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} {{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }}
  • {% else %} {% if displayContent is defined and displayContent == 'long' %}
  • - {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} + {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} {{ 'Not given'|trans }}
  • {% endif %} @@ -122,55 +131,145 @@ {% if e.timeSpent is not null and e.timeSpent > 0 %}
  • {% set minutes = (e.timeSpent / 60) %} - {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} {{ 'duration.minute'|trans({ '{m}' : minutes }) }} + {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} {{ 'duration.minute'|trans({ '{m}' : minutes }) }}
  • {% elseif displayContent is defined and displayContent == 'long' %}
  • - {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} + {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} {{ 'Not given'|trans }}
  • {% endif %}
- {% if recordAction is defined %} - {{ recordAction }} - {% endif %} + {% endif %} - {% if displayContent is defined and displayContent == 'long' %} - {% if e.comment is not empty %} -
{{ e.comment|chill_entity_render_box }}
+ {% endfor %} + {% if recordAction is defined %} + {{ recordAction }} + {% endif %} + {% else %} + {% for e in w.accompanyingPeriodWorkEvaluations %} +
+
    +
  • + {{ e.evaluation.title|localize_translatable_string }} +
      +
    • + {{ 'accompanying_course_work.start_date'|trans ~ ' : ' }} + {{ e.startDate|format_date('short') }} +
    • + + {% if e.endDate %} +
    • + {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} + {{ e.endDate|format_date('short') }} +
    • + {% else %} + {% if displayContent is defined and displayContent == 'long' %} +
    • + {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} + {{ 'Not given'|trans }} +
    • + {% endif %} + {% endif %} + + {% if e.maxDate %} +
    • + {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} + {{ e.maxDate|format_date('short') }} +
    • + {% else %} + {% if displayContent is defined and displayContent == 'long' %} +
    • + {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} + {{ 'Not given'|trans }} +
    • + {% endif %} + {% endif %} + + {% if e.warningInterval and e.warningInterval.d > 0 %} +
    • + {% set days = (e.warningInterval.d + e.warningInterval.m * 30) %} + {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} + {{ 'accompanying_course_work.%days% days before max_date'|trans({'%days%': days }) }} +
    • + {% else %} + {% if displayContent is defined and displayContent == 'long' %} +
    • + {{ 'accompanying_course_work.warning_interval'|trans ~ ' : ' }} + {{ 'Not given'|trans }} +
    • + {% endif %} + {% endif %} + + {% if e.timeSpent is not null and e.timeSpent > 0 %} +
    • + {% set minutes = (e.timeSpent / 60) %} + {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} {{ 'duration.minute'|trans({ '{m}' : minutes }) }} +
    • + {% elseif displayContent is defined and displayContent == 'long' %} +
    • + {{ 'accompanying_course_work.timeSpent'|trans ~ ' : ' }} + {{ 'Not given'|trans }} +
    • + {% endif %} +
    +
  • +
+ {% if recordAction is defined %} + {{ recordAction }} {% endif %} - {% import "@ChillDocStore/Macro/macro.html.twig" as m %} - {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %} - {% if e.documents|length > 0 %} - - {% for d in e.documents %} - - - - - - {% endfor %} -
{{ d.title }}{{ mm.mimeIcon(d.storedObject.type) }} - - {{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }} -
- {% else %} - {{ 'No document found'|trans }} + {% if displayContent is defined and displayContent == 'long' %} + + {% if e.comment is not empty %} +
{{ e.comment|chill_entity_render_box }}
+ {% endif %} + + {% import "@ChillDocStore/Macro/macro.html.twig" as m %} + {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %} + {% if e.documents|length > 0 %} + + {% for d in e.documents %} + + + + + + {% endfor %} +
{{ d.title }}{{ mm.mimeIcon(d.storedObject.type) }} + + {{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }} +
+ {% else %} + {{ 'No document found'|trans }} + {% endif %} + + {% endif %} - - - {% endif %} -
{% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig index 4ea70d9f0..b4df52254 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/showEvaluationDocumentInNotification.html.twig @@ -23,7 +23,9 @@ 'w': document.accompanyingPeriodWorkEvaluation.accompanyingPeriodWork, 'd': document.storedObject, 'displayContent': 'short', - 'recordAction': _self.recordAction(document) + 'recordAction': _self.recordAction(document), + 'onlyone' : true, + 'evalId': document.accompanyingPeriodWorkEvaluation.id } %}