mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
102 lines
5.4 KiB
Twig
102 lines
5.4 KiB
Twig
{% extends '@ChillMain/CRUD/Admin/index.html.twig' %}
|
|
|
|
{% block js %}
|
|
{{ parent() }}
|
|
{{ encore_entry_script_tags('mod_document_action_buttons_group') }}
|
|
{% endblock %}
|
|
|
|
{% block css %}
|
|
{{ parent() }}
|
|
{{ encore_entry_link_tags('mod_document_action_buttons_group') }}
|
|
{% endblock %}
|
|
|
|
|
|
{% block admin_content %}
|
|
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
|
{% block table_entities_thead_tr %}
|
|
<th></th>
|
|
<th>{{ 'Title'|trans }}</th>
|
|
<th>{{ 'docgen.Context'|trans }}</th>
|
|
<th>{{ 'docgen.test generate'|trans }}</th>
|
|
<th>{{ 'Edit'|trans }}</th>
|
|
{% endblock %}
|
|
|
|
{% block table_entities_tbody %}
|
|
{% if entities|length == 0 %}
|
|
<p class="chill-no-data-statement">{{ 'docgen.Any template configured'|trans }}</p>
|
|
{% else %}
|
|
<div class="flex-table">
|
|
{% for entity in entities %}
|
|
<div class="item-bloc">
|
|
<div class="item-row">
|
|
<div class="item-col" style="flex-basis:100%;">
|
|
<h2>{{ entity.name|localize_translatable_string }}</h2>
|
|
</div>
|
|
</div>
|
|
<div class="item-row">
|
|
<p><span class="badge bg-chill-green-dark">{{ contextManager.getContextByKey(entity.context).name|trans }}</span></p>
|
|
</div>
|
|
<div class="item-row">
|
|
<div class="item-col"></div>
|
|
<ul class="record_actions item-col flex-shrink-1">
|
|
<li>
|
|
<form method="get" action="{{ path('chill_docgenerator_test_generate_redirect') }}">
|
|
<input type="hidden" name="returnPath" value="{{ app.request.query.get('returnPath', app.request.uri)|e('html_attr') }}" />
|
|
<input type="hidden" name="template" value="{{ entity.id|e('html_attr') }}" />
|
|
<input type="hidden" name="entityClassName" value="{{ contextManager.getContextByKey(entity.context).entityClass|e('html_attr') }}" />
|
|
<input type="text" name="entityId" placeholder="{{ 'docgen.entity_id_placeholder'|trans }}" required />
|
|
|
|
<button type="submit" class="btn btn-mini btn-misc"><i class="fa fa-cog"></i>{{ 'docgen.test generate'|trans }}</button>
|
|
</form>
|
|
</li>
|
|
<li>
|
|
{{ entity.file|chill_document_button_group('Template file', true) }}
|
|
</li>
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_crud_docgen_template_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
{% for entity in entities %}
|
|
<tr>
|
|
<td>{{ entity.id }}</td>
|
|
<td>{{ entity.name|localize_translatable_string}}</td>
|
|
<td>{{ contextManager.getContextByKey(entity.context).name|trans }}</td>
|
|
<td>
|
|
<form method="get" action="{{ path('chill_docgenerator_test_generate_redirect') }}">
|
|
<input type="hidden" name="returnPath" value="{{ app.request.query.get('returnPath', app.request.uri)|e('html_attr') }}" />
|
|
<input type="hidden" name="template" value="{{ entity.id|e('html_attr') }}" />
|
|
<input type="hidden" name="entityClassName" value="{{ contextManager.getContextByKey(entity.context).entityClass|e('html_attr') }}" />
|
|
<input type="text" name="entityId" />
|
|
|
|
<button type="submit" class="btn btn-mini btn-misc"><i class="fa fa-cog"></i>{{ 'docgen.test generate'|trans }}</button>
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<ul class="record_actions">
|
|
<li>
|
|
{{ entity.file|chill_document_button_group('Template file', true, {small: true}) }}
|
|
</li>
|
|
<li>
|
|
<a href="{{ chill_path_add_return_path('chill_crud_docgen_template_edit', { 'id': entity.id }) }}" class="btn btn-edit" title="{{ 'Edit'|trans }}"></a>
|
|
</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
|
|
{% block actions_before %}
|
|
<li class='cancel'>
|
|
<a href="{{ path('chill_main_admin_central') }}" class="btn btn-cancel">{{'Back to the admin'|trans}}</a>
|
|
</li>
|
|
{% endblock %}
|
|
{% endembed %}
|
|
{% endblock %}
|