ninefolio/templates/Webzine/list.html.twig

66 lines
2.9 KiB
Twig
Raw Normal View History

2024-09-17 14:02:17 +02:00
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
WEBZINES
</h1>
2024-10-31 11:48:30 +01:00
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:"admin",userid:-1}) }}>Ajouter</a></p>
2024-09-17 14:02:17 +02:00
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Webzines
</div>
<div class="card-body">
<div class="dataTable_wrapper">
<table class="table table-striped table-bordered table-hover" id="dataTables" style="width:100%">
<thead>
<tr>
<th width="70px" class="no-sort">Action</th>
<th width="70px" class="no-sort">Miniature</th>
2024-10-31 11:48:30 +01:00
<th width="100px">Utilisateur</th>
2024-09-17 14:02:17 +02:00
<th width="100px">Serie</th>
<th>Nom</th>
</tr>
</thead>
<tbody>
{% for webzine in webzines %}
<tr>
<td>
2024-10-31 11:48:30 +01:00
<a href="{{path("app_webzine_update",{id:webzine.id,by:'admin'})}}"><i class="fa fa-file"></i></a>
2024-09-17 14:02:17 +02:00
{% if webzine.id >=0 %}
2024-10-31 11:48:30 +01:00
<a href="{{path("app_webzine_delete",{id:webzine.id,by:'admin'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
2024-09-17 14:02:17 +02:00
{% endif %}
</td>
<td>
{% if not webzine.webzinepages is empty %}
{% set source="thumbori_"~webzine.webzinepages[0].illustration %}
{% set height=30*90/21 %}
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/webzine/{{source}}");">
{% endif %}
</td>
2024-10-31 11:48:30 +01:00
<td>{{ webzine.user.username }}</td>
2024-09-17 14:02:17 +02:00
<td>{{ webzine.set }} #{{ webzine.order| format_number({min_integer_digit:'2'})}}</td>
<td>{{ webzine.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$('#dataTables').DataTable({
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
responsive: true,
iDisplayLength: 100,
order: [[ 2, "desc" ]]
});
});
{% endblock %}