added allocation_list.pt and edit.pt
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Symbole</label>
|
||||
<label class="col-xs-2 control-label">Symbole Yahoo</label>
|
||||
<div class="col-xs-3">
|
||||
<input class="form-control" type="text" name="symbole"
|
||||
value="${actif.symbole}" placeholder="15 caractères maximum"
|
||||
@@ -32,16 +32,6 @@
|
||||
data-fv-stringlength-message="15 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="categorie">Catégorie</label>
|
||||
<div class="col-xs-3">
|
||||
<select class="form-control" id="categorie" name="categorie">
|
||||
<div tal:repeat="item categories_list">
|
||||
<option value="${item.categorie}" tal:attributes="selected actif.categorie==item.categorie and 'selected' or None">${item.categorie}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="nombre">Nombre</label>
|
||||
<div class="col-xs-2">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<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>
|
||||
<span class="glyphicon glyphicon-refresh"></span> MAJ du portefeuille</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>
|
||||
@@ -31,7 +31,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="ligne items">
|
||||
<td class="${ligne.bg}">${ligne.categorie}</td>
|
||||
<td class="${ligne.bg_color}">${ligne.categorie}</td>
|
||||
<td>${ligne.symbole}</td>
|
||||
<td tal:condition="ligne.type=='ACTION'"><a href="actif_edit/${ligne.no_id}">${ligne.libelle}</a></td>
|
||||
<td tal:condition="ligne.type<>'ACTION'"><a href="actif2_edit/${ligne.no_id}">${ligne.libelle}</a></td>
|
||||
|
||||
62
caotek_mesavoirs/templates/actifs/allocation_edit.pt
Normal file
62
caotek_mesavoirs/templates/actifs/allocation_edit.pt
Normal file
@@ -0,0 +1,62 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<br />
|
||||
<div class="row">
|
||||
<form id="categorie_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="categorie"
|
||||
data-fv-framework="bootstrap"
|
||||
data-fv-icon-valid="glyphicon glyphicon-ok"
|
||||
data-fv-icon-invalid="glyphicon glyphicon-remove"
|
||||
data-fv-icon-validating="glyphicon glyphicon-refresh">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Classe</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="categorie" name="categorie">
|
||||
<div tal:repeat="item classes_list">
|
||||
<option value="${item.classe}" tal:attributes="selected categorie.categorie==item.classe and 'selected' or None">${item.classe}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="pc_cible">Pourcentage cible</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="pc_cible" name="pc_cible" value="${categorie.pc_cible}"
|
||||
data-fv-digits="true"
|
||||
data-fv-digits-message="Le nombre doit être composé que de chiffres" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/categories_list">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||
tal:condition="categorie.no_cat <> 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#categorie_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
38
caotek_mesavoirs/templates/actifs/allocation_list.pt
Normal file
38
caotek_mesavoirs/templates/actifs/allocation_list.pt
Normal file
@@ -0,0 +1,38 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<p>
|
||||
<a href="allocation_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle catégorie</a>
|
||||
</p>
|
||||
<table id="categories_list" class="table table-condensed table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Classe</th>
|
||||
<th class="text-right">% cible</th>
|
||||
<th class="text-center">Type</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr tal:repeat="item items">
|
||||
<td class="${item.bg_color}"><a href="allocation_edit/${item.no_cat}">${item.categorie}</a></td>
|
||||
<td class="text-right">${item.pc_cible} %</td>
|
||||
<td class="text-center">${item.type}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-right"><b>Total</b></td>
|
||||
<td class="text-right"><b>${total} %</b></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
Reference in New Issue
Block a user