64 lines
2.8 KiB
Twig
64 lines
2.8 KiB
Twig
{% extends "base.html.twig" %}
|
|
|
|
{% block body %}
|
|
<h1 class="page-header">
|
|
WEBZINES
|
|
</h1>
|
|
|
|
<p><a class="btn btn-success" href={{ path('app_webzine_submit',{by:'console'}) }}>Ajouter</a></p>
|
|
|
|
<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>
|
|
<th width="100px">Serie</th>
|
|
<th>Nom</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for webzine in webzines %}
|
|
<tr>
|
|
<td>
|
|
<a href="{{path("app_webzine_update",{id:webzine.id,by:'console'})}}"><i class="fa fa-file"></i></a>
|
|
{% if webzine.id >=0 %}
|
|
<a href="{{path("app_webzine_delete",{id:webzine.id,by:'console'})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
|
|
{% 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>
|
|
<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 %} |