From d07c7d428636dbaf9150ea9204bd4cfc721027fd Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Tue, 25 Aug 2015 19:49:48 +0200 Subject: [PATCH] Basic version of view person (thibaut design) --- Resources/public/css/person.css | 9 +- Resources/public/css/person.css.map | 4 +- Resources/public/sass/person.scss | 10 +- Resources/views/Form/go_to_form.html.twig | 7 +- Resources/views/Person/view.html.twig | 240 +++++++++++----------- 5 files changed, 143 insertions(+), 127 deletions(-) diff --git a/Resources/public/css/person.css b/Resources/public/css/person.css index eec217076..7ef405cd4 100644 --- a/Resources/public/css/person.css +++ b/Resources/public/css/person.css @@ -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 */ diff --git a/Resources/public/css/person.css.map b/Resources/public/css/person.css.map index c1dc18e28..f8b7d25d5 100644 --- a/Resources/public/css/person.css.map +++ b/Resources/public/css/person.css.map @@ -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,OAAO;;;AAG1D,WAA+B;EAC7B,KAAK,EAJoD,OAAO;;;AAGlE,YAA+B;EAC7B,KAAK,EAJ4D,OAAO;;;AAG1E,WAA+B;EAC7B,KAAK,EAJoE,OAAO;;;AAGlF,gBAA+B;EAC7B,KAAK,EAJ4E,OAAO;;;AAG1F,iBAA+B;EAC7B,KAAK,EAJoF,OAAO;;;ACXpG,sBAAuB;EACnB,UAAU,EAAE,8BAAwC;EACpD,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,eAAe;EAC5B,aAAa,EAAE,KAAK;;AAGrB,wBAAG;EACF,UAAU,EAAE,KAAK;;AAGlB,wBAAG;EACF,WAAW,EAAE,eAAe;;AAG7B,wBAAG;EACF,WAAW,EAAE,CAAC", -"sources": ["../../../../main/Resources/public/sass/custom/config/_colors.scss","../sass/person.scss"], +"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,OAAO;;;AAG1D,WAA+B;EAC7B,KAAK,EAJoD,OAAO;;;AAGlE,YAA+B;EAC7B,KAAK,EAJ4D,OAAO;;;AAG1E,WAA+B;EAC7B,KAAK,EAJoE,OAAO;;;AAGlF,gBAA+B;EAC7B,KAAK,EAJ4E,OAAO;;;AAG1F,iBAA+B;EAC7B,KAAK,EAJoF,OAAO;;;ACXpG,sBAAuB;EACnB,UAAU,EAAE,8BAAwC;EACpD,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" } diff --git a/Resources/public/sass/person.scss b/Resources/public/sass/person.scss index 4ad7348b3..b6cd6de1b 100644 --- a/Resources/public/sass/person.scss +++ b/Resources/public/sass/person.scss @@ -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; + } } \ No newline at end of file diff --git a/Resources/views/Form/go_to_form.html.twig b/Resources/views/Form/go_to_form.html.twig index 9dfddf864..8e72a48e2 100644 --- a/Resources/views/Form/go_to_form.html.twig +++ b/Resources/views/Form/go_to_form.html.twig @@ -1,6 +1 @@ -
- - -
+{{ 'Edit'|trans|upper }} \ No newline at end of file diff --git a/Resources/views/Person/view.html.twig b/Resources/views/Person/view.html.twig index d7fdf05b4..af914c8fc 100644 --- a/Resources/views/Person/view.html.twig +++ b/Resources/views/Person/view.html.twig @@ -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 %} - -
-

{{ 'General information'|trans|upper }}

- -
-
{{ 'First name'|trans }}
-
{{ person.firstName }}
- -
{{ 'Last name'|trans }}
-
{{ person.lastName }}
- -
{{ 'Gender'|trans }}
-
{{ ( person.gender|default('Not given'))|trans }}
-
-
- -
-

{{ 'Birth information'|trans|upper }}

- -
-
{{ 'Date of birth'|trans }}
-
- {%- if person.birthdate is not null -%} - {{ person.birthdate|localizeddate('long', 'none') }} - {%- else -%} - {{ 'Unknown date of birth'|trans }} - {%- endif -%} -
- +
+
+
+

{{ 'General information'|trans|upper }}

