déplacer les templates actif dans un module à part

This commit is contained in:
2017-07-24 09:53:05 +02:00
parent 988bb87263
commit a2c5ac2cfe
11 changed files with 303 additions and 152 deletions

View File

@@ -1,52 +1,7 @@
<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 tal:condition="message" tal:content="message" class="alert alert-danger" />
</div><!-- content -->
</metal:block>