96 lines
3.0 KiB
XML
96 lines
3.0 KiB
XML
<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="site-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="control-label col-xs-4" for="societe">Societe</label>
|
|
<div class="col-xs-3">
|
|
<select class="form-control" id="societe" name="societe">
|
|
<div tal:repeat="item societes">
|
|
<option value="${item}" tal:attributes="selected societe==item and 'selected' or None">${item}</option>
|
|
</div>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-xs-4 control-label">Nom ou numéro du chantier</label>
|
|
<div class="col-xs-8">
|
|
<input type="text" class="form-control" name="name" value="${name}"
|
|
data-fv-notempty="true"
|
|
data-fv-notempty-message="Le nom ou le numéro est obligatoire"
|
|
|
|
data-fv-stringlength="true"
|
|
data-fv-stringlength-min="2"
|
|
data-fv-stringlength-max="30"
|
|
data-fv-stringlength-message="Le nom ou le numéro doit avoir de 2 à 30 caractères de long" />
|
|
</div>
|
|
</div>
|
|
<!-- case a cocher "Afficher fiches cloturées" -->
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-4 col-xs-8">
|
|
<input type="checkbox" name="cb_tous" value="cb_tous"
|
|
tal:attributes="checked cb_tous == 'oui' and 'checked' or None">
|
|
Afficher les chantiers cloturées</input>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-xs-offset-4 col-xs-8">
|
|
<button 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">
|
|
<div tal:condition="chantiers">
|
|
<table class="table table-bordered">
|
|
<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 chantiers">
|
|
<td>
|
|
<a href="dossier_view/${societe}-${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>
|
|
</table>
|
|
</div>
|
|
<br />
|
|
<br />
|
|
</div>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#site-search-form').formValidation();
|
|
$('form input').on('keypress', function(e) {
|
|
return e.which !== 13;
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</div>
|
|
</metal:block>
|