diff --git a/.changes/unreleased/UX-20240507-160217.yaml b/.changes/unreleased/UX-20240507-160217.yaml new file mode 100644 index 000000000..f74a2f2ef --- /dev/null +++ b/.changes/unreleased/UX-20240507-160217.yaml @@ -0,0 +1,5 @@ +kind: UX +body: Form for document generation moved to the top of document list page +time: 2024-05-07T16:02:17.11820977+02:00 +custom: + Issue: "" diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig index b22c7d00f..46b08f37d 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/accompanying_period_list.html.twig @@ -1,54 +1,62 @@ -{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %} +{% extends "@ChillPerson/AccompanyingCourse/layout.html.twig" %} {% set +activeRouteKey = '' %} {% block title %} +{{ "Documents" }} +{% endblock %} {% block js %} +{{ parent() }} +{{ encore_entry_script_tags("mod_docgen_picktemplate") }} +{{ encore_entry_script_tags("mod_entity_workflow_pick") }} +{{ encore_entry_script_tags("mod_document_action_buttons_group") }} +{% endblock %} {% block css %} +{{ parent() }} +{{ encore_entry_script_tags("mod_docgen_picktemplate") }} +{{ encore_entry_link_tags("mod_entity_workflow_pick") }} +{{ encore_entry_link_tags("mod_document_action_buttons_group") }} +{% endblock %} {% block content %} +
+

{{ "Documents" }}

-{% set activeRouteKey = '' %} - -{% block title %} - {{ 'Documents' }} -{% endblock %} - -{% block js %} - {{ parent() }} - {{ encore_entry_script_tags('mod_docgen_picktemplate') }} - {{ encore_entry_script_tags('mod_entity_workflow_pick') }} - {{ encore_entry_script_tags('mod_document_action_buttons_group') }} -{% endblock %} - -{% block css %} - {{ parent() }} - {{ encore_entry_script_tags('mod_docgen_picktemplate') }} - {{ encore_entry_link_tags('mod_entity_workflow_pick') }} - {{ encore_entry_link_tags('mod_document_action_buttons_group') }} -{% endblock %} - -{% block content %} -
-

{{ 'Documents' }}

- - {{ filter|chill_render_filter_order_helper }} - - {% if documents|length == 0 %} -

{{ 'No documents'|trans }}

- {% else %} -
- {% for document in documents %} - {{ document|chill_generic_doc_render }} - {% endfor %} -
- {% endif %} - - {{ chill_pagination(pagination) }} - -
- - {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', accompanyingCourse) %} - - {% endif %} + {{ filter | chill_render_filter_order_helper }} + {% if documents|length > 5 %} +
+ {% endif %} {% if documents|length == 0 %} +

{{ "No documents" | trans }}

+ {% else %} +
+ {% for document in documents %} + {{ document | chill_generic_doc_render }} + {% endfor %}
+ {% endif %} + + {{ chill_pagination(pagination) }} + +
+ + {% if is_granted('CHILL_ACCOMPANYING_COURSE_DOCUMENT_CREATE', + accompanyingCourse) %} + + {% endif %} +
{% endblock %} diff --git a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig index a4aa4fbbc..5bc9f42d1 100644 --- a/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig +++ b/src/Bundle/ChillDocStoreBundle/Resources/views/GenericDoc/person_list.html.twig @@ -1,74 +1,70 @@ -{# - * Copyright (C) 2018, Champs Libres Cooperative SCRLFS, - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -#} - -{% extends "@ChillPerson/Person/layout.html.twig" %} - -{% set activeRouteKey = '' %} - -{% import "@ChillDocStore/Macro/macro.html.twig" as m %} - -{% block title %} - {{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }} -{% endblock %} - -{% block js %} - {{ parent() }} - {{ encore_entry_script_tags('mod_docgen_picktemplate') }} - {{ encore_entry_script_tags('mod_entity_workflow_pick') }} - {{ encore_entry_script_tags('mod_document_action_buttons_group') }} -{% endblock %} - -{% block css %} - {{ parent() }} - {{ encore_entry_link_tags('mod_docgen_picktemplate') }} - {{ encore_entry_link_tags('mod_entity_workflow_pick') }} - {{ encore_entry_link_tags('mod_document_action_buttons_group') }} -{% endblock %} - -{% block content %} +{# * Copyright (C) 2018, Champs Libres Cooperative SCRLFS, + * * This program is free software: you can +redistribute it and/or modify * it under the terms of the GNU Affero General +Public License as * published by the Free Software Foundation, either version 3 +of the * License, or (at your option) any later version. * * This program is +distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; +without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the * GNU Affero General Public License for more +details. * * You should have received a copy of the GNU Affero General Public +License * along with this program. If not, see . +#} {% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey = +'' %} {% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% block title %} +{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }} +{% endblock %} {% block js %} +{{ parent() }} +{{ encore_entry_script_tags("mod_docgen_picktemplate") }} +{{ encore_entry_script_tags("mod_entity_workflow_pick") }} +{{ encore_entry_script_tags("mod_document_action_buttons_group") }} +{% endblock %} {% block css %} +{{ parent() }} +{{ encore_entry_link_tags("mod_docgen_picktemplate") }} +{{ encore_entry_link_tags("mod_entity_workflow_pick") }} +{{ encore_entry_link_tags("mod_document_action_buttons_group") }} +{% endblock %} {% block content %}
-

{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}

+

+ {{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }} +

- {{ filter|chill_render_filter_order_helper }} + {{ filter | chill_render_filter_order_helper }} - {% if documents|length == 0 %} -

{{ 'No documents'|trans }}

+ {% if documents|length > 5 %} +
+ {% endif %} {% if documents|length == 0 %} +

{{ "No documents" | trans }}

{% else %} -
- {% for document in documents %} - {{ document|chill_generic_doc_render }} - {% endfor %} -
+
+ {% for document in documents %} + {{ document | chill_generic_doc_render }} + {% endfor %} +
{% endif %} - {{ chill_pagination(pagination) }} + {{ chill_pagination(pagination) }} -
- - {% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} - - {% endif %} +
+ {% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %} + + {% endif %}
{% endblock %}