Merge branch 'list_documents_page'

This commit is contained in:
Mathieu Jaumotte 2022-03-01 16:09:10 +01:00
commit aad7a21bc3
5 changed files with 37 additions and 36 deletions

View File

@ -42,41 +42,40 @@
<div class="item-col item-meta">
{{ mmm.createdBy(document) }}
</div>
<div class="item-col">
<ul class="record_actions">
{% if document.course is defined %}
{% 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 class="item-col record_actions flex-shrink-1">
{% if document.course is defined %}
{% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_SEE_DETAILS', document) %}
<li>
{{ chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) }}
{{ 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>
{% else %}
{% 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 %}
{% endif %}
</ul>
</div>
{% 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 %}
<li>
{{ chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) }}
</li>
{% else %}
{% 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 %}
{% endif %}
</ul>
</div>
</div>

View File

@ -278,6 +278,7 @@ table.table-bordered {
}
/// meta-data
div.createdBy,
div.updatedBy,
div.metadata {
span.user, span.date {

View File

@ -279,6 +279,7 @@ div.wrap-header {
li {
margin-right: 5px;
margin-bottom: 5px;
}
}
}

View File

@ -1,7 +1,7 @@
ul.record_actions {
display: flex;
flex-direction: row;
flex-wrap: wrap-reverse;
flex-wrap: wrap;
justify-content: flex-end;
padding: 0.5em 0;

View File

@ -8,7 +8,7 @@
{% endif %}
{% if entity.updatedBy != null %}
{% if entity.updatedAt != null %}
{{ ', ' }}<br>{{ 'by_user'|trans }}
{{ ', ' }}{{ 'by_user'|trans }}
{% else %}
{{ 'Last updated by'|trans }}
{% endif %}
@ -29,7 +29,7 @@
{% endif %}
{% if entity.createdBy != null %}
{% if entity.createdAt != null %}
{{ ', ' }}<br>{{ 'by_user'|trans }}
{{ ', ' }}{{ 'by_user'|trans }}
{% else %}
{{ 'Created by'|trans }}
{% endif %}