77 lines
2.9 KiB
XML
77 lines
2.9 KiB
XML
<metal:block use-macro="main_template">
|
|
<div metal:fill-slot="content">
|
|
|
|
<form method="POST" id="frm" class="form-horizontal">
|
|
<div class="form-group">
|
|
<label class="control-label col-sm-2">Notifications</label>
|
|
<div class="col-sm-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 class="col-sm-7" tal:condition="table=='RAPPELS RDV'">
|
|
<button class="btn btn-success" type="submit" name="form.generate">
|
|
<span class="glyphicon glyphicon-flash"></span> Générer les rappels</button>
|
|
<button class="btn btn-primary" type="submit" name="form.email_rappels">
|
|
<span class="glyphicon glyphicon-send"></span> Envoyer les rappels (${nbRappels})</button>
|
|
</div>
|
|
<div class="col-sm-7" tal:condition="table=='RESERVATIONS'">
|
|
<button class="btn btn-success" type="submit" name="form.confirm">
|
|
<span class="glyphicon glyphicon-flash"></span> Confirmer les résa</button>
|
|
<button class="btn btn-primary" type="submit" name="form.email_resa">
|
|
<span class="glyphicon glyphicon-send"></span> Envoyer les confirmations (${nbRappels})</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<table id="last_emailing" class="table table-condensed table-striped table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>Réf.</th>
|
|
<th>Date éch.</th>
|
|
<th>Nom</th>
|
|
<th>Email</th>
|
|
<th>Statut</th>
|
|
<th>Envoyé le</th>
|
|
<th>Créé 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');
|
|
$('#last_emailing').DataTable({
|
|
data: dataSet,
|
|
pageLength: 100,
|
|
bLengthChange: false,
|
|
language: {
|
|
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
|
},
|
|
columnDefs: [
|
|
{ "targets": 2,
|
|
"render": function (data, type, full, meta) {
|
|
// ajouter un link vers le formulaire
|
|
return '<a href="/fiche_eleve/' + data.substring(0, 6) + '">' + data + '</a>';
|
|
},
|
|
},
|
|
],
|
|
order: [[5, 'des']],
|
|
});
|
|
|
|
});
|
|
</script>
|
|
|
|
</div><!-- content -->
|
|
</metal:block>
|
|
|
|
|