improve layout of custom field on view page

ref #12
This commit is contained in:
2016-11-13 20:27:20 +01:00
parent d90be4ec46
commit 4c265ef293
4 changed files with 110 additions and 71 deletions

View File

@@ -38,13 +38,13 @@ This view should receive those arguments:
{% block personcontent %}
<div class="person-view">
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
{% if person.memo is not empty %}
<div class="grid-12">
<figure class="person-details">
<h2 class="chill-red">{{ 'Memo'|trans|upper }}</h2>
<h2 class="chill-red">{{ 'Memo'|trans }}</h2>
<p>
<blockquote>{{ person.memo|nl2br }}</blockquote>
@@ -54,7 +54,7 @@ This view should receive those arguments:
{% endif %}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-red">{{ 'General information'|trans|upper }}</h2>
<h2 class="chill-red">{{ 'General information'|trans }}</h2>
<dl>
<dt>{{ 'First name'|trans }}&nbsp;:</dt>
@@ -76,7 +76,7 @@ This view should receive those arguments:
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-green"><i class="fa fa-birthday-cake"></i>&nbsp;{{ 'Birth information'|trans|upper }}</h2>
<h2 class="chill-green"><i class="fa fa-birthday-cake"></i>&nbsp;{{ 'Birth information'|trans }}</h2>
<dl>
<dt>{{ 'Date of birth'|trans }}&nbsp;:</dt>
@@ -115,7 +115,7 @@ This view should receive those arguments:
{%- if chill_person.fields.nationality == 'visible' or chill_person.fields.spoken_languages == 'visible'-%}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-orange">{{ 'Administrative information'|trans|upper }}</h2>
<h2 class="chill-orange">{{ 'Administrative information'|trans }}</h2>
{%- if chill_person.fields.nationality == 'visible' -%}
<dl>
@@ -165,7 +165,7 @@ This view should receive those arguments:
{%- if chill_person.fields.email == 'visible' or chill_person.fields.phonenumber == 'visible' -%}
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i>&nbsp;{{ 'Contact information'|trans|upper }}</h2>
<h2 class="chill-blue"><i class="fa fa-envelope-o"></i>&nbsp;{{ 'Contact information'|trans }}</h2>
{%- if chill_person.fields.address == 'visible' -%}
<dl>
@@ -213,16 +213,23 @@ This view should receive those arguments:
{% if cFGroup and (cFGroup.getActiveCustomFields|length > 0) %}
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<div class="grid-6">
<div class="grid-12 custom-fields">
<figure class="person-details">
{{ chill_custom_fields_group_widget(person.cFData, cFGroup) }}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
</div>
<div class="grid-10 push-1 grid-mobile-12 grid-tablet-12 push-mobile-0 push-tablet-0 parent">
<figure class="person-details">
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
{% endif %}
</div> <!-- end of div.person-view -->
{% endblock %}