mirror of
https://github.com/flextype/flextype.git
synced 2025-08-24 13:52:56 +02:00
feat(admin-plugin): use dots icon for actions dropdown #292
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
{% extends "plugins/admin/views/partials/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
|
||||
{% if entries_list|length > 0 %}
|
||||
<table class="table no-margin">
|
||||
<tbody>
|
||||
@@ -52,33 +50,34 @@
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-default" href="{{ path_for('admin.entries.edit') }}?id={{ entry.slug }}&type=editor">{{ 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 type="button" class="btn dropdown-toggle" data-toggle="dropdown" data-display="static" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.add') }}?id={{ entry.slug }}">{{ tr('admin_add') }}</a>
|
||||
<div class="dropdown-menu dropdown-menu-lg-right">
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.edit') }}?id={{ entry.slug }}&type=editor"><i class="fas fa-edit"></i> {{ tr('admin_edit') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.add') }}?id={{ entry.slug }}"><i class="fas fa-plus-circle"></i> {{ tr('admin_add') }}</a>
|
||||
<a class="dropdown-item" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('duplicate-id-{{ entry.slug }}').submit();">{{ tr('admin_duplicate') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.rename') }}?id={{ entry.slug }}">{{ tr('admin_rename') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.move') }}?id={{ entry.slug }}">{{ tr('admin_move') }}</a>
|
||||
<a class="dropdown-item" href="{{ base_url() }}/{{ entry.slug }}" target="_blank">{{ tr('admin_preview') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.type') }}?id={{ entry.slug }}">{{ tr('admin_type') }}</a>
|
||||
document.getElementById('duplicate-id-{{ entry.slug }}').submit();"><i class="fas fa-copy"></i> {{ tr('admin_duplicate') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.rename') }}?id={{ entry.slug }}"><i class="fas fa-font"></i> {{ tr('admin_rename') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.move') }}?id={{ entry.slug }}"><i class="fas fa-angle-double-right"></i> {{ tr('admin_move') }}</a>
|
||||
<a class="dropdown-item" href="{{ base_url() }}/{{ entry.slug }}" target="_blank"><i class="fas fa-eye"></i> {{ tr('admin_preview') }}</a>
|
||||
<a class="dropdown-item" href="{{ path_for('admin.entries.type') }}?id={{ entry.slug }}"><i class="far fa-list-alt"></i> {{ tr('admin_type') }}</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<form id="duplicate-id-{{ entry.slug }}" action="{{ path_for('admin.entries.duplicateProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="id" value="{{ entry.slug }}">
|
||||
</form>
|
||||
<form id="delete-id-{{ entry.slug }}" action="{{ path_for('admin.entries.deleteProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="id" value="{{ entry.slug }}">
|
||||
<input type="hidden" name="id-current" value="{{ id_current }}">
|
||||
</form>
|
||||
<a class="dropdown-item" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('delete-id-{{ entry.slug }}').submit();"><i class="fas fa-trash-alt"></i> {{ tr('admin_delete') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<form id="duplicate-id-{{ entry.slug }}" action="{{ path_for('admin.entries.duplicateProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="id" value="{{ entry.slug }}">
|
||||
</form>
|
||||
<form id="delete-id-{{ entry.slug }}" action="{{ path_for('admin.entries.deleteProcess') }}" method="POST" style="display: none;">
|
||||
{{ csrf() }}
|
||||
<input type="hidden" name="id" value="{{ entry.slug }}">
|
||||
<input type="hidden" name="id-current" value="{{ id_current }}">
|
||||
</form>
|
||||
<a class="btn btn-default" href="javascript:;"
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('delete-id-{{ entry.slug }}').submit();">{{ tr('admin_delete') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
Reference in New Issue
Block a user