mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +00:00 
			
		
		
		
	| @@ -1,191 +0,0 @@ | ||||
| {% extends '@ChillPerson/Household/layout.html.twig' %} | ||||
|  | ||||
| {% block title 'household.Household members'|trans %} | ||||
|  | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| {% if form is not null %} | ||||
|   {{ form_start(form) }} | ||||
|  | ||||
|   {{ form_row(form.commentMembers) }} | ||||
|  | ||||
|   <div id="waitingForBirthContainer"> | ||||
|   {{ form_row(form.waitingForBirth) }} | ||||
|   </div> | ||||
|  | ||||
|   <div id="waitingForBirthDateContainer"> | ||||
|   {{ form_row(form.waitingForBirthDate) }} | ||||
|   </div> | ||||
|  | ||||
|   <ul class="record_actions"> | ||||
|     <li> | ||||
|       <button type="submit" class="btn btn-save"> | ||||
|         {{ 'Save'|trans }} | ||||
|       </button> | ||||
|     </li> | ||||
|   </ul> | ||||
|  | ||||
|   {{ form_end(form) }} | ||||
|  | ||||
| {% else %} | ||||
|  | ||||
|   {% if not household.commentMembers.isEmpty() %} | ||||
|       {{ household.commentMembers|chill_entity_render_box }} | ||||
|   {% endif %} | ||||
|  | ||||
|   {% if household.waitingForBirth %} | ||||
|     {% if household.waitingForBirthDate is not null %} | ||||
|     {{ 'household.Expecting for birth on date'|trans({ 'date': household.waitingForBirthDate|format_date('long') }) }} | ||||
|     {% else %} | ||||
|     {{ 'household.Expecting for birth'|trans }} | ||||
|     {% endif %} | ||||
|   {% else %} | ||||
|     <p class="chill-no-data-statement"> | ||||
|       {{ 'household.Any expecting birth'|trans }} | ||||
|     </p> | ||||
|   {% endif %} | ||||
|  | ||||
|   <ul class="record_actions"> | ||||
|     <li> | ||||
|       <a href="{{ chill_path_add_return_path('chill_person_household_members', { 'household_id': household.id, 'edit': 1 }) }}" | ||||
|         class="btn btn-edit"> | ||||
|         {{ 'household.Comment and expecting birth'|trans }} | ||||
|       </a> | ||||
|     </li> | ||||
|   </ul> | ||||
|  | ||||
| {% endif %} | ||||
|  | ||||
| {% for p in positions %} | ||||
|   <h3>{{ p.label|localize_translatable_string }}</h3> | ||||
|  | ||||
|   {% if false == p.shareHousehold %} | ||||
|     <p>{{ 'household.Those members does not share address'|trans }}</p> | ||||
|   {% endif %} | ||||
|  | ||||
|   {%- set members = household.currentMembersByPosition(p) %} | ||||
|   {% if members|length > 0 %} | ||||
|     <div class="flex-table list-household-members"> | ||||
|       {% for m in members %} | ||||
|         <div class="item-bloc"> | ||||
|           <div class="item-row person"> | ||||
|             <div class="item-col box-person"> | ||||
|               <div> | ||||
|                 {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|                 {% if m.holder %} | ||||
|                   <span class="badge bg-primary">{{ 'household.holder'|trans }}</span> | ||||
|                 {% endif %} | ||||
|               </div> | ||||
|               <div> | ||||
|                 {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|               </div> | ||||
|             </div> | ||||
|             <div class="item-col box-where"> | ||||
|               <ul class="list-content fa-ul"> | ||||
|                 {% if m.startDate is not empty %} | ||||
|                   <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|                 {% endif %} | ||||
|                 {% if m.endDate is not empty %} | ||||
|                   <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|                 {% endif %} | ||||
|               </ul> | ||||
|               <ul class="record_actions"> | ||||
|                 <li> | ||||
|                     <a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'persons': [ m.person.id ], 'allow_leave_without_household': true } ) }}" | ||||
|                         class="btn btn-misc" title="{{ 'household.Leave household'|trans }}" /> | ||||
|                         <i class="fa fa-sign-out"></i> | ||||
|                         {{ 'household.Leave household'|trans }} | ||||
|                     </a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                     <a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}" | ||||
|                         class="btn btn-edit" title="{{ 'household.Update membership'|trans }}"/></a> | ||||
|                 </li> | ||||
|               </ul> | ||||
|             </div> | ||||
|           </div> | ||||
|           {% if m.comment is not empty %} | ||||
|             <div class="item-row comment"> | ||||
|               <blockquote class="chill-user-quote"> | ||||
|                 {{ m.comment|chill_markdown_to_html }} | ||||
|               </blockquote> | ||||
|             </div> | ||||
|           {% endif %} | ||||
|         </div> | ||||
|       {% endfor %} | ||||
|     </div> | ||||
|   {% else %} | ||||
|   <p class="chill-no-data-statement">{{ 'household.Any persons into this position'|trans }}</p> | ||||
|   {% endif %} | ||||
|  | ||||
|   {% set members = household.nonCurrentMembersByPosition(p) %} | ||||
|   {% if members|length > 0 %} | ||||
|     <p><!-- force a space after table --></p> | ||||
|     <button class="btn btn-green" type="button" data-bs-toggle="collapse" data-bs-target="#nonCurrent_{{ p.id }}" aria-expanded="false" aria-controls="collapse non current members"> | ||||
|       {{ 'household.Show future or past memberships'|trans({'length': members|length}) }} | ||||
|     </button> | ||||
|  | ||||
|     <div id="nonCurrent_{{ p.id }}" class="collapse"> | ||||
|       <div class="flex-table list-household-members"> | ||||
|         {% for m in members %} | ||||
|           <div class="item-bloc"> | ||||
|             <div class="item-row person"> | ||||
|               <div class="item-col box-person"> | ||||
|                 <div> | ||||
|                   {{ m.person|chill_entity_render_box({'addLink': true}) }} | ||||
|                   {% if m.holder %} | ||||
|                     <span class="badge bg-primary">{{ 'household.holder'|trans }}</span> | ||||
|                   {% endif %} | ||||
|                 </div> | ||||
|                 <div> | ||||
|                   {{ 'Born the date'|trans({ 'gender': m.person.gender, 'birthdate': m.person.birthdate|format_date('long') }) }} | ||||
|                 </div> | ||||
|               </div> | ||||
|               <div class="item-col box-where"> | ||||
|                 <ul class="list-content fa-ul"> | ||||
|                   {% if m.startDate is not empty %} | ||||
|                     <li>{{ 'Since %date%'|trans({'%date%': m.startDate|format_date('long') }) }}</li> | ||||
|                   {% endif %} | ||||
|                   {% if m.endDate is not empty %} | ||||
|                     <li>{{ 'Until %date%'|trans({'%date%': m.endDate|format_date('long') }) }}</li> | ||||
|                   {% endif %} | ||||
|                 </ul> | ||||
|                 <ul class="record_actions"> | ||||
|                   <li> | ||||
|                     <a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}" | ||||
|                     class="btn btn-edit" title="{{ 'household.Update membership'|trans }}"></a> | ||||
|                   </li> | ||||
|                 </ul> | ||||
|               </div> | ||||
|             </div> | ||||
|             {% if m.comment is not empty %} | ||||
|             <div class="item-row comment"> | ||||
|               <blockquote class="chill-user-quote"> | ||||
|                 {{ m.comment|chill_markdown_to_html }} | ||||
|               </blockquote> | ||||
|             </div> | ||||
|             {% endif %} | ||||
|           </div> | ||||
|         {% endfor %} | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|   {% endif %} | ||||
|  | ||||
| {% endfor %} | ||||
|  | ||||
| <ul class="record_actions sticky-form-buttons"> | ||||
|   <li> | ||||
|     <a href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}" | ||||
|       class="btn btn-create"> | ||||
|       {{ 'household.Add a member'|trans }} | ||||
|     </a> | ||||
|   </li> | ||||
| </ul> | ||||
|  | ||||
| {% endblock %} | ||||
|  | ||||
| {% block js %} | ||||
| {{ encore_entry_script_tags('household_edit_metadata') }} | ||||
| {% endblock %} | ||||
		Reference in New Issue
	
	Block a user