Skip to content

Commit

Permalink
Exemption : afficher un badge dans la card utilisateur (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Aug 29, 2023
1 parent d89b109 commit 0be7d03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/Resources/views/_partial/style_config.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
.homebox {
border-color: {{ main_color }};
}
.main-color {
background-color: {{ main_color }};
}
.main-color-text {
color: {{ main_color }};
}
Expand Down
11 changes: 9 additions & 2 deletions app/Resources/views/beneficiary/_partial/info.html.twig
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
<div class="card-title">
<!-- user icon -->
<img src="{{ gravatar(beneficiary.email,40) }}" alt="{{ beneficiary.firstname | lower | capitalize }}" class="circle responsive-img" />
<!-- user name -->
{{ beneficiary.firstname | lower | capitalize }} {{ beneficiary.lastname | upper }}
<!-- badges -->
{% if beneficiary.isMain and maximum_nb_of_beneficiaries_in_membership > 1 %}
<span class="badge teal white-text">{{ beneficiary_main_icon }} principal</span>
<span class="badge main-color white-text">{{ beneficiary_main_icon }} principal</span>
{% endif %}
{% if beneficiary.membership.withdrawn %}
<span class="badge red white-text">{{ member_withdrawn_icon }} fermé</span>
{% elseif beneficiary.isNew %}
{% endif %}
{% if beneficiary.isNew %}
<span class="badge red white-text">{{ beneficiary_new_icon }} nouveau</span>
{% endif %}
{% if member.isCurrentlyExemptedFromShifts() %}
<span class="badge teal white-text">{{ member_exempted_icon }} exempté</span>
{% endif %}
{% if beneficiary.membership.frozenChange %}
{% if beneficiary.membership.frozen %}
<span class="badge deep-purple white-text">Dégel à la fin du cycle</span>
Expand Down

0 comments on commit 0be7d03

Please sign in to comment.