Skip to content

Commit

Permalink
Semaine type : mieux afficher les postes avec formation (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Dec 13, 2023
1 parent 55bc148 commit 669a2ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion app/Resources/views/period/_partial/period_card.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<h6>Semaine {{ week }}</h6>
{% endif %}
{% for position in positions %}
{% include 'period/_partial/position_shifter_display.html.twig' with { 'position': position, 'anonymized': anonymized } %}
{% include "period/_partial/position_shifter_display.html.twig" with { position: position, anonymized: anonymized } %}
{% endfor %}
{% endif %}
{% endfor %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,31 @@

{% set anonymized = anonymized ?? true %}
{% set shifter = position.shifter %}
{% set formation = position.formation ?? "Sans formation" %}

{% if shifter %}
{# sombody is registered for this PeriodPosition #}
{% set icon = position.formation ? "account_circle" : "person" %}
{% set tooltip_formation = position.formation ? "Formation : " ~ position.formation : "Sans formation" %}

{% if shifter %} {# sombody is registered for this PeriodPosition #}
{% if anonymized %}
{# sombody is registered for this periodposition #}
<div class="tooltipped truncate black-text" data-position="bottom" data-tooltip="Formation : {{ formation }}">
<i class="material-icons">person</i>
<div class="tooltipped truncate black-text" data-position="bottom" data-tooltip="{{ tooltip_formation }}">
<i class="material-icons">{{ icon }}</i>
Réservé
</div>
{% else %}
{% set warning = beneficiary_service.hasWarningStatus(shifter) %}
<a href="{{ path('member_show', { 'member_number': shifter.membership.memberNumber }) }}" target="_blank"
class="black-text tooltipped editable-box truncate" data-position="bottom"
data-tooltip="{{ shifter | print_with_number_and_status_icon | raw }} &#013;&#010; ({{ formation }})">
data-tooltip="{{ shifter | print_with_number_and_status_icon | raw }} &#013;&#010; ({{ tooltip_formation }})">
{% if warning %}
<i class="red-text material-icons warning-animation">warning</i>
{% else %}
<i class="material-icons">person</i>
<i class="material-icons">{{ icon }}</i>
{% endif %}
{{ shifter.getFirstname() }} {{ shifter.getLastname() | first }}
</a>
{% endif %}
{% else %} {# free PeriodPosition #}
<div class="tooltipped truncate black-text" data-position="bottom" data-tooltip="{{ formation }}">
<i class="material-icons">person</i>
{% else %} {# this PeriodPosition is free #}
<div class="tooltipped truncate black-text" data-position="bottom" data-tooltip="{{ tooltip_formation }}">
<i class="material-icons">{{ icon }}</i>
<strong><i>Libre</i></strong>
</div>
{% endif %}

0 comments on commit 669a2ab

Please sign in to comment.