translation, layout, and menu

This commit is contained in:
2018-06-07 21:54:37 +02:00
parent fcc74c993d
commit 686473be39
10 changed files with 173 additions and 57 deletions

View File

@@ -28,7 +28,7 @@
{% endblock %}
{% block personcontent %}
<h1>{{ 'Document for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}</h1>
<h1>{{ 'Documents for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}</h1>
<table class="table">
<thead>
@@ -52,16 +52,12 @@
{{ m.download_button(document.object, document.title) }}
</li>
<li>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="sc-button">
{{ 'See'|trans }}
</a>
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="sc-button bt-show"></a>
</li>
{% endif %}
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="sc-button bt-edit">
{{ 'Edit'|trans }}
</a>
<a href="{{ path('person_document_edit', {'person': person.id, 'id': document.id}) }}" class="sc-button bt-update"></a>
</li>
{% endif %}
</ul>

View File

@@ -21,12 +21,18 @@
{% block title %}{{ 'New document for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %}
<h1>{{ 'Create new Document' | trans }}</h1>
<h1>{{ 'New document for %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}</h1>
{{ form_errors(form) }}
{{ form_start(form) }}
{{ form_widget(form) }}
{{ form_row(form.title) }}
{{ form_row(form.date) }}
{{ form_row(form.category) }}
{{ form_row(form.scope) }}
{{ form_row(form.description) }}
{{ form_row(form.object, { 'label': 'Document', 'existing': document.object }) }}
<ul class="record_actions">
<li class="cancel">

View File

@@ -18,51 +18,58 @@
{% set activeRouteKey = '' %}
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% block title %}{{ 'Detail of document of %name%'|trans({ '%name%': person.firstName|capitalize ~ ' ' ~ person.lastName } )|capitalize }}{% endblock %}
{% block personcontent %}
<h1>{{ 'Document' | trans }}</h1>
<table class="table">
<tbody>
<tr>
<th>{{ 'Title' | trans }}</th>
<td>{{ document.title }}</td>
</tr>
<tr>
<th>{{ 'Description' | trans }}</th>
<td>{{ document.description }}</td>
</tr>
<tr>
<th>{{ 'Content' | trans }}</th>
<td>{{ document.content }}</td>
</tr>
<tr>
<th>{{ 'Center' | trans}}</th>
<td>{{ document.center }}</td>
</tr>
<tr>
<th>{{ 'Scope' | trans }}</th>
<td>{{ document.scope.name | localize_translatable_string }}</td>
</tr>
<tr>
<th>{{ 'Last modificiation by' | trans }}</th>
<td>{{ document.user }}</td>
</tr>
<tr>
<th>{{ 'Last update' | trans }}</th>
<td>{{ document.date ? document.date|date('Y-m-d H:i:s') : '' }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="sc-button">
{{ 'Back to list' | trans }}
</a>
<a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="sc-button bt-edit">
{{ 'Edit' | trans }}
</a>
{{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }}
{% block js %}
<script src="{{ asset('build/async_upload.js') }}" type="text/javascript"></script>
{% endblock %}
{% block personcontent %}
<h1>{{ 'Document %title%' | trans({ '%title%': document.title }) }}</h1>
<dl class="chill_view_data">
<dt>{{ 'Title'|trans }}</dt>
<dd>{{ document.title }}</dd>
<dt>{{ 'Scope' | trans }}</dt>
<dd>{{ document.scope.name | localize_translatable_string }}</dd>
<dt>{{ 'Category'|trans }}</dt>
<dd>{{ document.category.name|localize_translatable_string }}</dd>
<dt>{{ 'Description' | trans }}</dt>
<dd>
{% if document.description is empty %}
<span class="chill-no-data-statement">{{ 'Any description' }}</span>
{% else %}
<blockquote class="chill-user-quote">
{{ document.description }}
</blockquote>
{% endif %}
</dd>
</dl>
<ul class="record_actions">
<li class="cancel">
<a href="{{ path('person_document_index', {'person': person.id}) }}" class="sc-button bt-cancel">
{{ 'Back to the list' | trans }}
</a>
</li>
<li>
{{ m.download_button(document.object, document.title) }}
</li>
{% if is_granted('CHILL_PERSON_DOCUMENT_UPDATE', document) %}
<li>
<a href="{{ path('person_document_edit', {'id': document.id, 'person': person.id}) }}" class="sc-button bt-edit">
{{ 'Edit' | trans }}
</a>
</li>
{% endif %}
{# {{ include('ChillDocStoreBundle:PersonDocument:_delete_form.html.twig') }} #}
{% endblock %}