Basic version of view person (thibaut design)

This commit is contained in:
Marc Ducobu 2015-08-25 19:49:48 +02:00
parent d197944858
commit d07c7d4286
5 changed files with 143 additions and 127 deletions

View File

@ -58,16 +58,21 @@ div#header-person-details {
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000319}}
figure.person-details h2 {
font-family: 'open_sansbold';
font-family: 'open_sanssemibold';
margin-bottom: 0.3em; }
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000324}}
figure.person-details dl {
margin-top: 0.3em; }
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000328}}
figure.person-details dt {
font-family: 'open_sansbold'; }
font-family: 'open_sanssemibold'; }
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000332}}
figure.person-details dd {
margin-left: 0; }
@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000336}}
figure.person-details a.sc-button {
background-color: #000;
padding-top: 0.2em;
padding-bottom: 0.2em; }
/*# sourceMappingURL=person.css.map */

View File

@ -1,7 +1,7 @@
{
"version": 3,
"mappings": ";AAiBE,WAA+B;EAC7B,KAAK,EAJI,OAAO;;;AAGlB,YAA+B;EAC7B,KAAK,EAJY,OAAO;;;AAG1B,iBAA+B;EAC7B,KAAK,EAJoB,OAAO;;;AAGlC,aAA+B;EAC7B,KAAK,EAJ4B,OAAO;;;AAG1C,aAA+B;EAC7B,KAAK,EAJoC,OAAO;;;AAGlD,UAA+B;EAC7B,KAAK,EAJ4C,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KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,GAAG;;;AAGvB,yBAA0B;EACtB,UAAU,EAAE,8BAAmC;EAC/C,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,GAAG;;;AAItB,wBAAG;EACF,WAAW,EAAE,mBAAmB;EAChC,aAAa,EAAE,KAAK;;AAGrB,wBAAG;EACF,UAAU,EAAE,KAAK;;AAGlB,wBAAG;EACF,WAAW,EAAE,mBAAmB;;AAGjC,wBAAG;EACF,WAAW,EAAE,CAAC;;AAGf,iCAAY;EACX,gBAAgB,ECnBY,IAAI;EDoBhC,WAAW,EAAE,KAAK;EAClB,cAAc,EAAE,KAAK",
"sources": ["../../../../main/Resources/public/sass/custom/config/_colors.scss","../sass/person.scss","../../../../main/Resources/public/sass/config/_colors.scss"],
"names": [],
"file": "person.css"
}

View File

@ -17,7 +17,7 @@ div#header-person-details {
figure.person-details {
h2 {
font-family: 'open_sansbold';
font-family: 'open_sanssemibold';
margin-bottom: 0.3em;
}
@ -26,10 +26,16 @@ figure.person-details {
}
dt {
font-family: 'open_sansbold';
font-family: 'open_sanssemibold';
}
dd {
margin-left: 0;
}
a.sc-button {
background-color: $black;
padding-top: 0.2em;
padding-bottom: 0.2em;
}
}

View File

@ -1,6 +1 @@
<div class="form_control">
<div class="controls">
<div class="small warning btn icon-right entypo icon-pencil"><a href="{{ path(form_path_key, form_path_args) }}">{{ 'Edit'|trans }}</a></div>
</div>
</div>
<a class="sc-button black" href="{{ path(form_path_key, form_path_args) }}">{{ 'Edit'|trans|upper }}</a>

View File

