103 lines
3.7 KiB
XML
103 lines
3.7 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<div tal:condition="message" tal:content="message" class="alert alert-success" />
|
|
|
|
<div class="row">
|
|
<table id="demandes" class="table table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Société</th>
|
|
<th>Date</th>
|
|
<th>Expéditeur</th>
|
|
<th>Objet</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="row">
|
|
<form id="demandes_form" action="${url}" class="form-horizontal" method="post"
|
|
data-fv-framework="bootstrap"
|
|
data-fv-icon-valid="glyphicon glyphicon-ok"
|
|
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
|
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-4 col-sm-8">
|
|
<a href="${request.application_url}/" class="btn btn-default btn-lg" role="button">
|
|
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
|
<button id="generateButton" class="btn btn-success btn-lg" type="submit" name="form.submitted" tal:condition="msglus">
|
|
<i class="glyphicon glyphicon-refresh"></i> Générer les dossiers</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<h2>Rapport de génération</h2>
|
|
<table class="table table-condensed">
|
|
<tr tal:repeat="item log_creation">
|
|
<td>${item.date.strftime('%d %b, %H:%M')}</td>
|
|
<td>${item.proc}</td>
|
|
<td>${item.msg}</td>
|
|
<td><a href="${request.application_url}/dossier_view/${item.nodossier}">${item.nodossier}</td>
|
|
<td>${item.user}</td>
|
|
</tr>
|
|
</table>
|
|
<h2>Dossiers générés à contrôler</h2>
|
|
<table class="table table-condensed">
|
|
<tr tal:repeat="item dossiers_traites">
|
|
<td>${item.DATEMAJ.strftime('%d %b')}</td>
|
|
<td><a href="${request.application_url}/dossier_view/${item.societe}-${item.NO_ID}">${item.societe}-${item.NO_ID}</td>
|
|
<td>${item.NOMCLI}</td>
|
|
<td>${item.C_NOM}</td>
|
|
<td>${item.USERMAJ}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<script type="text/javascript">
|
|
var dataSet = ${dt_data};
|
|
|
|
$(document).ready(function() {
|
|
$.fn.dataTable.moment('DD-MM-YYYY MH:mm:ss');
|
|
$('#demandes').DataTable({
|
|
data: dataSet,
|
|
pageLength: 50,
|
|
bLengthChange: false,
|
|
searching: false,
|
|
language: {
|
|
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
|
},
|
|
columnDefs: [
|
|
{ className: "text-center", "targets": [0] },
|
|
],
|
|
createdRow: function( row, data, dataIndex ) {
|
|
if ( data[0] == "ME" ) {
|
|
$('td', row).eq(0).css('background-color', 'Gold');
|
|
} else if ( data[0] == "PE" ) {
|
|
$('td', row).eq(0).css('background-color', 'LightYellow');
|
|
} else if ( data[0] == "PL" ) {
|
|
$('td', row).eq(0).css('background-color', 'LightGreen');
|
|
}
|
|
},
|
|
});
|
|
|
|
});
|
|
</script>
|
|
<script type="text/javascript">
|
|
$('#generateButton').on('click', function(){
|
|
$('i.gly-spin').removeClass('gly-spin');
|
|
$('i').addClass('gly-spin');
|
|
});
|
|
</script>
|
|
|
|
</div><!-- content -->
|
|
</metal:block>
|
|
|
|
|