ajout chantier_lookup.pt

This commit is contained in:
2018-09-18 16:32:27 +02:00
parent 78657a8d75
commit 5197325fe4
8 changed files with 235 additions and 59 deletions

View File

@@ -82,30 +82,74 @@
</div>
</div> <!-- row -->
<h3>SUIVI</h3>
<p><a class="btn btn-success" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}">
<span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a></p>
<div class="panel-group" id="accordion">
<!-- PANEL SUIVI -->
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#panel-suivi">
<span class="glyphicon glyphicon-arrow-down"></span>&nbsp;SUIVI</a>
</h4>
</div>
<div id="panel-suivi" class="panel-collapse collapse">
<div class="panel-body">
<p><a class="btn btn-success" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}">
<span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a></p>
<table class="table table-bordered">
<tr>
<th>Date</th>
<th>Action</th>
<th>Rendez-vous</th>
<th class="text-center">Par</th>
</tr>
<tr tal:repeat="detail details">
<td>${detail.DATE.strftime('%d/%m/%Y')}</td>
<td>${detail.COMMENT} ${detail.COMMENTVI}</td>
<td>
<span tal:condition="detail.rdv_debut==None"></span>
<span tal:condition="detail.rdv_debut<>None">
<a href="${request.route_url('rdv_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
${detail.rdv_debut.strftime('%d/%m/%Y %H:%M')}</a>
avec ${detail.LISTE}
</span>
</td>
<td class="text-center">${detail.USERMAJ}</td>
</tr>
</table>
</div>
</div>
</div>
<!-- PANEL SUIVI -->
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#panel-documents">
<span class="glyphicon glyphicon-arrow-down"></span>&nbsp;DEVIS - FACTURES</a>
</h4>
</div>
<div id="panel-documents" class="panel-collapse collapse">
<div class="panel-body">
<table class="table table-bordered">
<tr>
<th>Numéro</th>
<th>Date</th>
<th>Client</th>
<th class="text-right">Montant</th>
<th class="text-center">Statut</th>
</tr>
<tr tal:repeat="detail documents">
<td>${detail.TYPE}-${detail.numero}</td>
<td>${detail.date.strftime('%d-%m/-%Y')}</td>
<td>${detail.nomcli}</td>
<td class="text-right">${layout.to_euro(detail.montant)}</td>
<td class="text-center">${detail.status}</td>
</tr>
</table>
</div>
</div>
</div>
</div>
<table class="table table-bordered">
<tr>
<th>Date</th>
<th>Visite</th>
<th>Action</th>
<th class="text-center">Avec</th>
</tr>
<tr tal:repeat="detail details">
<td>${detail.DATE.strftime('%d/%m/%Y')}</td>
<td>
<span tal:condition="detail.rdv_debut==None"></span>
<span tal:condition="detail.rdv_debut<>None">
<a href="${request.route_url('rdv_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
${detail.rdv_debut.strftime('%d/%m/%Y %H:%M')}</a>
</span>
</td>
<td>${detail.COMMENT} ${detail.COMMENTVI}</td>
<td class="text-center">${detail.LISTE}</td>
</tr>
</table>
</div>
</metal:block>

View File

@@ -0,0 +1,95 @@
<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>&nbsp;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>

View File

@@ -14,6 +14,11 @@
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
<h4>PLANNING</h4></a>
</div>
<div class="col-sm-3">
<a href="${request.application_url}/chantier_lookup">
<span class="glyphicon glyphicon-search logo-small"></span>
<h4>RECH. CHANTIER</h4></a>
</div>
</div> <!-- row 1 -->
<br />
<div class="row well" tal:condition="layout.isAdmin">