Files
caotek_monaa/caotek_mesavoirs/templates/actifs/actifs_list.pt
2017-07-24 12:54:24 +02:00

74 lines
2.7 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="${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-condensed 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>
</tr>
</thead>
<tbody>
<tr tal:repeat="ligne items">
<td class="${ligne.bg}">${ligne.categorie}</td>
<td>${ligne.symbole}</td>
<td tal:condition="ligne.categorie[:6]=='Action'"><a href="actif_edit/${ligne.no_id}">${ligne.libelle}</a></td>
<td tal:condition="ligne.categorie[:6]<>'Action'"><a href="actif2_edit/${ligne.no_id}">${ligne.libelle}</a></td>
<td class="text-right">${ligne.nombre}</td>
<td class="text-right">${ligne.cours}</td>
<td class="text-right">${layout.to_euro(ligne.pru)}</td>
<td class="text-right">${layout.to_euro(ligne.valeur)}</td>
<td tal:condition="ligne.plus_value>=0" class="text-right" style="color: green;">${layout.to_euro(ligne.plus_value)}</td>
<td tal:condition="ligne.plus_value <0" class="text-right" style="color: red;">${layout.to_euro(ligne.plus_value)}</td>
</tr>
</tbody>
</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>
</div><!-- content -->
</metal:block>