2024-09-17 14:02:17 +02:00
|
|
|
{% extends "base.html.twig" %}
|
|
|
|
|
|
|
|
{% block body %}
|
|
|
|
<h1 class="page-header">
|
|
|
|
ILLUSTRATIONS
|
|
|
|
</h1>
|
|
|
|
|
2024-10-30 17:58:39 +01:00
|
|
|
<p><a class="btn btn-success" href={{ path('app_illustration_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 Illustrations
|
|
|
|
</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-30 17:58:39 +01:00
|
|
|
<th width="70px">Utilisateurs</th>
|
2024-09-17 14:02:17 +02:00
|
|
|
<th width="70px">Date</th>
|
|
|
|
<th width="100px">Catégorie</th>
|
|
|
|
<th>Nom</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for illustration in illustrations %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
2024-10-30 17:58:39 +01:00
|
|
|
<a href="{{path("app_illustration_update",{id:illustration.id,by:'admin'})}}"><i class="fa fa-file"></i></a>
|
2024-09-17 14:02:17 +02:00
|
|
|
{% if illustration.id >=0 %}
|
2024-10-30 17:58:39 +01:00
|
|
|
<a href="{{path("app_illustration_delete",{id:illustration.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 %}
|
2024-10-30 17:58:39 +01:00
|
|
|
<a style="cursor:pointer" onClick="ModalLoad('extraLargeModal','Illustration','{{ path('app_illustration_crop',{"type":"illustration","reportinput":"refresh"}) }}?file={{illustration.illustration}}');"><i class="fa fa-arrows-alt" aria-hidden="true"></i></a>
|
2024-09-17 14:02:17 +02:00
|
|
|
</td>
|
|
|
|
|
|
|
|
<td>
|
|
|
|
|
|
|
|
{% set appthumbheight=app.session.get("appthumbheight") %}
|
|
|
|
{% if illustration.category.usecategoryconfig %}
|
|
|
|
{% set appthumbwidth=illustration.category.appthumbwidth %}
|
|
|
|
{% set appthumbheight=illustration.category.appthumbheight %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% set source="thumb_"~illustration.illustration %}
|
|
|
|
{% if appthumbheight!=0 %}
|
|
|
|
{% set source="thumbori_"~illustration.illustration %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if appthumbheight==0 %}
|
|
|
|
{% set height=90 %}
|
|
|
|
{% elseif appthumbheight==1 %}
|
|
|
|
{% set height=illustration.height*90/illustration.width %}
|
|
|
|
{% else %}
|
|
|
|
{% set height=30*90/21 %}
|
|
|
|
{% endif %}
|
|
|
|
|
2024-10-30 17:58:39 +01:00
|
|
|
<div style="width:90px; height:{{ height }}px;background-position: center ; background-size: cover; background-image: url(/{{ appAlias }}/uploads/illustration/{{source}}?v={{ random(0, 10000) }}");">
|
2024-09-17 14:02:17 +02:00
|
|
|
|
|
|
|
</td>
|
2024-10-30 17:58:39 +01:00
|
|
|
|
|
|
|
<td>{{ illustration.category.user.username }}</td>
|
2024-09-17 14:02:17 +02:00
|
|
|
<td>{{ illustration.submittime|date("Y-m-d H:i") }}</td>
|
|
|
|
<td>{{ illustration.category.name }}</td>
|
|
|
|
<td>{{ illustration.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 %}
|