You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

74 lines
3.3 KiB

{% extends '@Core/admin/layout.html.twig' %}
{% block title %}{{ 'Pages'|trans }} - {{ parent() }}{% endblock %}
{% block body %}
<div class="bg-light pl-5 pr-4 pt-5 {% if pager.paginationData.pageCount < 2 %}pb-5{% endif %}">
<div class="d-flex">
<div class="mr-auto w-50">
<h1 class="display-5">{{ 'Pages'|trans }}</h1>
</div>
</div>
{{ knp_pagination_render(pager) }}
</div>
<div class="table-responsive">
<table class="table">
<thead class="thead-light">
<tr>
<th class="col-5">{{ 'Name'|trans }}</th>
<th class="col-5"></th>
<th class="col-2 miw-100 text-right">{{ 'Actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for item in pager %}
{% set edit = path('admin_site_page_edit', {entity: item.id}) %}
<tr data-dblclick="{{ edit }}">
<td class="col-5">
<a href="{{ edit }}" class="font-weight-bold text-body d-block">
{{ item.name }}
</a>
</td>
<td class="col-5">
{% for node in item.nodes %}
<a href="{{ path('admin_site_tree_navigation', {
navigation: node.menu.navigation.id,
'data-modal': path('admin_site_node_edit', {entity: node.id}),
}) }}" class="btn btn-sm btn-light mr-1">
{{ node.label }}
</a>
{% endfor %}
</td>
<td class="col-2 miw-100 text-right">
<a href="{{ edit }}" class="btn btn-sm btn-primary mr-1">
<span class="fa fa-edit"></span>
</a>
<button type="submit" form="form-delete-{{ item.id }}" class="btn btn-sm btn-danger">
<span class="fa fa-trash"></span>
</button>
<form method="post" action="{{ path('admin_site_page_delete', {entity: item.id}) }}" id="form-delete-{{ item.id }}" data-form-confirm>
<input type="hidden" name="_method" value="DELETE">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ item.id) }}">
</form>
</td>
</tr>
{% else %}
<tr>
<td class="col-12 text-center p-4 text-black-50">
<div class="display-1">
<span class="fa fa-search"></span>
</div>
<div class="display-5 mt-3">
{{ 'No result'|trans }}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}