mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
move back templates files in Resources/views (revert ced9d17d03
)
This commit is contained in:
37
Resources/views/CRUD/_delete_content.html.twig
Normal file
37
Resources/views/CRUD/_delete_content.html.twig
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
<p class="message-confirm">{{ ('crud.'~crud_name~'.confirm_message_delete')|trans({ '%as_string%': entity|chill_entity_render_string }) }}</p>
|
||||
|
||||
{{ form_start(form) }}
|
||||
|
||||
<ul class="record_actions">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_view %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'view'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-show" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_view', { 'id': entity.id }) }}">
|
||||
{{ 'crud.edit.back_to_view'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block content_form_actions_confirm_delete %}
|
||||
<li>
|
||||
<button type="submit" class="sc-button bt-delete" value="delete-and-close">{{ ('crud.'~crud_name~'.button_delete')|trans }}</button>
|
||||
</li>
|
||||
{% endblock content_form_actions_confirm_delete %}
|
||||
{% block content_form_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
|
||||
{{ form_end(form) }}
|
||||
</div>
|
63
Resources/views/CRUD/_edit_content.html.twig
Normal file
63
Resources/views/CRUD/_edit_content.html.twig
Normal file
@@ -0,0 +1,63 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.'~crud_name~'.title_edit')|trans }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_form %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}
|
||||
{{ form_row(f) }}
|
||||
{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block crud_content_form_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_delete %}
|
||||
{% if chill_crud_action_exists(crud_name, 'delete') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'delete'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-small bt-delete" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_delete', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_delete %}
|
||||
{% block content_form_actions_view %}
|
||||
{% if chill_crud_action_exists(crud_name, 'view') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'view'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-small bt-show" href="{{ chill_path_forward_return_path('chill_crud_'~crud_name~'_view', { 'id': entity.id }) }}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_view %}
|
||||
{% block content_form_actions_save_and_close %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-close" class="sc-button bt-update">
|
||||
{{ 'crud.edit.save_and_close'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_show %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-show" class="sc-button bt-update">
|
||||
{{ 'crud.edit.save_and_show'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
1
Resources/views/CRUD/_edit_title.html.twig
Normal file
1
Resources/views/CRUD/_edit_title.html.twig
Normal file
@@ -0,0 +1 @@
|
||||
{{ ('crud.'~crud_name~'.title_edit')|trans }}
|
1
Resources/views/CRUD/_inc/default.html.twig
Normal file
1
Resources/views/CRUD/_inc/default.html.twig
Normal file
@@ -0,0 +1 @@
|
||||
{{ data }}
|
48
Resources/views/CRUD/_index.html.twig
Normal file
48
Resources/views/CRUD/_index.html.twig
Normal file
@@ -0,0 +1,48 @@
|
||||
<div class="grid-10 centered">
|
||||
|
||||
{% block index_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}</h1>
|
||||
{% endblock index_header %}
|
||||
|
||||
{% if entities|length == 0 %}
|
||||
{% block no_existing_entities %}
|
||||
<p>{{ no_existing_entities_sentences|default('No entities')|trans }}</p>
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
{% block table_entities %}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
{% block table_entities_thead_tr %}
|
||||
<th>id</th>
|
||||
{% endblock %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% block table_entities_tbody %}
|
||||
{% for entity in entities %}
|
||||
<tr>
|
||||
<td>{{ entity.id }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div class="crud_index__pagination">
|
||||
{{ chill_pagination(paginator) }}
|
||||
</div>
|
||||
|
||||
{% block list_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block add_new %}
|
||||
<li>
|
||||
<a href="{{ chill_path_add_return_path('chill_crud_' ~ crud_name ~ '_new') }}" class="sc-button bt-new">{{ ('crud.'~crud_name~'.index.add_new')|trans( {'%crud_name%': crud_name} ) }}</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock list_actions %}
|
||||
</div>
|
50
Resources/views/CRUD/_new_content.html.twig
Normal file
50
Resources/views/CRUD/_new_content.html.twig
Normal file
@@ -0,0 +1,50 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_form %}
|
||||
{{ form_start(form) }}
|
||||
|
||||
{% block crud_content_form_rows %}
|
||||
{% for f in form %}{% if f.vars.name != 'submit' %}
|
||||
{{ form_row(f) }}
|
||||
{% endif %}{% endfor %}
|
||||
{% endblock crud_content_form_rows %}
|
||||
|
||||
{% block crud_content_form_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_form_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_close %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-close" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_close'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_show %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-show" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_show'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_form_actions_save_and_new %}
|
||||
<li class="">
|
||||
<button type="submit" name="submit" value="save-and-new" class="sc-button bt-create">
|
||||
{{ 'crud.new.save_and_new'|trans }}
|
||||
</button>
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{{ form_end(form) }}
|
||||
{% endblock %}
|
||||
</div>
|
1
Resources/views/CRUD/_new_title.html.twig
Normal file
1
Resources/views/CRUD/_new_title.html.twig
Normal file
@@ -0,0 +1 @@
|
||||
{{ ('crud.' ~ crud_name ~ '.title_new')|trans({'%crud_name%' : crud_name }) }}
|
63
Resources/views/CRUD/_view_content.html.twig
Normal file
63
Resources/views/CRUD/_view_content.html.twig
Normal file
@@ -0,0 +1,63 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_view %}
|
||||
|
||||
{% block crud_content_view_details %}
|
||||
<dl class="chill_view_data">
|
||||
<dt>id</dt>
|
||||
<dd>{{ entity.id|default("No id") }}</dd>
|
||||
</dl>
|
||||
{% endblock crud_content_view_details %}
|
||||
|
||||
{% block crud_content_view_actions %}
|
||||
<ul class="record_actions sticky-form-buttons">
|
||||
{% block content_view_actions_back %}
|
||||
<li class="cancel">
|
||||
<a class="sc-button bt-cancel" href="{{ chill_return_path_or('chill_crud_'~crud_name~'_index') }}">
|
||||
{{ 'Cancel'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endblock %}
|
||||
{% block content_view_actions_before %}{% endblock %}
|
||||
{% block content_form_actions_delete %}
|
||||
{% if chill_crud_action_exists(crud_name, 'delete') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'delete'), entity) %}
|
||||
<li class="">
|
||||
<a class="sc-button bt-delete" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_delete', { 'id': entity.id }) }}">
|
||||
{{ 'crud.delete.link_to_form'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_form_actions_delete %}
|
||||
{% block content_view_actions_duplicate_link %}
|
||||
{% if chill_crud_action_exists(crud_name, 'new') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'new'), entity) %}
|
||||
<li>
|
||||
<a class="sc-button bt-duplicate" href="{{ chill_path_add_return_path('chill_crud_'~crud_name~'_new', { 'duplicate_id': entity.id, 'duplicate': true }) }}">
|
||||
{{ 'crud.view.link_duplicate'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_view_actions_duplicate_link %}
|
||||
{% block content_view_actions_edit_link %}
|
||||
{% if chill_crud_action_exists(crud_name, 'edit') %}
|
||||
{% if is_granted(chill_crud_config('role', crud_name, 'edit'), entity) %}
|
||||
<li>
|
||||
<a class="sc-button bt-edit" href="{{ chill_path_forward_return_path('chill_crud_'~crud_name~'_edit', { 'id': entity.id }) }}">
|
||||
{{ 'crud.new.link_edit'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content_view_actions_edit_link %}
|
||||
{% block content_view_actions_after %}{% endblock %}
|
||||
</ul>
|
||||
{% endblock crud_content_view_actions %}
|
||||
|
||||
{% endblock crud_content_view %}
|
||||
</div>
|
1
Resources/views/CRUD/_view_title.html.twig
Normal file
1
Resources/views/CRUD/_view_title.html.twig
Normal file
@@ -0,0 +1 @@
|
||||
{{ 'crud.%crud_name%.title_view'|trans({'%crud_name%' : crud_name }) }}
|
8
Resources/views/CRUD/delete.html.twig
Normal file
8
Resources/views/CRUD/delete.html.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}{{ ('crud.' ~ crud_name ~ '.delete.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_delete_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
10
Resources/views/CRUD/edit.html.twig
Normal file
10
Resources/views/CRUD/edit.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_edit_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_edit_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
8
Resources/views/CRUD/index.html.twig
Normal file
8
Resources/views/CRUD/index.html.twig
Normal file
@@ -0,0 +1,8 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}{{ ('crud.' ~ crud_name ~ '.index.title')|trans({'%crud_name%': crud_name}) }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_index.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock content %}
|
10
Resources/views/CRUD/new.html.twig
Normal file
10
Resources/views/CRUD/new.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_new_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_new_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
10
Resources/views/CRUD/view.html.twig
Normal file
10
Resources/views/CRUD/view.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends '@ChillMain/layout.html.twig' %}
|
||||
|
||||
{% block title %}
|
||||
{% include('@ChillMain/CRUD/_view_title.html.twig') %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% embed '@ChillMain/CRUD/_view_content.html.twig' %}
|
||||
{% endembed %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user