This commit is contained in:
2024-09-17 14:02:17 +02:00
commit 111fac9a42
2886 changed files with 189561 additions and 0 deletions

65
templates/Link/edit.html.twig Executable file
View File

@ -0,0 +1,65 @@
{% extends 'base.html.twig' %}
{% block body %}
{{ form_start(form) }}
<h1 class="page-header">
{% if mode=="update" %}
Modification LIEN
{% elseif mode=="submit" %}
Création LIEN
{% endif %}
</h1>
{{ form_widget(form.submit) }}
<a class="btn btn-secondary" href={{ path('app_link') }}>Annuler</a>
{% if mode=="update" and link.id >= 0 %}
<a href="{{ path('app_link_delete',{'id':link.id}) }}"
class="btn btn-danger float-right"
data-method="delete"
data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?">
Supprimer
</a>
{% endif %}
<br><br>
{% if app.session.flashbag.has('error') %}
<div class='alert alert-danger' style='margin: 5px 0px'>
<strong>Erreur</strong><br>
{% for flashMessage in app.session.flashbag.get('error') %}
{{ flashMessage }}<br>
{% endfor %}
</div>
{% endif %}
{% if app.session.flashbag.has('notice') %}
<div class='alert alert-info' style='margin: 5px 0px'>
<strong>Information</strong><br>
{% for flashMessage in app.session.flashbag.get('notice') %}
{{ flashMessage }}<br>
{% endfor %}
</div>
{% endif %}
<div class="card">
<div class="card-header">
<i class="fa fa-pencil-alt fa-fw"></i> Informations
</div>
<div class="card-body">
{{ form_row(form.order) }}
{{ form_row(form.name) }}
{{ form_row(form.url) }}
</div>
</div>
{{ form_end(form) }}
{% endblock %}
{% block localjavascript %}
$(document).ready(function() {
$("#link_order").focus();
});
{% endblock %}

View File

@ -0,0 +1,56 @@
{% extends "base.html.twig" %}
{% block body %}
<h1 class="page-header">
LIENS
</h1>
<p><a class="btn btn-success" href={{ path('app_link_submit') }}>Ajouter</a></p>
<div class="card">
<div class="card-header">
<i class="fa fa-table fa-fw"></i> Liste des Liens
</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">Ordre</th>
<th>Nom</th>
<th>URL</th>
</tr>
</thead>
<tbody>
{% for link in links %}
<tr>
<td>
<a href="{{path("app_link_update",{id:link.id})}}"><i class="fa fa-file"></i></a>
{% if link.id >=0 %}
<a href="{{path("app_link_delete",{id:link.id})}}" data-method="delete" data-confirm="Êtes-vous sûr de vouloir supprimer cet enregistrement ?"><i class="fa fa-trash"></i></a>
{% endif %}
</td>
<td>{{link.order}}</td>
<td>{{link.name}}</td>
<td><a href="{{link.url}}" target="_blank">{{link.url}}</a></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: [[ 1, "asc" ]]
});
});
{% endblock %}