mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '239-create-documents' into 'master'
239 - generated doc block moved to top page See merge request Chill-Projet/chill-bundles!682
This commit is contained in:
commit
da83b1e98c
5
.changes/unreleased/UX-20240507-160217.yaml
Normal file
5
.changes/unreleased/UX-20240507-160217.yaml
Normal file
@ -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: ""
|
@ -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 %}
|
||||||
|
<div class="document-list">
|
||||||
|
<h1>{{ "Documents" }}</h1>
|
||||||
|
|
||||||
{% set activeRouteKey = '' %}
|
{{ filter | chill_render_filter_order_helper }}
|
||||||
|
|
||||||
{% 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 %}
|
|
||||||
<div class="document-list">
|
|
||||||
<h1>{{ 'Documents' }}</h1>
|
|
||||||
|
|
||||||
{{ filter|chill_render_filter_order_helper }}
|
|
||||||
|
|
||||||
{% if documents|length == 0 %}
|
|
||||||
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
|
||||||
{% else %}
|
|
||||||
<div class="flex-table chill-task-list">
|
|
||||||
{% for document in documents %}
|
|
||||||
{{ document|chill_generic_doc_render }}
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{{ chill_pagination(pagination) }}
|
|
||||||
|
|
||||||
<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) %}
|
|
||||||
<ul class="record_actions sticky-form-buttons">
|
|
||||||
<li class="create">
|
|
||||||
<a href="{{ path('accompanying_course_document_new', {'course': accompanyingCourse.id}) }}" class="btn btn-create">
|
|
||||||
{{ 'Create'|trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if documents|length > 5 %}
|
||||||
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
|
data-entity-class="Chill\PersonBundle\Entity\AccompanyingPeriod"
|
||||||
|
data-entity-id="{{ accompanyingCourse.id }}"
|
||||||
|
></div>
|
||||||
|
{% endif %} {% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ "No documents" | trans }}</p>
|
||||||
|
{% else %}
|
||||||
|
<div class="flex-table chill-task-list">
|
||||||
|
{% for document in documents %}
|
||||||
|
{{ document | chill_generic_doc_render }}
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{{ chill_pagination(pagination) }}
|
||||||
|
|
||||||
|
<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) %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="create">
|
||||||
|
<a
|
||||||
|
href="{{
|
||||||
|
path('accompanying_course_document_new', {
|
||||||
|
course: accompanyingCourse.id
|
||||||
|
})
|
||||||
|
}}"
|
||||||
|
class="btn btn-create"
|
||||||
|
>
|
||||||
|
{{ "Create" | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,74 +1,70 @@
|
|||||||
{#
|
{# * Copyright (C) 2018, Champs Libres Cooperative SCRLFS,
|
||||||
* Copyright (C) 2018, Champs Libres Cooperative SCRLFS, <http://www.champs-libres.coop>
|
<http://www.champs-libres.coop> * * This program is free software: you can
|
||||||
*
|
redistribute it and/or modify * it under the terms of the GNU Affero General
|
||||||
* This program is free software: you can redistribute it and/or modify
|
Public License as * published by the Free Software Foundation, either version 3
|
||||||
* it under the terms of the GNU Affero General Public License as
|
of the * License, or (at your option) any later version. * * This program is
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY;
|
||||||
* License, or (at your option) any later version.
|
without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A
|
||||||
*
|
PARTICULAR PURPOSE. See the * GNU Affero General Public License for more
|
||||||
* This program is distributed in the hope that it will be useful,
|
details. * * You should have received a copy of the GNU Affero General Public
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
License * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
#} {% extends "@ChillPerson/Person/layout.html.twig" %} {% set activeRouteKey =
|
||||||
* GNU Affero General Public License for more details.
|
'' %} {% import "@ChillDocStore/Macro/macro.html.twig" as m %} {% block title %}
|
||||||
*
|
{{ 'Documents for %name%'|trans({ '%name%': person|chill_entity_render_string } ) }}
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
{% endblock %} {% block js %}
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
{{ parent() }}
|
||||||
#}
|
{{ encore_entry_script_tags("mod_docgen_picktemplate") }}
|
||||||
|
{{ encore_entry_script_tags("mod_entity_workflow_pick") }}
|
||||||
{% extends "@ChillPerson/Person/layout.html.twig" %}
|
{{ encore_entry_script_tags("mod_document_action_buttons_group") }}
|
||||||
|
{% endblock %} {% block css %}
|
||||||
{% set activeRouteKey = '' %}
|
{{ parent() }}
|
||||||
|
{{ encore_entry_link_tags("mod_docgen_picktemplate") }}
|
||||||
{% import "@ChillDocStore/Macro/macro.html.twig" as m %}
|
{{ encore_entry_link_tags("mod_entity_workflow_pick") }}
|
||||||
|
{{ encore_entry_link_tags("mod_document_action_buttons_group") }}
|
||||||
{% block title %}
|
{% endblock %} {% block content %}
|
||||||
{{ '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 %}
|
|
||||||
|
|
||||||
<div class="col-md-10 col-xxl">
|
<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>
|
||||||
|
|
||||||
{{ filter|chill_render_filter_order_helper }}
|
{{ filter | chill_render_filter_order_helper }}
|
||||||
|
|
||||||
{% if documents|length == 0 %}
|
{% if documents|length > 5 %}
|
||||||
<p class="chill-no-data-statement">{{ 'No documents'|trans }}</p>
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
|
data-entity-class="Chill\PersonBundle\Entity\Person"
|
||||||
|
data-entity-id="{{ person.id }}"
|
||||||
|
></div>
|
||||||
|
{% endif %} {% if documents|length == 0 %}
|
||||||
|
<p class="chill-no-data-statement">{{ "No documents" | trans }}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="flex-table chill-task-list">
|
<div class="flex-table chill-task-list">
|
||||||
{% for document in documents %}
|
{% for document in documents %}
|
||||||
{{ document|chill_generic_doc_render }}
|
{{ document | chill_generic_doc_render }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ chill_pagination(pagination) }}
|
{{ chill_pagination(pagination) }}
|
||||||
|
|
||||||
<div data-docgen-template-picker="data-docgen-template-picker" data-entity-class="Chill\PersonBundle\Entity\Person" data-entity-id="{{ person.id }}"></div>
|
<div
|
||||||
|
data-docgen-template-picker="data-docgen-template-picker"
|
||||||
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
data-entity-class="Chill\PersonBundle\Entity\Person"
|
||||||
<ul class="record_actions sticky-form-buttons">
|
data-entity-id="{{ person.id }}"
|
||||||
<li class="create">
|
></div>
|
||||||
<a href="{{ path('person_document_new', {'person': person.id}) }}" class="btn btn-create">
|
|
||||||
{{ 'Create new document' | trans }}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
{% if is_granted('CHILL_PERSON_DOCUMENT_CREATE', person) %}
|
||||||
|
<ul class="record_actions sticky-form-buttons">
|
||||||
|
<li class="create">
|
||||||
|
<a
|
||||||
|
href="{{ path('person_document_new', { person: person.id }) }}"
|
||||||
|
class="btn btn-create"
|
||||||
|
>
|
||||||
|
{{ "Create new document" | trans }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user