mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 17:28:23 +00:00 
			
		
		
		
	remove members page, move to summary
This commit is contained in:
		| @@ -5,49 +5,174 @@ | ||||
| {% block content %} | ||||
| <h1>{{ block('title') }}</h1> | ||||
|  | ||||
| <h2>{{ 'household.Current household members'|trans }}</h2> | ||||
| <h2>{{ 'household.Current address'|trans }}</h2> | ||||
|  | ||||
| {% set address = household.currentAddress %} | ||||
|  | ||||
| {% if address is empty %} | ||||
| <p class="chill-no-data-statement">{{ 'household.Household does not have any address currently'|trans }}</p> | ||||
| {% else %} | ||||
| <div> | ||||
|   {{ address|chill_entity_render_box({'multiline': true}) }} | ||||
| </div> | ||||
| {% endif %} | ||||
|  | ||||
| <h2>{{ 'household.Household members'|trans }}</h2> | ||||
|  | ||||
| {% for p in positions %} | ||||
| {%- set members = household.currentMembersByPosition(p) %} | ||||
| {% if members|length > 0 %} | ||||
| <h3>{{ p.label|localize_translatable_string }}</h3> | ||||
|   <h3>{{ p.label|localize_translatable_string }}</h3> | ||||
|  | ||||
| {% if false == p.shareHousehold %} | ||||
| <p>{{ 'household.Those members does not share address'|trans }}</p> | ||||
| {% endif %} | ||||
|   {% if false == p.shareHousehold %} | ||||
|     <p>{{ 'household.Those members does not share address'|trans }}</p> | ||||
|   {% endif %} | ||||
|  | ||||
| <div class="flex-table list-household-members--summary"> | ||||
|   {% 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 badge-primary">{{ 'household.holder'|trans }}</span> | ||||
|   {%- 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 badge-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="sc-button bt-edit"  | ||||
|                   /> | ||||
|                     {{ 'household.Update membership'|trans }} | ||||
|                   </a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                   <a  | ||||
|                   href="{{ chill_path_add_return_path( | ||||
|                     'chill_person_household_members_editor',  | ||||
|                     { | ||||
|                       'persons': [ m.person.id ], | ||||
|                       'household': household.id | ||||
|                     } ) }}" | ||||
|                     class="sc-button"  | ||||
|                     /> | ||||
|                     <i class="fa fa-arrows-h"></i> | ||||
|                     {{ 'household.Change position'|trans }} | ||||
|                   </a> | ||||
|                 </li> | ||||
|                 <li> | ||||
|                   <a  | ||||
|                   href="{{ chill_path_add_return_path( | ||||
|                     'chill_person_household_members_editor',  | ||||
|                     { | ||||
|                       'persons': [ m.person.id ],  | ||||
|                       'allow_leave_without_household': true  | ||||
|                     } ) }}" | ||||
|                     class="sc-button"  | ||||
|                     /> | ||||
|                     <i class="fa fa-sign-out"></i> | ||||
|                     {{ 'household.Leave'|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> | ||||
|         <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> | ||||
|       {% 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="sc-button bt-green" type="button" data-toggle="collapse" data-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 badge-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="sc-button bt-edit"  | ||||
|                     /> | ||||
|                       {{ '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> | ||||
|   </div> | ||||
|   {% endfor %} | ||||
| </div> | ||||
|  | ||||
| {% endif %} | ||||
|  | ||||
|   {% endif %} | ||||
| {% endfor %} | ||||
|  | ||||
| <ul class="record_actions"> | ||||
|   <li> | ||||
|     <a  | ||||
|     href="{{ chill_path_add_return_path('chill_person_household_members_editor', {'household': household.id }) }}" | ||||
|       class="sc-button bt-create"> | ||||
|       {{ 'household.Add a member'|trans }} | ||||
|     </a> | ||||
|   </li> | ||||
| </ul> | ||||
|  | ||||
| {% endblock %} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user