Initial commit
This commit is contained in:
@ -0,0 +1,4 @@
|
||||
<form method="post" action="{{ path('bo_item_category_delete', {'id': itemCategory.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ itemCategory.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
||||
22
templates/_dashboard/item_category/_form.html.twig
Normal file
22
templates/_dashboard/item_category/_form.html.twig
Normal file
@ -0,0 +1,22 @@
|
||||
{{ form_start(form) }}
|
||||
<div class="sp_form-row__text">
|
||||
{{ form_label(form.name) }}
|
||||
{{ form_widget(form.name) }}
|
||||
</div>
|
||||
<div class="sp_form-row__text">
|
||||
{{ form_label(form.slug) }}
|
||||
{{ form_widget(form.slug) }}
|
||||
</div>
|
||||
<div class="sp_form-row__text">
|
||||
{{ form_label(form.sortOrder) }}
|
||||
{{ form_widget(form.sortOrder) }}
|
||||
</div>
|
||||
<div class="sp_form-row__button">
|
||||
<a class="sp_button" href="{{ path('bo_item_category_index') }}" data-type="cancel">
|
||||
<span>Cancel</span>
|
||||
</a>
|
||||
<button class="sp_button" data-type="validate" type="submit">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
9
templates/_dashboard/item_category/edit.html.twig
Normal file
9
templates/_dashboard/item_category/edit.html.twig
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends '_dashboard/base.html.twig' %}
|
||||
|
||||
{% block page_content %}
|
||||
<h1>Edit ItemCategory</h1>
|
||||
|
||||
{{ include('_dashboard/item_category/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
{{ include('_dashboard/item_category/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
42
templates/_dashboard/item_category/index.html.twig
Normal file
42
templates/_dashboard/item_category/index.html.twig
Normal file
@ -0,0 +1,42 @@
|
||||
{% extends '_dashboard/base.html.twig' %}
|
||||
|
||||
{% block page_content %}
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<p>
|
||||
<a href="{{ path('bo_item_category_new') }}">Create new</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
{#<th>Id</th>#}
|
||||
<th>Name</th>
|
||||
<th>Slug</th>
|
||||
<th>SortOrder</th>
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<th>actions</th>
|
||||
{% endif %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for _itemCategory in itemsCategories %}
|
||||
<tr>
|
||||
{#<td>{{ _itemCategory.id }}</td>#}
|
||||
<td>{{ _itemCategory.name }}</td>
|
||||
<td>{{ _itemCategory.slug }}</td>
|
||||
<td>{{ _itemCategory.sortOrder }}</td>
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
<td>
|
||||
<a href="{{ path('bo_item_category_edit', {'id': _itemCategory.id}) }}">edit</a>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="{{ is_granted('ROLE_ADMIN') ? '4' : '3' }}">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock %}
|
||||
7
templates/_dashboard/item_category/new.html.twig
Normal file
7
templates/_dashboard/item_category/new.html.twig
Normal file
@ -0,0 +1,7 @@
|
||||
{% extends '_dashboard/base.html.twig' %}
|
||||
|
||||
{% block page_content %}
|
||||
<h1>Create new ItemCategory</h1>
|
||||
|
||||
{{ include('_dashboard/item_category/_form.html.twig') }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user