stats
This commit is contained in:
74
mondumas/templates/parametres/stats_dd.pt
Normal file
74
mondumas/templates/parametres/stats_dd.pt
Normal file
@@ -0,0 +1,74 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
<br />
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-3" for="societe">Societe</label>
|
||||
<div class="col-xs-8">
|
||||
<select class="form-control" id="societe" name="societe" onChange="$('#frm').submit()">
|
||||
<div tal:repeat="item societes">
|
||||
<option value="${item}" tal:attributes="selected societe==item and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="row">
|
||||
<table id="dossiers_list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Année</th>
|
||||
<th class="text-right">A traiter</th>
|
||||
<th class="text-right">Devis</th>
|
||||
<th class="text-right">Commandé</th>
|
||||
<th class="text-right">Facturé</th>
|
||||
<th class="text-right">Régl part.</th>
|
||||
<th class="text-right">Réglée</th>
|
||||
<th class="text-right">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
var table = $('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 20,
|
||||
bLengthChange: false,
|
||||
bFilter: false,
|
||||
ordering: false,
|
||||
bPaginate: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ className: "text-center", "targets": [0] },
|
||||
{ className: "text-right", "targets": [1] },
|
||||
{ className: "text-right", "targets": [2] },
|
||||
{ className: "text-right", "targets": [3] },
|
||||
{ className: "text-right", "targets": [4] },
|
||||
{ className: "text-right", "targets": [5] },
|
||||
{ className: "text-right", "targets": [6] },
|
||||
{ className: "text-right", "targets": [7] },
|
||||
],
|
||||
order: [[0, 'asc']],
|
||||
rowCallback: function( row, data ) {
|
||||
$('td', row).eq(0).addClass('bg-success');
|
||||
$('td', row).eq(7).addClass('bg-warning');
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user