layout content position for fullwidth pages

This commit is contained in:
2021-07-22 22:19:27 +02:00
parent c9562ebdf7
commit 7ac61002b0
6 changed files with 93 additions and 101 deletions

View File

@@ -17,7 +17,7 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title %}{{ 'Add a person'|trans }}{% endblock title %}
{% block content %}
<div class="col-md-10 col-xxl person-new">
@@ -47,6 +47,5 @@
{{ form_end(form) }}
</div>
{% endblock content %}

View File

@@ -17,80 +17,75 @@
{% extends "@ChillMain/layout.html.twig" %}
{% block title %}{{ 'Alreay existing person'|trans }}{% endblock title %}
{% block content %}
<div class="person-new col-12 my-5">
<div class="row justify-content-center">
<div class="col-md-10 col-xxl">
<div class="alert alert-warning flash_message">
<span>
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
%nb% person with similar name. Please verify that this is a new person
{% endtranschoice %}
</span>
</div>
{% if alternatePersons is not empty %}
<table class="table table-bordered border-dark">
<thead>
<tr>
<th class="chill-red">{{ 'Name'|trans }}</th>
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
</tr>
</thead>
<tbody>
{% for person in alternatePersons %}
<tr>
<td>
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
{{ person|chill_entity_render_string }}{% apply spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% endif %}
{% endapply %}
</a>
</td>
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %}&nbsp;{% endif %}</td>
<td>
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div id="person_details" class="my-5">
{{ form_start(form) }}
<h2>{{ 'You will create this person'|trans }}</h2>
<dl>
<dt>{{ 'Name'|trans }}</dt>
<dd>{{ person|chill_entity_render_string }}</dd>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>{{ birthdate|format_date('long')|default( 'Unknown date of birth'|trans ) }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ gender|trans }}</dd>
<dt>{{ 'Creation date'|trans }}</dt>
<dd>{{ creation_date|format_date('long') }}</dd>
{% if form.altNames is defined %}
{# mark as rendered #}
{{ form_widget(form.altNames) }}
{% endif %}
</dl>
{{ form_rest(form) }}
<button class="btn btn-submit" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
{{ form_end(form) }}
</div>
</div>
{% block content %}
<div class="col-md-10 col-xxl person-new">
<div class="alert alert-warning flash_message">
<span>
{% transchoice alternatePersons|length with { '%nb%': alternatePersons|length } %}
%nb% person with similar name. Please verify that this is a new person
{% endtranschoice %}
</span>
</div>
</div>
{% if alternatePersons is not empty %}
<table class="table table-bordered border-dark">
<thead>
<tr>
<th class="chill-red">{{ 'Name'|trans }}</th>
<th class="chill-green">{{ 'Date of birth'|trans }}</th>
<th class="chill-orange">{{ 'Nationality'|trans }}</th>
</tr>
</thead>
<tbody>
{% for person in alternatePersons %}
<tr>
<td>
<a href="{{ path('chill_person_view', {'person_id': person.id } ) }}">
{{ person|chill_entity_render_string }}{% apply spaceless %}
{% if person.isOpen == false %}
<i class="icon-lock"></i>
{% endif %}
{% endapply %}
</a>
</td>
<td>{% if person.birthdate is not null %}{{ person.birthdate|format_date('long') }}{% else %}&nbsp;{% endif %}</td>
<td>
{% if person.nationality is not null %}{{ person.nationality.name|localize_translatable_string }}{% else %}{{ 'Without nationality'|trans }}{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<div id="person_details" class="my-5">
{{ form_start(form) }}
<h2>{{ 'You will create this person'|trans }}</h2>
<dl>
<dt>{{ 'Name'|trans }}</dt>
<dd>{{ person|chill_entity_render_string }}</dd>
<dt>{{ 'Date of birth'|trans }}</dt>
<dd>{{ birthdate|format_date('long')|default( 'Unknown date of birth'|trans ) }}</dd>
<dt>{{ 'Gender'|trans }}</dt>
<dd>{{ gender|trans }}</dd>
<dt>{{ 'Creation date'|trans }}</dt>
<dd>{{ creation_date|format_date('long') }}</dd>
{% if form.altNames is defined %}
{# mark as rendered #}
{{ form_widget(form.altNames) }}
{% endif %}
</dl>
{{ form_rest(form) }}
<button class="btn btn-submit" type="submit"><i class="fa fa-check"></i> {{ 'Confirm the creation'|trans }}</button>
{{ form_end(form) }}
</div>
</div>
{% endblock content %}