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 9c2568395..4bfb059a2 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,28 +1,41 @@ -.chill-entity__social-action { - .badge-primary { - background-color: var(--chill-green); - } -} + + div.accompanying_course_work-list { - .item { - margin-bottom: 1.5rem; - padding: 1rem; - border: 1px solid gray; + // ?? howto calculate border:groove generated from $orange ?? + // see mixin badge_social_action + $groove-border-color-connect: #965028; - .title_label { - display: block; - margin: 0; + h2.title { + display: flex; + flex-direction: row; + width: 100%; + color: $dark; + height: 40px; - font-variant-caps: small-caps; - - + * { - margin-top: 0; - } + span.title_label { + border-radius: 0.35rem 0 0 0.35rem; + background-color: $groove-border-color-connect; + color: $white; + font-size: 80%; + padding: 0.5em; + padding-right: 0; + } + span.action_title { + flex-grow: 1; + margin: 0 0 0 auto; + border-radius: 0 0.35rem 0.35rem 0; + background-color: $light; + padding: 0.2em 0.7em; + @include badge_social_action; + } } + /* + + .objective_results { display: grid; grid-template-areas: @@ -61,51 +74,54 @@ div.accompanying_course_work-list { } } + */ + .updatedBy { margin-top: 1rem; text-align: right; - font-size: 0.8rem; + font-size: 0.9rem; font-style: italic; } -} -ul.timeline { - display: flex; - align-items: center; - justify-content: center; - padding: 0; - list-style-type: none; + ul.timeline { + display: flex; + align-items: center; + justify-content: center; + padding: 0; + list-style-type: none; - > li { - min-width: 210px; + > li { + min-width: 210px; - div.date { - margin-bottom: 20px; - display: flex; - flex-direction: column; - align-items: center; - } - div.label { - display: flex; - flex-direction: column; - align-items: center; + div.date { + margin-bottom: 20px; + display: flex; + flex-direction: column; + align-items: center; + } + div.label { + display: flex; + flex-direction: column; + align-items: center; - padding: 0 40px; - border-top: 3px solid var(--bs-chill-green); + padding: 0 40px; + border-top: 3px solid var(--bs-chill-green); - &:before { - content: ''; - display: inline-block; - position: relative; - width: 12px; - height: 12px; + &:before { + content: ''; + display: inline-block; + position: relative; + width: 12px; + height: 12px; - background-color: white; - border-radius: 12px; - border: 2px solid var(--bs-chill-green); + background-color: white; + border-radius: 12px; + border: 2px solid var(--bs-chill-green); - top: -9px; + top: -9px; + } } } } } + diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig index 8bd53b1f3..a005c514a 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingCourseWork/list_by_accompanying_period.html.twig @@ -2,111 +2,115 @@ {% block title 'accompanying_course_work.List accompanying course work'|trans %} - {% block content %}

{{ block('title') }}

+ {% if works|length == 0 %} +

{{ 'accompanying_course_work.Any work'|trans }}

+ {% endif %} +
{% for w in works %} -
-
-

{{ 'accompanying_course_work.action'|trans }}

-

- {{ w.socialAction|chill_entity_render_box }} +
+ +
+

+ {{ 'accompanying_course_work.action'|trans }} + {{ w.socialAction|chill_entity_render_string }}

-
-
    -
  • -
    - {{ w.createdAt|format_date('long') }} -
    -
    - {{ 'accompanying_course_work.create_date'|trans }} -
    -
  • -
  • -
    - {{ w.startDate|format_date('long') }} -
    -
    - {{ 'accompanying_course_work.start_date'|trans }} -
    -
  • -
  • -
    - {{ w.endDate|format_date('long') }} -
    -
    - {{ 'accompanying_course_work.end_date'|trans }} -
    -
  • -
-
- - {% 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 %} -
-
+
+
+
    +
  • +
    + {{ w.createdAt|format_date('long') }} +
    +
    + {{ 'accompanying_course_work.create_date'|trans }} +
    +
  • +
  • +
    + {{ w.startDate|format_date('long') }} +
    +
    + {{ 'accompanying_course_work.start_date'|trans }} +
    +
  • +
  • +
    + {{ w.endDate|format_date('long') }} +
    +
    + {{ 'accompanying_course_work.end_date'|trans }} +
    +
  • +
- {% endif %} - - {% if w.goals|length > 0 %} - {% for g in w.goals %} -
-
+ {# + {% if w.results|length > 0 %} +
+

{{ 'accompanying_course_work.goal'|trans }}

-

{{ g.goal.title|localize_translatable_string }}

+

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

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

{{ 'accompanying_course_work.results'|trans }}

-

{{ 'accompanying_course_work.no_results'|trans }}

- {% else %} -

{{ 'accompanying_course_work.results'|trans }}

-
    - {% for r in g.results %} -
  • {{ r.title|localize_translatable_string }}
  • - {% endfor %} -
- {% endif %} +
+

{{ 'accompanying_course_work.results'|trans }}

+
    + {% for r in w.results %} +
  • {{ r.title|localize_translatable_string }}
  • + {% endfor %} +
- {% endfor %} - {% endif %} - -
- {{ 'Last updated by'|trans}}: {{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('long', 'short') }} + {% endif %} + {% if w.goals|length > 0 %} + {% 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 }}

+

{{ 'accompanying_course_work.no_results'|trans }}

+ {% else %} +

{{ 'accompanying_course_work.results'|trans }}

+
    + {% for r in g.results %} +
  • {{ r.title|localize_translatable_string }}
  • + {% endfor %} +
+ {% endif %} +
+
+ {% endfor %} + {% endif %} + #}
- -
+
+
+ {{ 'Last updated by'|trans}} {{ w.updatedBy|chill_entity_render_box }}, {{ 'le ' ~ w.updatedAt|format_datetime('long', 'short') }} +
-
- {% else %} -

{{ 'accompanying_course_work.Any work'|trans }}

- {% endfor %} +
+ {% endfor %} +
  • @@ -120,3 +124,4 @@
{% endblock %} + diff --git a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig index 9eb115e6b..ca7ed9e02 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/AccompanyingPeriod/_list.html.twig @@ -113,18 +113,18 @@ {# TODO if enable_accompanying_course_with_multiple_persons is true ... #}
  • {# {{ 'See this period'|trans }} #} + class="btn btn-show" title="{{ 'See accompanying period'|trans }}">{# {{ 'See this period'|trans }} #}
  • {% if person is defined %}
  • + class="btn btn-update" title="{{ 'Edit accompanying period'|trans }}">
  • {% if accompanying_period.isOpen == true %}
  • + class="btn btn-update change-icon"> {{'Close accompanying period'|trans }} @@ -133,7 +133,7 @@ {% if accompanying_period.canBeReOpened(person) == true %}
  • + class="btn btn-create change-icon"> {{'Re-open accompanying period'|trans }} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php index b61748d73..7da1a8cad 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php @@ -33,11 +33,11 @@ class SocialActionRender implements ChillEntityRenderInterface { return $entity instanceof SocialAction; } - + public function renderString($socialAction, array $options): string { /** @var $socialAction SocialAction */ - $options = \array_merge(self::DEFAULT_ARGS, $options); + $options = \array_merge(self::DEFAULT_ARGS, $options); $titles[] = $this->translatableStringHelper->localize($socialAction->getTitle()); while ($socialAction->hasParent()) { @@ -60,11 +60,11 @@ class SocialActionRender implements ChillEntityRenderInterface } return $parents; - } - + } + public function renderBox($socialAction, array $options): string { - $options = \array_merge(self::DEFAULT_ARGS, $options); + $options = \array_merge(self::DEFAULT_ARGS, $options); // give some help to twig: an array of parents $parents = $this->buildParents($socialAction);