svg
This commit is contained in:
40
templates/operation/edit.html.twig
Normal file
40
templates/operation/edit.html.twig
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
|
||||
|
||||
{{ form_start(form) }}
|
||||
{{ form_widget(form.submit) }}
|
||||
<a href="{{ path(routecancel) }}" class="btn btn-secondary ms-1">Annuler</a>
|
||||
{%if mode=="update" %}<a href="{{ path(routedelete,{id:form.vars.value.id}) }}" class="btn btn-danger float-end" onclick="return confirm('Confirmez-vous la suppression de cet enregistrement ?')">Supprimer</a>{%endif%}
|
||||
|
||||
{% include('include/error.html.twig') %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6 mx-auto">
|
||||
<div class="card mt-3">
|
||||
<div class="card-header">Information</div>
|
||||
<div class="card-body">
|
||||
{{ form_row(form.date) }}
|
||||
{{ form_row(form.title) }}
|
||||
{{ form.debit is defined ? form_row(form.debit):"" }}
|
||||
{{ form.credit is defined ? form_row(form.credit):"" }}
|
||||
{{ form_row(form.montant) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ form_end(form) }}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#operation_title").focus();
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
48
templates/operation/list.html.twig
Normal file
48
templates/operation/list.html.twig
Normal file
@ -0,0 +1,48 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %} = {{title}}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>{{title}}</h1>
|
||||
<a href="{{ path(routesubmit) }}" class="btn btn-success">Ajouter</a>
|
||||
|
||||
<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">Date</th>
|
||||
<th>Titre</th>
|
||||
<th>Débit</th>
|
||||
<th>Crédit</th>
|
||||
<th width="150px">Montant</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for operation in operations %}
|
||||
<tr>
|
||||
<td><a href="{{ path(routeupdate,{id:operation.id}) }}"><i class="fas fa-file fa-2x"></i></a></td>
|
||||
<td>{{operation.date|date("d/m/y")}}</td>
|
||||
<td>{{operation.title}}</td>
|
||||
<td>{{operation.debit.num01}}-{{operation.debit.num02}} = {{operation.debit.title}}</td>
|
||||
<td>{{operation.credit.num01}}-{{operation.credit.num02}} = {{operation.credit.title}}</td>
|
||||
<td>{{operation.montant}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block localscript %}
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#dataTables').DataTable({
|
||||
columnDefs: [ { "targets": "no-sort", "orderable": false }, { "targets": "no-string", "type" : "num" } ],
|
||||
responsive: true,
|
||||
iDisplayLength: 100,
|
||||
order: [[ 1, "asc" ]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user