ajout module devis
This commit is contained in:
100
mondumas/templates/devis/devis_list.pt
Normal file
100
mondumas/templates/devis/devis_list.pt
Normal file
@@ -0,0 +1,100 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="devis-search-form" class="form-horizontal" role="form" action="${url}" method="post"
|
||||
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-sm-4 control-label">Société</label>
|
||||
<div class="col-xs-8">
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PE"
|
||||
tal:attributes="checked societe=='PE'">PE</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="ME"
|
||||
tal:attributes="checked societe=='ME'">ME</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PL"
|
||||
tal:attributes="checked societe=='PL'">PL</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="PO"
|
||||
tal:attributes="checked societe=='PO'">PO</label>
|
||||
<label class="radio-inline"><input type="radio" name="societe" value="CD"
|
||||
tal:attributes="checked societe=='CD'">CD</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">Nom ou numéro du chantier</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="name" value="${name}"
|
||||
placeholder="Le nom ou le numéro doit avoir de 2 à 30 caractères de long" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<button id="submitButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<span class="glyphicon glyphicon-search"></span> Rechercher</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
|
||||
<div class="row">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Client</th>
|
||||
<th>Chantier</th>
|
||||
<th class="text-right">Montant</th>
|
||||
<th>Sinistre</th>
|
||||
<th class="text-center">Statut</th>
|
||||
</tr>
|
||||
<tr tal:repeat="detail devis">
|
||||
<td>
|
||||
<a href="/devis_view/${societe}-DE${detail.numero}">${societe}-${detail.numero}</a>
|
||||
</td>
|
||||
<td>${detail.date.strftime('%d-%m-%Y')}</td>
|
||||
<td>${detail.nomcli}</td>
|
||||
<td>${detail.chantier}</td>
|
||||
<td class="text-right">${layout.to_euro(detail.montant)}</td>
|
||||
<td>${detail.nosin}</td>
|
||||
<td class="text-center">${detail.status}</td>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#devis-search-form').formValidation({
|
||||
framework: 'bootstrap',
|
||||
message: 'This value is not valid',
|
||||
icon: {
|
||||
valid: 'glyphicon glyphicon-ok',
|
||||
invalid: 'glyphicon glyphicon-remove',
|
||||
validating: 'glyphicon glyphicon-refresh'
|
||||
},
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
var code = e.keyCode || e.which;
|
||||
if (code === 13) {
|
||||
e.preventDefault();
|
||||
// simuler clic bouton submit
|
||||
document.getElementById("submitButton").click();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user