mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
view one person + list
This commit is contained in:
46
Resources/views/Person/list.html.twig
Normal file
46
Resources/views/Person/list.html.twig
Normal file
@@ -0,0 +1,46 @@
|
||||
{% extends "CLChillMainBundle::layout.html.twig" %}
|
||||
{% block title %}Recherche {{ pattern }}{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<table class="striped rounded">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{% trans %}person.name{% endtrans %}</th>
|
||||
<th>{% trans %}person.dateOfBirth{% endtrans %}</th>
|
||||
<th>{% trans %}person.nationality{% endtrans %}</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for person in persons %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ path('chill_person_view', {id : person.id}) }}">
|
||||
<span class="personSurname">{{person.surname}}</span>
|
||||
<span class="personName">{{person.name}}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td><span class="personDateOfBirth">{{person.dateOfBirth.format(date_format)}}</span></td>
|
||||
<td>
|
||||
{% if person.nationality is not null %}
|
||||
<span class="personNationality">{{person.nationality.label}}</span>
|
||||
{% else %}
|
||||
{{ 'views.Person.list.without_nationality'|trans }}
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
34
Resources/views/Person/view.html.twig
Normal file
34
Resources/views/Person/view.html.twig
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "CLChillMainBundle::layout.html.twig" %}
|
||||
|
||||
|
||||
{#
|
||||
|
||||
This view should receive those arguments:
|
||||
- person
|
||||
|
||||
|
||||
#}
|
||||
|
||||
{% block title %}CLChillPersonBundle:Person:see{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>
|
||||
<span class="surname">{{ person.surname }}</span>
|
||||
<span class="personName">{{ person.name }}</span>
|
||||
</h1>
|
||||
|
||||
<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 %}
|
||||
|
||||
|
||||
{{ include("::menu.html.twig", {'person': person, 'menu_composer' : menu_composer }) }}
|
||||
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
9
Resources/views/menu.html.twig
Normal file
9
Resources/views/menu.html.twig
Normal file
@@ -0,0 +1,9 @@
|
||||
<div>
|
||||
<ul>
|
||||
{% for menu in menu_composer.getRoutesFor('person') %}
|
||||
<li>{{ path(menu, {'id': person.id}) }}</li>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user