mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge remote-tracking branch 'origin/issue442_toggle_emergency' into issue442_toggle_emergency
This commit is contained in:
commit
22aefca5c9
@ -17,6 +17,7 @@ and this project adheres to
|
||||
* [person] Add title to AccPeriodWorkEvaluationDocument (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/466)
|
||||
* [person] Order social issues by the field "ordering" (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/388)
|
||||
* [Person/Household list] when listing other simultaneous members of an household, exclude the members on person, not on members (avoid to show two membersship with the same person)
|
||||
* [draft periods] add a delete button (if acl granted) on each draft period listed on draft period page (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/463)
|
||||
* [Person] Display suffixText in RenderPerson, PersonText.vue, RenderPersonBox.vue (was made for displaying "enfant confie") (https://gitlab.com/champs-libres/departement-de-la-vendee/chill/-/issues/441)
|
||||
|
||||
## Test releases
|
||||
|
@ -1,8 +1,10 @@
|
||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
||||
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
|
||||
{% import '@ChillPerson/Macro/updatedBy.html.twig' as mmm %}
|
||||
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<div class="item-col" style="width: unset">
|
||||
<div class="denomination h2">
|
||||
{{ document.title }}
|
||||
</div>
|
||||
@ -30,57 +32,51 @@
|
||||
</div>
|
||||
</div>
|
||||
{% if document.description is not empty %}
|
||||
<div class="item-row separator">
|
||||
<blockquote class="chill-user-quote">
|
||||
<div class="item-row">
|
||||
<blockquote class="chill-user-quote col">
|
||||
{{ 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>
|
||||
{{ 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 %}
|
||||
<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>
|
||||
<div>
|
||||
{% if document.course is defined %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
{{ chill_entity_workflow_list('Chill\\DocStoreBundle\\Entity\\AccompanyingCourseDocument', document.id) }}
|
||||
</li>
|
||||
{% 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>
|
||||
|
@ -15,11 +15,12 @@ use ChampsLibres\WopiLib\Contract\Service\Discovery\DiscoveryInterface;
|
||||
use Chill\DocStoreBundle\Entity\StoredObject;
|
||||
use Twig\Environment;
|
||||
use Twig\Extension\RuntimeExtensionInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
|
||||
class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
final class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
{
|
||||
public const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
|
||||
private const TEMPLATE = '@ChillDocStore/Button/wopi_edit_document.html.twig';
|
||||
|
||||
private DiscoveryInterface $discovery;
|
||||
|
||||
@ -32,10 +33,6 @@ class WopiEditTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
{
|
||||
$mime_type = $this->discovery->discoverMimeType($document->getType());
|
||||
|
||||
if ([] === $mime_type) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($mime_type as $item) {
|
||||
if (array_key_exists('default', $item) && 'true' === $item['default']) {
|
||||
return true;
|
||||
|
@ -5,6 +5,12 @@
|
||||
{% block title %}{{ 'My accompanying periods in draft'|trans }}{% endblock title %}
|
||||
|
||||
{% macro recordAction(period) %}
|
||||
{% if is_granted('CHILL_PERSON_ACCOMPANYING_PERIOD_DELETE', period) %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_delete', {'accompanying_period_id': period.id }) }}"
|
||||
class="btn btn-delete" title="{{ 'Delete'|trans }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': period.id }) }}"
|
||||
class="btn btn-show" title="{{ 'See accompanying period'|trans }}"></a>
|
||||
|
@ -1,11 +1,17 @@
|
||||
{% macro updatedBy(entity) %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Last updated on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.updatedAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% if entity.updatedBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% if entity.updatedAt != null %}
|
||||
{{ 'Last updated on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.updatedAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if entity.updatedBy != null %}
|
||||
{% if entity.updatedAt != null %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% else %}
|
||||
{{ 'Last updated by'|trans }}
|
||||
{% endif %}
|
||||
<span class="user">
|
||||
{{ entity.updatedBy|chill_entity_render_box }}
|
||||
</span>
|
||||
@ -14,13 +20,19 @@
|
||||
{% endmacro %}
|
||||
|
||||
{% macro createdBy(entity) %}
|
||||
<div class="updatedBy">
|
||||
{{ 'Created on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.createdAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% if entity.createdBy %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
<div class="createdBy">
|
||||
{% if entity.createdAt != null %}
|
||||
{{ 'Created on'|trans }}
|
||||
<span class="date">
|
||||
{{ entity.createdAt|format_datetime('medium', 'short') }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if entity.createdBy != null %}
|
||||
{% if entity.createdAt != null %}
|
||||
{{ ', ' ~ 'by_user'|trans }}
|
||||
{% else %}
|
||||
{{ 'Created by'|trans }}
|
||||
{% endif %}
|
||||
<span class="user">
|
||||
{{ entity.createdBy|chill_entity_render_string }}
|
||||
</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user