Files
aem_moniteurs/aem_gestion/templates/crm/contacts_list.pt
2023-06-22 10:34:18 +02:00

81 lines
3.0 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<form id="frm-contacts_list" action="${request.application_url}/contacts_list" method="POST" class="form-horizontal">
<div class="form-group">
<div class="col-xs-6">
<a href="${request.application_url}" class="btn btn-default" role="button">
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
<a href="${request.application_url}/contact_edit/0" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span> Nouveau contact</a>
</div>
<div class="col-xs-6 text-right">
<a href="${request.application_url}/contact_lookup" class="btn btn-primary btn-lg" role="button">
<span class="glyphicon glyphicon-search"></span> RECHERCHE</a>
<a href="${request.application_url}/agenda/today" class="btn btn-primary btn-lg" role="button">
<span class="glyphicon glyphicon-calendar"></span> AGENDA</a>
</div>
</div>
</form>
<table id="contacts_list" class="table table-condensed table-striped table-bordered">
<thead>
<tr>
<th>Créé le</th>
<th>Nom Prénom</th>
<th>Type de permis</th>
<th>A relancer</th>
<th>Contact</th>
<th>Relance 1</th>
<th>Relance 2</th>
<th>Relance 3</th>
<th>Proch. rdv</th>
<th>Statut</th>
</tr>
</thead>
</table>
<br />
<br />
<script type="text/javascript">
var dataSet = ${dt_data};
$(document).ready(function() {
$.fn.dataTable.moment('DD/MM/YYYY');
$('#contacts_list').DataTable({
data: dataSet,
pageLength: 100,
bLengthChange: false,
language: {
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
},
columnDefs: [
{ "targets": 1,
"render": function (data, type, full, meta) {
// ajouter un link vers le formulaire
return '<a href="/contact_edit/' + data.substring(0, 6) + '">' + data + '</a>';
},
},
{ targets: 4,
render: function (data, type, full, meta) {
// ajouter un link vers le formulaire
if (type === 'display' && data != '')
{ data = '<span></span><a href="tel:' + data + '"> <span class="glyphicon glyphicon-earphone"></span></a>'+data+'<span>'; }
else
{ date = ''; }
return data;
},
},
],
order: [[ 0, "desc" ]]
});
});
</script>
</div><!-- content -->
</metal:block>