mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 13:03:50 +00:00
work on basic CRUDController and improve configuration
This commit is contained in:
28
Resources/views/CRUD/_edit_content.html.twig
Normal file
28
Resources/views/CRUD/_edit_content.html.twig
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="{% block crud_content_main_div_class %}grid-10 centered{% endblock %}">
|
||||
{% block crud_content_header %}
|
||||
<h1>{{ 'crud.title.edit_of_%crud_name%'|trans({'%crud_name%' : crud_name }) }}</h1>
|
||||
{% endblock crud_content_header %}
|
||||
|
||||
{% block crud_content_form %}
|
||||
{{ form_start(form) }}
|
||||
{% for f in form if f.vars.name != 'submit' %}
|
||||
{{ form_row(f) }}
|
||||
{% endfor %}
|
||||
|
||||
{% block crud_content_form_actions %}
|
||||
<div class="{% block crud_content_form_actions_class %}grid-12 centered sticky-form-buttons{% endblock %}">
|
||||
<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>
|
||||
{% endblock %}
|
||||
<li>{{ form_widget(form.submit, { 'attr': { 'class': 'sc-button bt-edit'} } ) }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% 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.title.edit_of_%crud_name%'|trans({'%crud_name%' : crud_name }) }}
|
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 %}
|
Reference in New Issue
Block a user