ergonomic buttons details

This commit is contained in:
Mathieu Jaumotte 2021-06-22 16:15:05 +02:00
parent 5d38d193e2
commit 99d6e030ca
2 changed files with 24 additions and 35 deletions

View File

@ -19,21 +19,21 @@
<div class="grid-12 parent" id="header-household-details" > <div class="grid-12 parent" id="header-household-details" >
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent"> <div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div id="banner-misc"> <div id="banner-misc">
{%- set persons = household.getCurrentPersons() -%} {%- set persons = household.getCurrentPersons() -%}
{%- if persons|length > 0 -%} {%- if persons|length > 0 -%}
<span class="current-members-explain"> <span class="current-members-explain">
{{- 'household.Current household members'|trans }}: {{- 'household.Current household members'|trans }}:
</span> </span>
{%- for p in persons|slice(0, 5) -%} {%- for p in persons|slice(0, 5) -%}
{{- p|chill_entity_render_box({'addLink': false}) -}} {{- p|chill_entity_render_box({'addLink': false}) -}}
{%- if false == loop.last -%}, {% endif -%} {%- if false == loop.last -%}, {% endif -%}
{%- endfor -%} {%- endfor -%}
{% if persons|length > 5 %} {% if persons|length > 5 %}
<span class="current-members-more"> <span class="current-members-more">
{{ 'household.and x other persons'|trans({'x': persons|length-5}) }} {{ 'household.and x other persons'|trans({'x': persons|length-5}) }}
</span> </span>
{% endif %} {% endif %}
{%- endif -%} {%- endif -%}
</div> </div>
</div> </div>
</div> </div>

View File

@ -95,25 +95,17 @@
<ul class="record_actions"> <ul class="record_actions">
<li> <li>
<a <a
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}" href="{{ chill_path_add_return_path('chill_person_household_members_editor', {
class="sc-button bt-edit" 'persons': [ m.person.id ],
/> 'allow_leave_without_household': true
{{ 'household.Update membership'|trans }} } ) }}" class="sc-button" title="{{ 'household.Leave household'|trans }}" />
<i class="fa fa-sign-out"></i>
{{ 'household.Leave household'|trans }}
</a> </a>
</li> </li>
<li> <li>
<a <a href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
href="{{ chill_path_add_return_path( class="sc-button bt-edit" title="{{ 'household.Update membership'|trans }}"/></a>
'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> </li>
</ul> </ul>
</div> </div>
@ -168,10 +160,7 @@
<li> <li>
<a <a
href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}" href="{{ chill_path_add_return_path('chill_person_household_member_edit', { 'id': m.id }) }}"
class="sc-button bt-edit" class="sc-button bt-edit" title="{{ 'household.Update membership'|trans }}" /></a>
/>
{{ 'household.Update membership'|trans }}
</a>
</li> </li>
</ul> </ul>
</div> </div>