initial upload
This commit is contained in:
74
aem_gestion/templates/parametres/inscriptions.pt
Normal file
74
aem_gestion/templates/parametres/inscriptions.pt
Normal file
@@ -0,0 +1,74 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-1">Inscriptions</label>
|
||||
<div class="col-md-3">
|
||||
<select class="form-control" id="table" name="table" onChange="$('#frm').submit()">
|
||||
<tal:block tal:repeat="item tables">
|
||||
<option value="${item}" tal:attributes="selected table==item and 'selected' or None">${item}</option>
|
||||
</tal:block>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<table id="inscriptions" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Début stage</th>
|
||||
<th>Nom et prénom</th>
|
||||
<th>Solde</th>
|
||||
<th>Créé le</th>
|
||||
<th>Par</th>
|
||||
<th>Fin réservation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY HH:mm');
|
||||
$('#inscriptions').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 100,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [3,5] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ "targets": 1,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/fiche_eleve/' + data.substring(0, 6) + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
],
|
||||
createdRow: function( row, data, dataIndex ) {
|
||||
if ( data[2].substring(0, 1) == "-" ) {
|
||||
// $( row ).css( "background-color", "LIGHTGREEN" );
|
||||
// $( row ).addClass( "success" );
|
||||
$('td', row).eq(2).addClass("text-danger");
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</metal:block>
|
||||
|
||||
Reference in New Issue
Block a user