1 {% extends "page.html.twig" %}
3 {% import "macros.twig" as macros %}
6 <div class="ui stackable grid">
8 <div class="sixteen wide tablet six wide computer five wide widescreen column order-2">
9 <div class="position-sticky">
10 <div class="ui basic clearing horizontally fitted segment">
12 <div class="ui left floated basic fitted segment">
13 {% include "elements/navigate.html.twig" with {"mpath": "member"} %}
16 <div class="ui right floated basic fitted segment">
17 <div class="ui primary small buttons">
18 {% if member.canEdit(login) %}
20 href="{{ url_for("editMember", {"id": member.id}) }}"
21 class="ui labeled icon button"
23 <i class="user edit icon"></i>
24 {{ _T("Modification") }}
27 <div class="ui combo top right pointing simple dropdown icon button">
28 <i class="dropdown icon"></i>
30 {% if preferences.pref_mail_method != constant('Galette\\Core\\GaletteMail::METHOD_DISABLED') and (login.isAdmin() or login.isStaff()) %}
32 href="{{ url_for("retrieve-pass", {"id_adh": member.id}) }}"
34 title="{{ _T("Send member a link to generate a new password, as if had used the 'lost password' functionality.") }}"
37 <i class="unlock icon"></i>
38 {{ _T("New password") }}
41 {% if (preferences.pref_card_self == 1) or (login.isAdmin() or login.isStaff()) %}
43 href="{% if member.isUp2Date() %}{{ url_for("pdf-members-cards", {'id_adh': member.id}) }}{% else %}#{% endif %}"
44 class="ui item{% if not member.isUp2Date() %} disabled{% endif %} tooltip"
46 <i class="id badge icon"></i>
47 {{ _T("Generate Member Card") }}
50 href="{{ url_for("adhesionForm", {"id_adh": member.id}) }}"
53 <i class="id card icon"></i>
54 {{ _T("Adhesion form") }}
57 {% if login.isAdmin() or login.isStaff() or login.id == member.id or (member.hasParent() and member.parent.id == login.id) %}
59 href="{{ url_for("contributions", {"type": "contributions", "option": "member", "value": member.id}) }}"
62 <i class="receipt icon"></i>
63 {{ _T("View contributions") }}
66 {% if login.isAdmin() or login.isStaff() %}
68 href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_FEE')}) }}?id_adh={{ member.id }}"
71 <i class="money bill alternate outline icon"></i>
72 {{ _T("Add a membership fee") }}
75 href="{{ url_for("addContribution", {"type": constant('Galette\\Entity\\Contribution::TYPE_DONATION')}) }}?id_adh={{ member.id }}"
78 <i class="gift icon"></i>
79 {{ _T("Add a donation") }}
81 {% if login.isAdmin() or login.isStaff() %}
83 href="{{ url_for("duplicateMember", {"id_adh": member.id}) }}"
84 title="{{ _T("Create a new member with %name information.")|replace({"%name": member.sfullname}) }}"
87 <i class="clone icon" aria-hidden="true"></i>
92 {% set actions = callstatic('\\Galette\\Core\\Galette', 'getDetailedActions', member) %}
93 {% for action in actions %}
94 {{ macros.drawDetailedAction(action.label, action.title, action.route, action.icon) }}
103 {% include "elements/member_card.html.twig" %}
105 {% if member.hasParent() or member.hasChildren() %}
106 <div class="ui basic fitted segment">
107 <div class="ui styled fluid accordion row">
108 <div class="active title">
109 <i class="jsonly hidden icon dropdown"></i>
112 <div class="active content field">
113 <table class="ui very basic striped collapsing stackable padded table">
114 {% if member.hasParent() %}
116 <th>{{ _T("Attached to:") }}</th>
117 <td><a href="{{ url_for("member", {"id": member.parent.id}) }}">{{ member.parent.sfullname }}</a></td>
120 {% if member.hasChildren() %}
122 <th>{{ _T("Parent of:") }}</th>
124 {% for child in member.children %}
125 <a href="{{ url_for("member", {"id": child.id}) }}">{{ child.sfullname }}</a>{% if not loop.last %}, {% endif %}
138 <div class="sixteen wide tablet ten wide computer eleven wide widescreen column">
140 {% for display_element in display_elements %}
141 {% set elements = display_element.elements %}
142 <div class="fieldset-{{ display_element.id }} ui basic fitted segment">
143 <div class="ui styled fluid accordion row">
144 <div class="active title">
145 <i class="jsonly displaynone icon dropdown"></i>
146 {{ _T(display_element.label) }}
148 <div class="active content field">
149 <table class="ui very basic striped stackable padded table">
150 {% for element in elements %}
151 {% if element.field_id == 'parent_id' %}
155 {% if element.field_id == 'nom_adh' %}
156 {% set value = member.sfullname %}
157 {% elseif element.field_id == 'pref_lang' %}
158 {% set value = pref_lang %}
159 {% elseif element.field_id == 'adresse_adh' %}
160 {% set value = member.saddress|escape|nl2br %}
161 {% elseif element.field_id == 'bool_display_info' %}
162 {% set value = member.sappears_in_list %}
163 {% elseif element.field_id == 'activite_adh' %}
164 {% set value = member.sactive %}
165 {% elseif element.field_id == 'id_statut' %}
166 {% set value = member.sstatus %}
167 {% elseif element.field_id == 'bool_admin_adh' %}
168 {% set value = member.sadmin %}
169 {% elseif element.field_id == 'bool_exempt_adh' %}
170 {% set value = member.sdue_free %}
171 {% elseif element.field_id == 'info_adh' %}
172 {% set value = member.others_infos_admin|escape|nl2br %}
173 {% elseif element.field_id == 'info_public_adh' %}
174 {% set value = member.others_infos|escape|nl2br %}
176 {% set propname = element.propname %}
177 {% set propvalue = attribute(member, propname) %}
178 {% set value = propvalue|escape %}
180 {% if loop.first and loop.parent.loop.last and (member.getGroups()|length != 0 or member.getManagedGroups()|length != 0) %}
182 <th class="three wide column">{{ _T("Groups:") }}</th>
184 <div class="ui large labels">
185 {% for kgroup, group in groups %}
186 {% if member.isGroupMember(group) or member.isGroupManager(group) %}
187 <a href="{% if login.isGroupManager(kgroup) %}{{ url_for("groups", {"id": kgroup}) }}{% else %}#{% endif %}" class="ui label{% if not login.isGroupManager(kgroup) %} disabled notmanaged{% endif %}">
188 {% if member.isGroupMember(group) %}
189 <i class="ui tag icon tooltip" title="{{ _T("Member of group") }}"></i>
191 {% if member.isGroupManager(group) %}
192 <i class="ui shield icon tooltip" title="{{ _T("Group manager") }}"></i>
203 <th class="three wide column">{{ element.label }}</th>
205 {% if element.field_id == 'nom_adh' %}
206 {% if member.isCompany() %}
207 <i class="ui industry icon"></i>
208 {% elseif member.isMan() %}
209 <i class="ui mars icon"></i>
210 {% elseif member.isWoman() %}
211 <i class="ui venus icon"></i>
214 {% if element.field_id == 'email_adh' %}
215 <a href="mailto:{{ value }}">{{ value }}</a>
216 {% elseif element.field_id == 'tel_adh' or element.field_id == 'gsm_adh' %}
217 <a href="tel:{{ value }}">{{ value }}</a>
218 {% elseif element.field_id == 'ddn_adh' %}
219 {{ value }} {{ member.getAge() }}
230 {# Social networks attached to the contact information fieldset #}
231 {% if display_element.id == '3' %}
232 {% include "elements/display_socials.html.twig" with {socials: member.socials} %}
236 {# Dynamic entries #}
237 {% include "elements/display_dynamic_fields.html.twig" with {object: member} %}
244 {% block javascripts %}
245 {% if login.isAdmin() or login.isStaff() or login.login == member.login %}
246 <script type="text/javascript">
248 {% include "elements/js/photo_dnd.js.twig" %}
250 $('.notmanaged').click(function(){
251 {% include "elements/js/modal.js.twig" with {
252 modal_title_twig: _T("Not managed group")|e("js"),
253 modal_content_twig: _T("You are not part of managers for the requested group.")|e("js"),
255 modal_deny_only: true,
256 modal_cancel_text: _T("Close")|e("js"),
257 modal_classname: "redalert",