work on style and view and layout

This commit is contained in:
2013-11-05 13:25:25 +01:00
parent ee1f43d9aa
commit 7d0348e4de
5 changed files with 193 additions and 37 deletions

View File

@@ -19,4 +19,61 @@ chill_person_view_history:
options:
menu: person
order: 100
label: menu.person.history
label: menu.person.history
#sample
chill_appointment_list:
pattern: /view/{id}/appointment/list
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 200
label: "Rendez-vous"
chill_prof_status_view:
pattern: /view/{id}/prof/list
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 300
label: "Statut Professionnel"
chill_admin_view:
pattern: /view/{id}/administrative
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 400
label: "Statut administratif"
chill_language:
pattern: /view/{id}/language/list
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 500
label: "Langues"
chill_studies:
pattern: /view/{id}/studies
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 600
label: "Études"
chill_notes:
pattern: /view/{id}/notes
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 700
label: "Informations"
chill_docs:
pattern: /view/{id}/docs
defaults: {_controller: CLChillPersonBundle:Person:view}
options:
menu: person
order: 800
label: "Documents"

View File

@@ -3,14 +3,48 @@ person:
surname: Prénom
dateOfBirth: Date de naissance
nationality: Nationalité
civil_union:
divorced: Divorcé
separated: Séparé
widow: Veuf
unknow: Inconnu
cohab: Cohabitation légale
single: Célibataire
search:
q_is_empty: Votre requête est vide. Veuillez introduire un terme de recherche
no_results: La requête <span class="research">%q%</span> ne renvoie aucun résultat.
views:
layout:
born: '{0} Né le %date% | {1} Née le %date%'
without_nationality: Nationalité inconnue
Person:
view:
born: '{0} Né le %date% | {1} Née le %date%'
birth: Naissance
dateOfBirth: Date de naissance
placeOfBirth: Lieu de Naissance
country_of_birth_unknow: Pays inconnu
without_nationality: Nationalité inconnue
family: Famille
civil_union: État civil
nb_of_childs: Nombre d'enfants
nb_of_childs_count: '{0} Aucun enfant|{1} Un enfant | ]1,Inf] %nb% enfants'
nationality: Nationalité
national_number: Numéro national
contact: Informations de contact
email: Courrer électronique
address: Adresse
administrative: Administratif
list:
without_nationality: Nationalité inconnue
menu:
person:
history: Historique
general_view: Informations personnelles

View File

@@ -1,4 +1,4 @@
{% extends "CLChillMainBundle::layout.html.twig" %}
{% extends "CLChillPersonBundle::layout.html.twig" %}
{#
@@ -11,29 +11,81 @@ This view should receive those arguments:
{% block title %}CLChillPersonBundle:Person:see{% endblock %}
{% block content %}
<h1>
<span class="surname">{{ person.surname }}</span>
<span class="personName">{{ person.name }}</span>
</h1>
{% block personcontent %}
<p class="date detail">{% transchoice person.genreNumeric
with {'%date%' : person.dateOfBirth.format('d-m-Y')} %}views.Person.view.born{% endtranschoice %}</p>
{% if person.nationality is not null %}
<p class="nationality detail">{{ person.nationality.label }}</p>
{% else %}
<p class="nationality detail without_nationality">{% trans %}views.Person.view.without_nationality{% endtrans %}</p>
{% endif %}
<section class="tabs vertical">
{{ include("CLChillPersonBundle::menu.html.twig",
{'person': person, 'menu_composer' : menu_composer, 'route_active': 'chill_person_view' }) }}
<div class="tab-content active columns height">
<p>My tab is active so I'll show up first! Inb4 tab 3!</p>
</div>
<figure>
<h2>{{ 'views.Person.view.birth'|trans }}</h2>
</section>
<dl>
<dt class="inline">{{ 'views.Person.view.dateOfBirth'|trans }}</dt>
<dd>{{ person.dateOfBirth.format(date_format) }}</dd>
<dt class="inline">{{ 'views.Person.view.placeOfBirth'|trans }}</dt>
<dd>{{ person.placeOfBirth }}</dd>
<dd>{% spaceless %}
{% if person.countryOfBirth is not null %}
{{ person.countryOfBirth.label }}
{% else %}
{{ 'views.Person.view.country_of_birth_unknow'|trans }}
{% endif %}
{% endspaceless %}</dd>
</dl>
</figure>
<figure>
<h2>{{ 'views.Person.view.family'|trans }}</h2>
<dl>
<dt class="inline">{{ 'views.Person.view.civil_union'|trans }}</dt>
<dd>{{ ('person.civil_union.' ~ person.civilUnion)|trans }}</dd>
<dt class="inline">{{ 'views.Person.view.nb_of_childs'|trans }}</dt>
<dd>{% transchoice person.nbOfChild with { '%nb%': person.nbOfChild } %}views.Person.view.nb_of_childs_count{% endtranschoice %}</dd>
</dl>
</figure>
<figure>
<h2>{{ 'views.Person.view.administrative'|trans }}</h2>
<dl>
<dt class="inline">{{ 'views.Person.view.nationality'|trans }}</dt>
<dd>
{% if person.nationality is not null %}
{{ person.nationality.label }}
{% else %}
{{ 'views.Person.view.without_nationality'|trans }}
{% endif %}
</dd>
<dt class="inline">{{ 'views.Person.view.national_number'|trans }}</dt>
<dd>{{ person.belgianNationalNumber }}</dd>
</dl>
</figure>
<figure>
<h2>{{ 'views.Person.view.contact'|trans }}</h2>
<dl>
<dt class="inline">{{ 'views.Person.view.address'|trans }}</dt>
<dd><pre>{{ person.address}}&nbsp;</pre></dd>
<dt class="inline">{{ 'views.Person.view.email'|trans }}</dt>
<dd><pre>{{ person.email}}&nbsp;</pre></dd>
</dl>
</figure>
{% endblock %}

View File

@@ -1,12 +1,12 @@
<div>
<ul class="tab-nav follow-href-path columns four">
<div class="columns four">
<ul class="tab-nav follow-href-path">
{% for menu in menu_composer.getRoutesFor('person') %}
<li class="{% spaceless %}
{% if menu.route == route_active %}
active
{% endif %}
{% endspaceless %} ">
<a href="{{ path(menu.route, {'id': person.id}) }}" >{{ menu.label }}</a>
<a href="{{ path(menu.route, {'id': person.id}) }}" >{{ menu.label|trans }}</a>
</li>
{% endfor %}