Files
caotek_monaa/caotek_mesavoirs/templates/actifs/actifs_list.pt

85 lines
2.5 KiB
XML

<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
<form id="actif_list-form" action="${request.application_url}" method="post">
<div class="form-group">
<div class="form-group">
<button class="btn btn-primary" type="submit" name="form.submitted">
<span class="glyphicon glyphicon-refresh"></span> MAJ du portefueille</button>
<a href="#" class="btn btn-success" role="button"
data-toggle="modal" data-target="#choixTypeActif"><span class="glyphicon glyphicon-plus"></span> Nouvel actif</a>
</div>
</div>
</form>
<table id="actifs_list" class="table table-striped table-bordered">
<thead>
<tr>
<th>Catégorie</th>
<th>Symbole</th>
<th>Libellé</th>
<th>Nombre</th>
<th>Cours</th>
<th>PRU</th>
<th>Valeur</th>
<th>Plus-Value</th>
<th>No</th>
</tr>
</thead>
</table>
<br />
<br />
<!-- MODAL POPUP : Affichage de la FAQ -->
<div class="modal fade" id="choixTypeActif" tabindex="-1" role="dialog" aria-labelledby="choixTypeActif" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span class="glyphicon glyphicon-remove"></span></button>
<h4 class="modal-title" id="choixTypeActif">Choix du type d'actif à créer</h4>
</div>
<div class="modal-body">
<p>
Voulez-vous créer un actif de type <br />
<br />
<a href="${request.application_url}/actif_edit/0" class="btn btn-primary" role="button">
ACTION</a> ou
<a href="${request.application_url}/actif2_edit/0" class="btn btn-warning" role="button">
AUTRE</a>
<br />
<br />
<p>
</div>
</div>
</div>
</div>
<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": [3,4,5,6,7] },
{ "targets": 8,
"render": function (data, type, full, meta) {
// ajouter un link vers le formulaire
return '<a class="btn btn-primary btn-sm" role="button" href="/actif_edit/' + data +
'"><span class="glyphicon glyphicon-pencil"></span> </a>';
},
},
]
});
});
</script>
</div><!-- content -->
</metal:block>