Files
caotek_monaa/caotek_mesavoirs/templates/home.pt
2017-07-23 15:43:34 +02:00

54 lines
1.1 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<p>
<a href="${request.application_url}/actif_edit/0" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span> Nouvel actif</a>
</p>
<table id="actifs_list" class="table table-striped table-bordered">
<thead>
<tr>
<th>No</th>
<th>Symbole</th>
<th>Libellé</th>
<th>Catégorie</th>
<th>Nombre</th>
<th>Cours</th>
<th>PRU</th>
<th>Valeur</th>
<th>Plus-Value</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');
$('#actifs_list').DataTable({
data: dataSet,
pageLength: 50,
bLengthChange: false,
columnDefs: [
{ className: "text-right", "targets": [4,5,6,7,8] },
{ "targets": 0,
"render": function (data, type, full, meta) {
// ajouter un link vers le formulaire
return '<a href="/actif_edit/' + data + '">' + data + '</a>';
},
},
]
});
});
</script>
</div><!-- content -->
</metal:block>