1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-29 16:00:15 +02:00

Flextype Box Plugin: Admin #125 #117

- Templates Controller/Views implementation
This commit is contained in:
Awilum
2019-05-28 10:20:31 +03:00
parent a8a0730824
commit 2a69c63c95

View File

@@ -50,7 +50,41 @@
{% endif %}
{% if partials_list|length > 0 %}
{% for id in partials_list %}
<tr>
<td>
<a href="{{ path_for('admin.templates.edit') }}?id={{ id }}&type=partial">{{ id }}</a>
</td>
<td>{{ tr('admin_partial') }}</td>
<td class="text-right">
<div class="btn-group">
<a class="btn btn-default" href="{{ path_for('admin.templates.edit') }}?id={{ id }}&type=partial">{{ tr('admin_edit') }}</a>
<button type="button" class="btn btn-default dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="sr-only">Toggle Dropdown</span>
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="{{ path_for('admin.templates.rename') }}?id={{ id }}&type=partial">{{ tr('admin_rename') }}</a>
<a class="dropdown-item" href="javascript:;"
onclick="event.preventDefault();
document.getElementById('duplicate-partial-id-{{ id }}').submit();">{{ tr('admin_duplicate') }}</a>
</div>
</div>
<form id="duplicate-partial-id-{{ id }}" action="{{ path_for('admin.templates.duplicateProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="partial-id" value="{{ id }}">
<input type="hidden" name="type" value="partial">
</form>
<form id="delete-partial-id-{{ id }}" action="{{ path_for('admin.templates.deleteProcess') }}" method="POST" style="display: none;">
{{ csrf() }}
<input type="hidden" name="partial-id" value="{{ id }}">
<input type="hidden" name="type" value="partial">
</form>
<a class="btn btn-default" href="javascript:;"
onclick="event.preventDefault();
document.getElementById('delete-partial-id-{{ id }}').submit();">{{ tr('admin_delete') }}</a>
</td>
</tr>
{% endfor %}
{% endif %}
</tbody>
</table>