From 67c1760b511e82845f97944263d986ff93518a33 Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 20 Dec 2021 13:53:49 +0100 Subject: [PATCH 1/2] fix bootstrap class --- .../Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index 32e2a5e14..97bda5fc5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -15,12 +15,12 @@
- +
- +
From f117dcd703d8380390ec3bfce039eaf733982eda Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Mon, 20 Dec 2021 14:16:43 +0100 Subject: [PATCH 2/2] objective-result-eval: display as a table in lists and dashboards --- .../chill/scss/accompanying_period_work.scss | 83 +++++++------- .../_objectifs_results_evaluations.html.twig | 102 ++++++++++++++++++ .../AccompanyingCourseWork/index.html.twig | 83 +------------- ...st_recent_by_accompanying_period.html.twig | 55 +--------- 4 files changed, 146 insertions(+), 177 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig 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 daaae9e28..ed474911f 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,57 +1,56 @@ /// AccompanyingCourse Work list Page div.accompanying_course_work-list { - div.objective_results { + table.obj-res-eval { + border-collapse: collapse; + border-radius: 5px; width: 100%; - display: grid; - grid-template-areas: "obj res"; - grid-template-columns: 50%; - column-gap: 0.2rem; - padding: 0.3rem; - - div.objective { - grid-area: obj; + &, tr, th, td { + border: 1px solid lightgray; + padding: 0.3em; + } + th { h4.title_label { - border-radius: 0.35rem 0 0 0.35rem; + font-weight: 700; + font-size: 100%; + font-family: 'Open Sans'; + margin: 0; } } - div.results { - grid-area: res; - h4.title_label { - border-radius: 0 0.35rem 0.35rem 0; - } + td { + font-size: 85%; + } + td.obj, + td.res { + width: 50%; + } + td.eval { + width: 100%; } - //&:nth-child(even) { background-color: $chill-llight-gray; } - &.without-objectives {} - &.with-objectives {} } - div.objective_results, - div.evaluations { - h4.title_label { - display: block; - margin: 0.4em 0; - padding: 0.1em 0.5em; - font-variant-caps: small-caps; - font-size: 95%; - background-color: tint-color($chill-orange, 80%); - + * { - margin-top: 0; - } + ul { + &.goal_title, + &.result_list, + &.eval_title { + padding-left: 1em; + margin-bottom: 0; } - ul { - &.goal_title, - &.result_list { - padding-left: 1em; - margin-bottom: 0; - } - &.goal_title { - @include list_marker_triangle($social-issue-color); - } - &.result_list { - @include list_marker_triangle($pink); - } + &.goal_title { + @include list_marker_triangle($social-issue-color); + } + &.result_list { + @include list_marker_triangle($pink); + } + &.eval_title { + @include list_marker_triangle($orange); } } } + +div.flex-table div.item-bloc:nth-child(2n) table.obj-res-eval { + &, tr, th, td { + background-color: $chill-llight-gray; + } +} 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 new file mode 100644 index 000000000..ffa5da9ca --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/_objectifs_results_evaluations.html.twig @@ -0,0 +1,102 @@ + +{% if w.results|length > 0 %} + + + + + + + + + + + +

{{ 'accompanying_course_work.goal'|trans }}

{{ 'accompanying_course_work.results'|trans }}

+

{{ 'accompanying_course_work.results without objective'|trans }}

+
+
    + {% for r in w.results %} +
  • {{ r.title|localize_translatable_string }}
  • + {% endfor %} +
+
+{% endif %} + +{% if w.goals|length > 0 %} + + + + + + + {% for g in w.goals %} + + + + + {% endfor %} + +

{{ 'accompanying_course_work.goal'|trans }}

{{ 'accompanying_course_work.results'|trans }}

+
    +
  • {{ g.goal.title|localize_translatable_string }}
  • +
+
+ {% if g.results|length == 0 %} +

{{ 'accompanying_course_work.no_results'|trans }}

+ {% else %} +
    + {% for r in g.results %} +
  • {{ r.title|localize_translatable_string }}
  • + {% endfor %} +
