Merge remote-tracking branch 'origin/master' into upgrade-php82

This commit is contained in:
Julien Fastré 2023-03-09 18:02:33 +01:00
commit 244614a691
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
19 changed files with 70 additions and 49 deletions

View File

@ -88,3 +88,11 @@ div.flex-bloc.concerned-groups {
font-size: 120%; font-size: 120%;
} }
} }
/// DOCUMENT LIST IN ACTIVITY ITEM
li.document-list-item {
display: flex;
width: 100%;
justify-content: space-between;
margin-bottom: 0.3rem;
}

View File

@ -68,7 +68,7 @@
<div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div> <div class="wl-col title"><h3>{{ 'Referrer'|trans }}</h3></div>
<div class="wl-col list"> <div class="wl-col list">
<p class="wl-item"> <p class="wl-item">
{{ activity.user|chill_entity_render_box }} <span class="badge-user">{{ activity.user|chill_entity_render_box }}</span>
</p> </p>
</div> </div>
</div> </div>
@ -158,13 +158,21 @@
</div> </div>
{% endif %} {% endif %}
{# Only if ACL SEE_DETAILS AND/OR only on template SHOW ?? {% if is_granted('CHILL_ACTIVITY_SEE_DETAILS', activity) and activity.documents|length > 0 %}
durationTime <div class="wl-row">
travelTime <div class="wl-col title">
comment <h3>{{ 'Documents'|trans }}</h3>
documents </div>
attendee <div class="wl-col list">
#} <ul>
{% for d in activity.documents %}
<li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', activity), {small: true}) }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div> </div>
</div> </div>

View File

@ -8,11 +8,13 @@
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('mod_notification_toggle_read_status') }} {{ encore_entry_script_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('mod_notification_toggle_read_status') }} {{ encore_entry_link_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -23,11 +23,13 @@
{% block js %} {% block js %}
{{ parent() }} {{ parent() }}
{{ encore_entry_script_tags('mod_notification_toggle_read_status') }} {{ encore_entry_script_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block css %} {% block css %}
{{ parent() }} {{ parent() }}
{{ encore_entry_link_tags('mod_notification_toggle_read_status') }} {{ encore_entry_link_tags('mod_notification_toggle_read_status') }}
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
{% endblock %} {% endblock %}
{% block content %} {% block content %}

View File

@ -41,7 +41,7 @@
{% if activity.user and t.userVisible %} {% if activity.user and t.userVisible %}
<li> <li>
<span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span> <span class="item-key">{{ 'Referrer'|trans ~ ': ' }}</span>
<b>{{ activity.user|chill_entity_render_box}}</b> <span class="badge-user">{{ activity.user|chill_entity_render_box }}</span>
</li> </li>
{% endif %} {% endif %}

View File

@ -35,7 +35,9 @@
<div class="item-row separator"> <div class="item-row separator">
<dl class="chill_view_data"> <dl class="chill_view_data">
<dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt> <dt class="inline">{{ 'Referrer'|trans|capitalize }}</dt>
<dd>{{ entity.user|chill_entity_render_box }}</dd> <dd>
<span class="badge-user">{{ entity.user|chill_entity_render_box }}</span>
</dd>
{%- if entity.scope -%} {%- if entity.scope -%}
<dt class="inline">{{ 'Scope'|trans }}</dt> <dt class="inline">{{ 'Scope'|trans }}</dt>
@ -168,7 +170,7 @@
{% if entity.documents|length > 0 %} {% if entity.documents|length > 0 %}
<ul> <ul>
{% for d in entity.documents %} {% for d in entity.documents %}
<li>{{ d.title }} {{ d|chill_document_button_group() }}</li> <li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', entity), {small: true}) }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-if="'ready' === props.storedObject.status" class="dropdown"> <div v-if="'ready' === props.storedObject.status" class="btn-group">
<button :class="Object.assign({'btn': true, 'btn-outline-primary': true, 'dropdown-toggle': true, 'btn-sm': props.small})" type="button" data-bs-toggle="dropdown" aria-expanded="false"> <button :class="Object.assign({'btn': true, 'btn-outline-primary': true, 'dropdown-toggle': true, 'btn-sm': props.small})" type="button" data-bs-toggle="dropdown" aria-expanded="false">
Actions Actions
</button> </button>

View File

@ -38,13 +38,11 @@ async function download_and_open(event: Event): Promise<void> {
button.href = window.URL.createObjectURL(raw); button.href = window.URL.createObjectURL(raw);
button.type = props.storedObject.type; button.type = props.storedObject.type;
if (props.filename !== undefined) { button.download = props.filename || 'document';
button.download = props.filename || 'document';
const ext = mime.getExtension(props.storedObject.type); const ext = mime.getExtension(props.storedObject.type);
if (null !== ext) { if (null !== ext) {
button.download = button.download + '.' + ext; button.download = button.download + '.' + ext;
}
} }
} }

View File

@ -19,6 +19,9 @@ The document is successfully registered: Le document est enregistré
The document is successfully updated: Le document est mis à jour The document is successfully updated: Le document est mis à jour
Any description: Aucune description Any description: Aucune description
document:
Any title: Aucun titre
# delete # delete
Delete document ?: Supprimer le document ? Delete document ?: Supprimer le document ?
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ? Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?

View File

@ -28,7 +28,7 @@ class LocationController extends CRUDController
protected function customizeQuery(string $action, Request $request, $query): void protected function customizeQuery(string $action, Request $request, $query): void
{ {
$query->where('e.availableForUsers = "TRUE"'); $query->where('e.availableForUsers = TRUE');
} }
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator) protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)

