Initial commit
This commit is contained in:
4
templates/_dashboard/map/._delete_form.html.twig
Normal file
4
templates/_dashboard/map/._delete_form.html.twig
Normal file
@ -0,0 +1,4 @@
|
||||
<form method="post" action="{{ path('bo_map_delete', {'id': map.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ map.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
||||
11
templates/_dashboard/map/.edit.html.twig
Normal file
11
templates/_dashboard/map/.edit.html.twig
Normal file
@ -0,0 +1,11 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Map</h1>
|
||||
|
||||
{{ include('map/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('bo_map_index') }}">back to list</a>
|
||||
|
||||
{{ include('map/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
37
templates/_dashboard/map/.index.html.twig
Normal file
37
templates/_dashboard/map/.index.html.twig
Normal file
@ -0,0 +1,37 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Map index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>File</th>
|
||||
<th>ModifiedAt</th>
|
||||
<th>Version</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for map in maps %}
|
||||
<tr>
|
||||
<td>{{ map.id }}</td>
|
||||
<td>{{ map.file }}</td>
|
||||
<td>{{ map.modifiedAt ? map.modifiedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ map.version }}</td>
|
||||
<td>
|
||||
{#<a href="{{ path('map_show', {'id': map.id}) }}">show</a>#}
|
||||
<a href="{{ path('bo_map_edit', {'id': map.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="5">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('bo_map_new') }}">Create new</a>
|
||||
{% endblock %}
|
||||
9
templates/_dashboard/map/.new.html.twig
Normal file
9
templates/_dashboard/map/.new.html.twig
Normal file
@ -0,0 +1,9 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Map</h1>
|
||||
|
||||
{{ include('map/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('bo_map_index') }}">back to list</a>
|
||||
{% endblock %}
|
||||
32
templates/_dashboard/map/.show.html.twig
Normal file
32
templates/_dashboard/map/.show.html.twig
Normal file
@ -0,0 +1,32 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Map</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ map.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>File</th>
|
||||
<td>{{ map.file }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>ModifiedAt</th>
|
||||
<td>{{ map.modifiedAt ? map.modifiedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Version</th>
|
||||
<td>{{ map.version }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('bo_map_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('bo_map_edit', {'id': map.id}) }}">edit</a>
|
||||
|
||||
{{ include('map/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
||||
10
templates/_dashboard/map/_form.html.twig
Normal file
10
templates/_dashboard/map/_form.html.twig
Normal file
@ -0,0 +1,10 @@
|
||||
{{ form_start(form, {'name': "", 'attr': {'class': 'sp_grid__map-form sp_form__xhr sp_form__onchange'}}) }}
|
||||
{{ form_widget(form.file, {'id': 'map_file' ~ idHash, 'attr': {'data-file-preview-target': 'map' ~ idHash}}) }}
|
||||
|
||||
{% if route|end_with('_new') %}
|
||||
{{ form_widget(form.version, {'id': 'map_version' ~ idHash}) }}
|
||||
{% endif %}
|
||||
|
||||
{{ form_widget(form._token, {'id': 'map__token' ~ idHash}) }}
|
||||
{#<button class="btn">Save</button>#}
|
||||
{{ form_end(form) }}
|
||||
Reference in New Issue
Block a user