+ {% endif %} +
+{% endif %} + +{% if w.accompanyingPeriodWorkEvaluations|length > 0 %} + + + + + + {% for e in w.accompanyingPeriodWorkEvaluations %} + + + + {% endfor %} + +
+

{{ 'accompanying_course_work.evaluations'|trans }}

+
+
    +
  • + {{ 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') }} +
    • + {% endif %} + {% if e.maxDate %} +
    • + {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} + {{ e.maxDate|format_date('short') }} +
    • + {% 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 }) }} +
    • + {% endif %} +
    +
  • +
+
+{% endif %} diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig index cf91a4e20..ebdfd1f26 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/index.html.twig @@ -107,92 +107,11 @@ {% endif %} - {% if w.accompanyingPeriodWorkEvaluations|length > 0 %} -
-
-

{{ 'accompanying_course_work.evaluations'|trans }}

-
-
-
    - {% 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') }} -
    • - {% endif %} - {% if e.maxDate %} -
    • - {{ 'accompanying_course_work.max_date'|trans ~ ' : ' }} - {{ e.maxDate|format_date('short') }} -
    • - {% 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 }) }} -
    • - {% endif %} -
    - -
  • - {% endfor %} -
-
-
- {% endif %} -
- {% if w.results|length > 0 %} -
-
-

{{ 'accompanying_course_work.goal'|trans }}

-

{{ 'accompanying_course_work.results without objective'|trans }}

-
-
-

{{ 'accompanying_course_work.results'|trans }}

-
    - {% for r in w.results %} -
  • {{ r.title|localize_translatable_string }}
  • - {% endfor %} -
-
-
- {% endif %} - {% if w.goals|length > 0 %} - {% for g in w.goals %} -
-
-

{{ 'accompanying_course_work.goal'|trans }}

-
  • {{ g.goal.title|localize_translatable_string }}
-
-
-

{{ 'accompanying_course_work.results'|trans }}

- {% if g.results|length == 0 %} -

{{ 'accompanying_course_work.no_results'|trans }}

- {% else %} -
    - {% for r in g.results %} -
  • {{ r.title|localize_translatable_string }}
  • - {% endfor %} -
- {% endif %} -
-
- {% endfor %} - {% endif %} + {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {} %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig index 4bab107c5..a08f8eb1a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_recent_by_accompanying_period.html.twig @@ -42,59 +42,8 @@ -
    - A{% for g in w.goals %} -
  • - {{ 'accompanying_course_work.goal'|trans ~ ' : ' }} - {{ g.goal.title|localize_translatable_string }} - {% if g.results|length > 0 %} - {{ 'accompanying_course_work.results'|trans }} -
      - {% for r in g.results %} -
    • - {{ r.title|localize_translatable_string }} -
    • - {% endfor %} -
    - {% endif %} -
  • - {% endfor %} - B{% if w.results|length > 0 %} -
  • - {{ 'accompanying_course_work.goal'|trans }} -

    {{ 'accompanying_course_work.results without objective'|trans }}

    - {% if w.results %} - {{ 'accompanying_course_work.results'|trans }} -
      - {% for r in w.results %} -
    • - {{ r.title|localize_translatable_string }} -
    • - {% endfor %} -
    - {% endif %} -
  • - {% endif %} - C{% for e in w.accompanyingPeriodWorkEvaluations %} -
  • - {{ 'accompanying_course_work.social_evaluation'|trans ~ ' : ' }} - {{ e.evaluation.title|localize_translatable_string }} -
      - {% if e.startDate %} -
    • - {{ 'accompanying_course_work.start_date'|trans ~ ' : ' }} - {{ e.startDate|format_date('short') }} -
    • - {% endif %} - {% if e.endDate %} -
    • - {{ 'accompanying_course_work.end_date'|trans ~ ' : ' }} - {{ e.endDate|format_date('short') }} -
    • - {% endif %} -
    -
  • - {% endfor %} +
      + {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {} %}