mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
templates adjusted
This commit is contained in:
parent
a28d8a7287
commit
3c04ced1a3
@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
{% set activeRouteKey = '' %}
|
{% set activeRouteKey = '' %}
|
||||||
|
|
||||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{{ 'Documents' }}
|
{{ 'Documents' }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -21,51 +19,20 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="col-md-10 col-xxl">
|
||||||
<h1>{{ 'Documents' }}</h1>
|
<h1>{{ 'Documents' }}</h1>
|
||||||
|
|
||||||
<table class="table table-bordered border-dark table-striped">
|
{% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
||||||
<thead>
|
{% else %}
|
||||||
<tr>
|
<div class="flex-table chill-task-list">
|
||||||
<th>{{ 'Title' | trans }}</th>
|
|
||||||
<th>{{ 'Category'|trans }}</th>
|
|
||||||
<th>{{ 'Actions' | trans }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for document in documents %}
|
{% for document in documents %}
|
||||||
<tr>
|
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
|
||||||
<td>{{ document.title }}</td>
|
|
||||||
<td>{% if document.category %}{{ document.category.name|localize_translatable_string }}{% endif %}</td>
|
|
||||||
<td>
|
|
||||||
<ul class="record_actions">
|
|
||||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
|
|
||||||
<li>
|
|
||||||
{{ m.download_button(document.object, document.title) }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="9" style="text-align:center;">
|
|
||||||
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
{% endif %}
|
||||||
|
|
||||||
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod" data-entity-id="{{ accompanyingCourse.id }}"></div>
|
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod" data-entity-id="{{ accompanyingCourse.id }}"></div>
|
||||||
|
|
||||||
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %}
|
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %}
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
@ -76,4 +43,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -0,0 +1,80 @@
|
|||||||
|
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||||
|
|
||||||
|
<div class="item-bloc">
|
||||||
|
<div class="item-row">
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="denomination h2">
|
||||||
|
{{ document.title }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<p>{{ document.category.name|localize_translatable_string }}</p>
|
||||||
|
</div>
|
||||||
|
{% if document.template is not null %}
|
||||||
|
<div>
|
||||||
|
<p>{{ document.template.name.fr }}</p>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="item-col">
|
||||||
|
<div class="container">
|
||||||
|
{% if document.date is not null %}
|
||||||
|
<div class="dates row" style="float: right;">
|
||||||
|
<span>{{ document.createdAt|format_date('short') }}</span>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% if document.description is not null %}
|
||||||
|
<div class="item-row separator">
|
||||||
|
<blockquote class="chill-user-quote">
|
||||||
|
{{ document.description|chill_markdown_to_html }}
|
||||||
|
</blockquote>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="item-row separator">
|
||||||
|
<div class="item-col item-meta">
|
||||||
|
<div class="updatedBy">
|
||||||
|
{{ 'Created by'|trans }}:
|
||||||
|
<span class="user">{{ document.createdBy|chill_entity_render_string }}</span>
|
||||||
|
<span class="date">le {{ document.createdAt|format_date('long') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{% if document.course is defined %}
|
||||||
|
<ul class="record_actions">
|
||||||
|
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
|
||||||
|
<li>
|
||||||
|
{{ m.download_button(document.object, document.title) }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ chill_path_add_return_path('accompanying_course_document_show', {'course': accompanyingCourse.id, 'id': document.id}) }}" class="btn btn-show"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_UPDATE', document) %}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('accompanying_course_document_edit', {'course': accompanyingCourse.id, 'id': document.id }) }}" class="btn btn-update"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% else %}
|
||||||
|
<ul class="record_actions">
|
||||||
|
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
|
||||||
|
<li>
|
||||||
|
{{ m.download_button(document.object, document.title) }}
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-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="btn btn-update"></a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
@ -30,51 +30,19 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block personcontent %}
|
{% block personcontent %}
|
||||||
|
|
||||||
|
<div class="col-md-10 col-xxl">
|
||||||
<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
|
<h1>{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}</h1>
|
||||||
|
|
||||||
<table class="table table-bordered border-dark table-striped">
|
{% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
||||||
<thead>
|
{% else %}
|
||||||
<tr>
|
<div class="flex-table chill-task-list">
|
||||||
<th>{{ 'Title' | trans }}</th>
|
|
||||||
<th>{{ 'Category'|trans }}</th>
|
|
||||||
<th>{{ 'Circle' | trans }}</th>
|
|
||||||
<th>{{ 'Actions' | trans }}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{% for document in documents %}
|
{% for document in documents %}
|
||||||
<tr>
|
{% include 'ChillDocStoreBundle:List:list_item.html.twig' %}
|
||||||
<td>{{ document.title }}</td>
|
|
||||||
<td>{{ document.category.name|localize_translatable_string }}</td>
|
|
||||||
<td>{{ document.scope.name|localize_translatable_string }}</td>
|
|
||||||
<td>
|
|
||||||
<ul class="record_actions">
|
|
||||||
{% if is_granted('CHILL_PERSON_DOCUMENT_SEE_DETAILS', document) %}
|
|
||||||
<li>
|
|
||||||
{{ m.download_button(document.object, document.title) }}
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ path('person_document_show', {'person': person.id, 'id': document.id}) }}" class="btn btn-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="btn btn-update"></a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% else %}
|
|
||||||
<tr>
|
|
||||||
<td colspan="9" style="text-align:center;">
|
|
||||||
<span class="chill-no-data-statement">{{ 'Any document found'|trans }}</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</div>
|
||||||
</table>
|
{% endif %}
|
||||||
|
|
||||||
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
||||||
<ul class="record_actions">
|
<ul class="record_actions">
|
||||||
@ -85,4 +53,6 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user