ajout module Dossier et devis_view.pt + creer_rdv.pt
This commit is contained in:
106
mondumas/templates/dossier/dossier_lookup.pt
Normal file
106
mondumas/templates/dossier/dossier_lookup.pt
Normal file
@@ -0,0 +1,106 @@
|
||||
<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">
|
||||
<table id="dossiers_list" 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>
|
||||
</thead>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
var goto_url = '${goto_url}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
$('#dossiers_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
columnDefs: [
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="' + goto_url + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
$('#site-search-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
Reference in New Issue
Block a user