Initial commit

This commit is contained in:
2025-07-15 23:39:10 +02:00
parent 1d3986a901
commit fb14214612
181 changed files with 31070 additions and 50 deletions

View File

@ -0,0 +1,4 @@
<form method="post" action="{{ path('bo_monster_category_delete', {'id': monsterCategory.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ monsterCategory.id) }}">
<button class="btn">Delete</button>
</form>

View File

@ -0,0 +1,18 @@
{{ 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__button">
<a class="sp_button" href="{{ path('bo_monster_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) }}

View File

@ -0,0 +1,9 @@
{% extends '_dashboard/base.html.twig' %}
{% block page_content %}
<h1>Edit MonsterCategory</h1>
{{ include('_dashboard/monster_category/_form.html.twig', {'button_label': 'Update'}) }}
{{ include('_dashboard/monster_category/_delete_form.html.twig') }}
{% endblock %}

View File

@ -0,0 +1,40 @@
{% extends '_dashboard/base.html.twig' %}
{% block page_content %}
{% if is_granted('ROLE_ADMIN') %}
<p>
<a href="{{ path('bo_monster_category_new') }}">Create new</a>
</p>
{% endif %}
<table class="table">
<thead>
<tr>
{#<th>Id</th>#}
<th>Name</th>
<th>Slug</th>
{% if is_granted('ROLE_ADMIN') %}
<th>actions</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for monsterCategory in monstersCategories %}
<tr>
{#<td>{{ monsterCategory.id }}</td>#}
<td>{{ monsterCategory.name }}</td>
<td>{{ monsterCategory.slug }}</td>
{% if is_granted('ROLE_ADMIN') %}
<td>
<a href="{{ path('bo_monster_category_edit', {'id': monsterCategory.id}) }}">edit</a>
</td>
{% endif %}
</tr>
{% else %}
<tr>
<td colspan="{{ is_granted('ROLE_ADMIN') ? '3' : '2' }}">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -0,0 +1,7 @@
{% extends '_dashboard/base.html.twig' %}
{% block page_content %}
<h1>Create new MonsterCategory</h1>
{{ include('_dashboard/monster_category/_form.html.twig') }}
{% endblock %}