-
{{ 'Place of birth'|trans }}
-
{{ person.placeOfBirth }}
-
{% spaceless %} +
+
{{ 'First name'|trans }}
+
{{ person.firstName }}
- {% if person.countryOfBirth is not null %} - {{ person.countryOfBirth.name|localize_translatable_string }} - {% else %} - {{ 'Unknown country of birth'|trans }} - {% endif %} +
{{ 'Last name'|trans }}
+
{{ person.lastName }}
+ +
{{ 'Gender'|trans }}
+
{{ ( person.gender|default('Not given'))|trans }}
+
-{% endspaceless %}
- - -
-
-{% if is_granted('CHILL_PERSON_UPDATE', person) %} -{{ include(edit_tmp_name, edit_tmp_args) }} -{% endif %} - -
-

{{ 'Administrative information'|trans|upper }}

- -
-
{{ 'Nationality'|trans }}
-
- {% 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 %} -
-
-
-
{{'Spoken languages'|trans}}
-
- {% 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 %} +
+ + +
+
+

 {{ 'Birth information'|trans|upper }}

+ +
+
{{ 'Date of birth'|trans }}
+
+ {%- if person.birthdate is not null -%} + {{ person.birthdate|localizeddate('long', 'none') }} + {%- else -%} + {{ 'Unknown date of birth'|trans }} + {%- endif -%} +
+ +
{{ 'Place of birth'|trans }}
+
{{ person.placeOfBirth }}
+
{% spaceless %} + {% if person.countryOfBirth is not null %} + {{ person.countryOfBirth.name|localize_translatable_string }} + {% else %} + {{ 'Unknown country of birth'|trans }} + {% endif %} + {% endspaceless %}
+
+ + {% if is_granted('CHILL_PERSON_UPDATE', person) %} + {{ include(edit_tmp_name, edit_tmp_args) }} {% endif %} - - -
-
{{'Marital status'|trans}}
-
- {% if person.maritalStatus is not null %} - {{ person.maritalStatus.name|localize_translatable_string }} - {% else %} - {{ 'no data given'|trans }} +
+
+ + +
+
+
+

{{ 'Administrative information'|trans|upper }}

+ +
+
{{ 'Nationality'|trans }}
+
+ {% if person.nationality is not null %} + {{ person.nationality.name|localize_translatable_string }} + {% else %} + {{ 'Without nationality'|trans }} + {% endif %} +
+
+
+
{{'Spoken languages'|trans}}
+
+ {% 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 %} +
+
+
+
{{'Marital status'|trans}}
+
+ {% if person.maritalStatus is not null %} + {{ person.maritalStatus.name|localize_translatable_string }} + {% else %} + {{ 'no data given'|trans }} + {% endif %} +
+
+ + {% if is_granted('CHILL_PERSON_UPDATE', person) %} + {{ include(edit_tmp_name, edit_tmp_args) }} {% endif %} - - -
+ +
+
+
+

 {{ 'Contact information'|trans|upper }}

-{% if is_granted('CHILL_PERSON_UPDATE', person) %} -{{ include(edit_tmp_name, edit_tmp_args) }} -{% endif %} +
+
{{ 'Email'|trans }}
+
{{ person.email}} 
+
+
+
{{ 'Phonenumber'|trans }}
+
{{ person.phonenumber}} 
+
-
-

{{ 'Contact information'|trans|upper }}

-
-
{{ 'Email'|trans }}
-
{{ person.email}} 
-
-
-
{{ 'Phonenumber'|trans }}
-
{{ person.phonenumber}} 
-
- -
- -{% 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 %} +
+
+
{% if cFGroup %} -
- {% for customField in cFGroup.customFields %} - {% if customField.type == 'title' %} - {{ chill_custom_field_widget(person.cFData , customField) }} - {% else %} -
{{ chill_custom_field_label(customField) }}
-
{{ chill_custom_field_widget(person.cFData , customField) }}
- {% endif %} - {% endfor %} -
+
+
+
+ {% for customField in cFGroup.customFields %} + {% if customField.type == 'title' %} + {{ chill_custom_field_widget(person.cFData , customField) }} + {% else %} +
{{ chill_custom_field_label(customField) }}
+
{{ chill_custom_field_widget(person.cFData , customField) }}
+ {% 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 %} +
+
+
{% endif %} {% endblock %}