View File

@ -72,7 +72,7 @@
</div> </div>
</div> </div>
<div class="item-row column"> <div class="item-row column">
<table class="obj-res-eval my-3"> <table class="obj-res-eval smallfont my-3">
<thead> <thead>
<tr><th class="obj"><h4 class="title_label">Objectif - motif - dispositif</h4></th> <tr><th class="obj"><h4 class="title_label">Objectif - motif - dispositif</h4></th>
<th class="res"><h4 class="title_label">Résultats - orientations</h4></th> <th class="res"><h4 class="title_label">Résultats - orientations</h4></th>

View File

@ -20,9 +20,6 @@ div.accompanying-course-work {
margin: 0; margin: 0;
} }
} }
td {
font-size: 85%;
}
td.obj, td.obj,
td.res { td.res {
width: 50%; width: 50%;
@ -37,6 +34,10 @@ div.accompanying-course-work {
} }
} }
.smallfont table.obj-res-eval {
font-size: 85%;
}
ul { ul {
&.goal_title, &.goal_title,
&.result_list, &.result_list,

View File

@ -3,6 +3,7 @@
# - itemBlocClass: [uniq|colored|extended] # - itemBlocClass: [uniq|colored|extended]
# - displayContent: [short|long] default: short # - displayContent: [short|long] default: short
# - displayAction: [true|false] default: false # - displayAction: [true|false] default: false
# - displayFontSmall: [true|false] default: false
#} #}
<div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}"> <div class="item-bloc{% if displayContent is defined %} {{ displayContent }}{% endif %}{% if itemBlocClass is defined %} {{ itemBlocClass }}{% endif %}">
@ -83,7 +84,7 @@
{%- if w.referrers|length > 0 -%} {%- if w.referrers|length > 0 -%}
{% for u in w.referrers %} {% for u in w.referrers %}
<span class="wl-item"> <span class="wl-item">
{{ u|chill_entity_render_box }} <span class="badge-user">{{ u|chill_entity_render_box }}</span>
{% if not loop.last %}, {% endif %} {% if not loop.last %}, {% endif %}
</span> </span>
{% endfor %} {% endfor %}
@ -110,7 +111,7 @@
</div> </div>
{% if displayContent is not defined or displayContent == 'short' %} {% if displayContent is not defined or displayContent == 'short' %}
<div class="item-row column"> <div class="item-row column{% if displayFontSmall is defined and displayFontSmall == true %} smallfont{% endif %}">
{% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with { {% include 'ChillPersonBundle:AccompanyingCourseWork:_objectifs_results_evaluations.html.twig' with {
'displayContent': displayContent 'displayContent': displayContent
} %} } %}

View File

@ -130,27 +130,20 @@
{% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% import "@ChillDocStore/Macro/macro.html.twig" as m %}
{% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %} {% import "@ChillDocStore/Macro/macro_mimeicon.html.twig" as mm %}
<div class="download mb-4 container"> {% if e.documents|length > 0 %}
{% if e.documents|length > 0 %} <table class="table mt-4 mx-auto">
{% for d in e.documents %} {% for d in e.documents %}
<div class="row"> <tr class="border-0">
<div class="col text-start"> <td class="border-0">{{ d.title }}</td>
{{ d.title }} <td class="border-0">{{ mm.mimeIcon(d.storedObject.type) }}</td>
</div> <td class="border-0 text-end">{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}</td>
<div class="col-md-auto text-center"> </tr>
{{ mm.mimeIcon(d.storedObject.type) }}
</div>
<div class="col col-lg-4 text-end">
{{ d.storedObject|chill_document_button_group(d.title, is_granted('CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_UPDATE', w), {'small': true}) }}
</div>
</div>
{% endfor %} {% endfor %}
</table>
{% else %}
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
{% endif %}
{% else %}
<span class="chill-no-data-statement">{{ 'No document found'|trans }}</span>
{% endif %}
</div>
{% endif %} {% endif %}
</td> </td>

View File

@ -25,6 +25,7 @@
{% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with { {% include '@ChillPerson/AccompanyingCourseWork/_item.html.twig' with {
'displayAction': true, 'displayAction': true,
'displayContent': 'short', 'displayContent': 'short',
'displayFontSmall': true,
'itemBlocClass': '' 'itemBlocClass': ''
} %} } %}
{% endfor %} {% endfor %}

View File

@ -33,8 +33,10 @@
<span class="item-key">{{ 'Referrers'|trans ~ ' : ' }}</span> <span class="item-key">{{ 'Referrers'|trans ~ ' : ' }}</span>
{% for u in w.referrers %} {% for u in w.referrers %}
<span class="badge-user">{{ u|chill_entity_render_box }}</span> <span class="badge-user">{{ u|chill_entity_render_box }}</span>
{% if not loop.last %}, {% endif %}
{% endfor %} {% endfor %}
{% if w.referrers|length == 0 %}
<span class="chill-no-data-statement">{{ 'Not given'|trans }}</span>
{% endif %}
</li> </li>
{% endif %} {% endif %}
<li class="associated-persons"> <li class="associated-persons">

View File

@ -69,7 +69,7 @@
</div> </div>
<div class="wl-col list"> <div class="wl-col list">
<div class="user"> <div class="user">
{{ acp.user|chill_entity_render_box }} <span class="badge-user">{{ acp.user|chill_entity_render_box }}</span>
</div> </div>
</div> </div>
</div> </div>

View File

@ -21,7 +21,7 @@
</h2> </h2>
</div> </div>
<div class="item-row column"> <div class="item-row column">
<table class="obj-res-eval my-3" style="font-size: 110% !important;"> <table class="obj-res-eval my-3">
<thead> <thead>
<tr> <tr>
<th class="eval"> <th class="eval">

View File

@ -49,7 +49,7 @@
</div> </div>
</div> </div>
<div class="item-row column"> <div class="item-row column">
<table class="obj-res-eval my-3" style="font-size: 110% !important;"> <table class="obj-res-eval my-3">
<thead> <thead>
<tr> <tr>
<th class="eval"> <th class="eval">