Files
dumas_gestion/mondumas/templates/parametres/cabinets.pt

64 lines
1.9 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<p>
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<a href="${request.application_url}/cabinet_edit/0" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span> Nouvelle cause</a>
</p>
<table id="cabinets" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Code</th>
<th>Nom</th>
<th>Tél. 1</th>
<th>Tél. 2</th>
<th>Portable</th>
<th>Ville</th>
<th></th>
<th>Modif le</th>
</tr>
</thead>
</table>
<br />
<br />
<script type="text/javascript">
var dataSet = ${dt_data};
$(document).ready(function() {
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
$('#cabinets').DataTable({
data: dataSet,
pageLength: 50,
bLengthChange: false,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
},
order: [[ 1, "asc" ]],
columnDefs: [
{ targets: 1,
"render": function (data, type, row, meta) {
// ajouter un link vers la fiche élève
return '<a href="/cabinet_edit/' + row[0] + '">' + data + '</a>';
},
},
],
createdRow: function( row, data, dataIndex ){
if ( data[6] == "0" ) {
$('td', row).eq(0).css('background-color', 'OrangeRed').css('color', 'white');
}
},
});
});
</script>
</div><!-- content -->
</metal:block>