Drupal-FR / site-drupalfr

Main site repository
20 stars 8 forks source link

[USER] Member + Organization #216

Closed FlorisMoriceau closed 5 years ago

FlorisMoriceau commented 5 years ago

Dans le module /custom/drupalfr-user, serait-il possible d'implémenter un booléen $variables['is_organisation'] afin que je puisse afficher le badge organisation dans le fichier drupalfr-user-member-badge.html.twig ?

Genre comme ça :

{% if is_member and not is_organization %}
  <div class="user-member--badge">
    <img src="/{{ directory }}/images/Badge_Adherent_Ind_ADFF.svg" alt="{{ 'Member'|t }}">
  </div>
{% elseif is_member and is_organization %}
  <div class="user-member--badge">
    <img src="/{{ directory }}/images/Badge_Adherent_Org_ADFF.svg" alt="{{ 'Organization Member'|t }}">
  </div>
{% elseif is_profile_owner %}
  <div class="user-member--become-member">
    <a class="button hollow primary"
       href="/association/adhesion">
      {{ 'Become a member'|t }}
    </a>
  </div>
{% endif %}
FlorentTorregrosa commented 5 years ago

MR mergée. Ok je te fais ça.

FlorentTorregrosa commented 5 years ago

Done. Je te laisse fermer l'issue.