@ -35,134 +35,144 @@ This view should receive those arguments:
{% block personcontent %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
<figure class="person-details">
<h2 class="chill-red">{{ 'General information'|trans|upper }}</h2>
<dl>
<dt>{{ 'First name'|trans }}</dt>
<dd>{{ person.firstName }}</dd>
<dt>{{ 'Last name'|trans }}</dt>
<dd>{{ person.lastName }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
</dl>
</figure>
<figure class="person-details">
<h2 class="chill-green">{{ 'Birth information'|trans|upper }}</h2>
<dl>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>
{%- if person.birthdate is not null -%}
{{ person.birthdate|localizeddate('long', 'none') }}
{%- else -%}
{{ 'Unknown date of birth'|trans }}
{%- endif -%}
</dd>
<div class="grid-10 push-1 parent">
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-red">{{ 'General information'|trans|upper }}</h2>
<dt>{{ 'Place of birth'|trans }}</dt>
<dd>{{ person.placeOfBirth }}</dd>
<dd>{% spaceless %}
<dl>
<dt>{{ 'First name'|trans }}</dt>
<dd>{{ person.firstName }}</dd>
{% if person.countryOfBirth is not null %}
{{ person.countryOfBirth.name|localize_translatable_string }}
{% else %}
{{ 'Unknown country of birth'|trans }}
{% endif %}
<dt>{{ 'Last name'|trans }}</dt>
<dd>{{ person.lastName }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ ( person.gender|default('Not given'))|trans }}</dd>
</dl>
{% endspaceless %}</dd>
</dl>
</figure>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
<figure class="person-details">
<h2 class="chill-orange">{{ 'Administrative information'|trans|upper }}</h2>
<dl>
<dt>{{ 'Nationality'|trans }}</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
{{ 'Without nationality'|trans }}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</dd>
</dl>
<dl>
<dt>{{'Spoken languages'|trans}}</dt>
<dd>
{% if person.spokenLanguages|length == 0 %}
{{ 'Unknown spoken languages'|trans }}
{% else %}
{% for lang in person.spokenLanguages %}
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
{% endfor %}
</figure>
</div>
<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>
<dl>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>
{%- if person.birthdate is not null -%}
{{ person.birthdate|localizeddate('long', 'none') }}
{%- else -%}
{{ 'Unknown date of birth'|trans }}
{%- endif -%}
</dd>
<dt>{{ 'Place of birth'|trans }}</dt>
<dd>{{ person.placeOfBirth }}</dd>
<dd>{% spaceless %}
{% if person.countryOfBirth is not null %}
{{ person.countryOfBirth.name|localize_translatable_string }}
{% else %}
{{ 'Unknown country of birth'|trans }}
{% endif %}
{% endspaceless %}</dd>
</dl>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</dd>
</dl>
<dl>
<dt>{{'Marital status'|trans}}</dt>
<dd>
{% if person.maritalStatus is not null %}
{{ person.maritalStatus.name|localize_translatable_string }}
{% else %}
{{ 'no data given'|trans }}
</figure>
</div>
</div>
<div class="grid-10 push-1 parent">
<div class="grid-6">
<figure class="person-details">
<h2 class="chill-orange">{{ 'Administrative information'|trans|upper }}</h2>
<dl>
<dt>{{ 'Nationality'|trans }}</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.name|localize_translatable_string }}
{% else %}
{{ 'Without nationality'|trans }}
{% endif %}
</dd>
</dl>
<dl>
<dt>{{'Spoken languages'|trans}}</dt>
<dd>
{% if person.spokenLanguages|length == 0 %}
{{ 'Unknown spoken languages'|trans }}
{% else %}
{% for lang in person.spokenLanguages %}
{{ lang.name|localize_translatable_string }}{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
</dd>
</dl>
<dl>
<dt>{{'Marital status'|trans}}</dt>
<dd>
{% if person.maritalStatus is not null %}
{{ person.maritalStatus.name|localize_translatable_string }}
{% else %}
{{ 'no data given'|trans }}
{% endif %}
</dd>
</dl>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</dd>
</dl>
</figure>
</figure>
</div>
<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>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
<dl>
<dt>{{ 'Email'|trans }}</dt>
<dd><pre>{{ person.email}}&nbsp;</pre></dd>
</dl>
<dl>
<dt>{{ 'Phonenumber'|trans }}</dt>
<dd><pre>{{ person.phonenumber}}&nbsp;</pre></dd>
</dl>
<figure class="person-details">
<h2 class="chill-blue">{{ 'Contact information'|trans|upper }}</h2>
<dl>
<dt>{{ 'Email'|trans }}</dt>
<dd><pre>{{ person.email}}&nbsp;</pre></dd>
</dl>
<dl>
<dt>{{ 'Phonenumber'|trans }}</dt>
<dd><pre>{{ person.phonenumber}}&nbsp;</pre></dd>
</dl>
</figure>
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
</div>
{% if cFGroup %}
<figure class="person-details">
{% for customField in cFGroup.customFields %}
{% if customField.type == 'title' %}
{{ chill_custom_field_widget(person.cFData , customField) }}
{% else %}
<dt>{{ chill_custom_field_label(customField) }}</dt>
<dd>{{ chill_custom_field_widget(person.cFData , customField) }}</dd>
{% endif %}
{% endfor %}
</figure>
<div class="grid-10 push-1 parent">
<div class="grid-6">
<figure class="person-details">
{% for customField in cFGroup.customFields %}
{% if customField.type == 'title' %}
{{ chill_custom_field_widget(person.cFData , customField) }}
{% else %}
<dt>{{ chill_custom_field_label(customField) }}</dt>
<dd>{{ chill_custom_field_widget(person.cFData , customField) }}</dd>
{% endif %}
{% endfor %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
{% if is_granted('CHILL_PERSON_UPDATE', person) %}
{{ include(edit_tmp_name, edit_tmp_args) }}
{% endif %}
</figure>
</div>
</div>
{% endif %}
{% endblock %}