ajout dossier_view

This commit is contained in:
2017-03-24 13:39:35 +01:00
parent 6612b0b81b
commit 8ef2cc49f2
5 changed files with 279 additions and 124 deletions

View File

@@ -1,78 +1,111 @@
<metal:block use-macro="main_template">
<div metal:fill-slot="content">
<br />
<table class="table">
<tr>
<td width="200">Số hồ sơ :<b> ${member.mbr_id}</b></td>
<td width="300">
${member.civilite}&nbsp;<b>${member.nom}&nbsp;${member.prenom}</b><br />
${member.adresse}<br />
${member.adresse2}<br />
${member.cp}&nbsp;${member.ville}<br />
</td>
<td valign="bottom">
<a class="btn btn-primary" role="button"
href="${request.route_url('member_edit', mbr_id=member.mbr_id)}">
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
<a class="btn btn-default" role="button"
href="${request.route_url('members', mbr_id=member.mbr_id)}">
<span class="glyphicon glyphicon-chevron-left"></span> Danh sách</a>
</td>
</tr>
<tr>
<td>
Điện thoại (mobile - nhà)<br />
Email<br />
Pháp danh<br />
Ghi Chú<br />
</td>
<td>
${member.tel_mobile} - ${member.tel_fixe}<br />
${member.email}<br />
${member.phap_danh}<br />
${member.notes}<br />
</td>
<td></td>
</tr>
<tr>
<td>
Trang thái<br />
Niên liễm<br />
Ngày thay đổi<br />
</td>
<td>
${member.statut}<br />
${member.cotise_en}<br />
${member.modif_le.strftime('%d-%m-%Y %H:%M')} - [<i>Ngày tạo : ${member.cree_le.strftime('%d-%m-%Y')}</i>]
</td>
<td></td>
</tr>
</table>
<!-- ENTETE -->
<div class="row">
<!-- CHANTIER -->
<div class="col-md-6">
<table class="table table-condensed ">
<tr>
<td><h4>CHANTIER</h4></td>
<td>
<h4>${dossier.C_QUALITE} ${dossier.C_NOM}</h4>
${dossier.C_ADR}<br />
<span tal:condition="dossier.C_ADR2">${dossier.C_ADR2}<br /></span>
${dossier.C_CP} ${dossier.C_VILLE}<br />
</td>
</tr>
<tr>
<td>
Etage - Code<br />
Tél. domicile - prof.<br />
Tél. mobile - fax
</td>
<td>
${dossier.C_ETAGE} - ${dossier.C_CODE}<br />
${dossier.C_TEL1} - ${dossier.C_TEL2}<br />
${dossier.C_TELP} - ${dossier.C_FAX}
</td>
</tr>
<tr>
<td>
Cabinet<br />
Expert<br />
Référence expert
</td>
<td>
${dossier.nom_cabinet}<br />
${dossier.nom_expert}<br />
${dossier.REF_EXPERT}<br />
</td>
</tr>
<tr>
<td>
Police<br />
Sinistre<br />
Votre référence<br />
</td>
<td>
${dossier.NOPOL}<br />
${dossier.NOSIN}<br />
${dossier.VREF}<br />
</td>
</tr>
</table>
</div>
<h3>Cúng dường </h3>
<p><a class="btn btn-success" role="button" href="${request.route_url('gift_edit', mbr_id=member.mbr_id, don_id='0')}">
<span class="glyphicon glyphicon-plus"></span> Thêm cúng dường</a></p>
<!-- Mon compte -->
<div class="col-md-6 well">
<table class="table table-condensed ">
<tr>
<td><h4>CLIENT</h4></td>
<td>
<h4>${dossier.QUALITE} ${dossier.NOM}</h4>
${dossier.ADRESSE}<br />
<span tal:condition="dossier.ADRESSE2">${dossier.ADRESSE2}<br /></span>
${dossier.CP} ${dossier.VILLE}<br />
</td>
</tr>
<tr>
<td>
Responsable<br />
Tél. 1 - 2<br />
Tél. mobile - fax
</td>
<td>
${dossier.NOMRESP}<br />
${dossier.TEL1} - ${dossier.TEL2}<br />
${dossier.TELP} - ${dossier.FAX}
</td>
</tr>
</table>
</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="col-sm-7">
<table class="table table-bordered">
<tr>
<th>Ngày thu</th>
<th>Loại</th>
<th class="text-right">Số tin</th>
<th class="text-center">Bằng</th>
<th>Vào QUỸ</th>
<th>Date</th>
<th>Visite</th>
<th>Action</th>
<th class="text-center">Avec</th>
</tr>
<tr tal:repeat="don dons">
<td tal:content="don.date.strftime('%d/%m/%Y')">&nbsp;</td>
<td tal:content="don.type"></td>
<td class="text-right" tal:content="layout.to_euro(don.montant)"></td>
<td class="text-center">
<a href="${request.route_url('gift_edit', mbr_id=don.mbr_id, don_id=don.don_id)}">${don.mode}</a>
<tr tal:repeat="detail details">
<td>${detail.DATE.strftime('%d/%m/%Y')}</td>
<td>
<span tal:condition="detail.DATEVI==None"></span>
<span tal:condition="detail.DATEVI<>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>${don.valide_le}</td>
<td>${detail.COMMENT} ${detail.COMMENTVI}</td>
<td class="text-center">${detail.LISTE}</td>
</tr>
</table>
</div>
</div>
</metal:block>

View File

@@ -0,0 +1,91 @@
<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="empl_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="rdv"
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" for="date_vi">Date</label>
<div class="col-xs-3 date">
<input class="form-control" type="text" name="date_vi"
value="${rdv.DATEVI.strftime('%d-%m-%Y')}"
data-fv-notempty="true"
data-fv-notempty-message="La date est obligatoire"
data-fv-date="true"
data-fv-date-format="DD-MM-YYYY"
data-fv-date-message="La date n'est pas valide" />
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="heurevi">Heure</label>
<div class="col-xs-3">
<input class="form-control" type="text" name="heurevi"
value="${rdv.HEUREVI.strftime('%H:%M')}"
data-fv-notempty="true"
data-fv-notempty-message="L'heure est obligatoire"
data-fv-date="true"
data-fv-date-format="h:m"
data-fv-date-message="L'heure n'est pas valide" />
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="comment">Commentaire 1</label>
<div class="col-xs-5">
<input class="form-control" type="text" id="comment" name="comment" value="${rdv.COMMENT}"
placeholder="30 caractères maximum"
data-fv-notempty="true"
data-fv-notempty-message="Un commentaire est obligatoire"
data-fv-stringlength="true"
data-fv-stringlength-max="30"
data-fv-stringlength-message="30 caractères maximum" />
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-2" for="commentvi">Commentaire 2</label>
<div class="col-xs-5">
<input class="form-control" type="text" id="commentvi" name="commentvi" value="${rdv.COMMENTVI}"
placeholder="30 caractères maximum"
data-fv-stringlength="true"
data-fv-stringlength-max="30"
data-fv-stringlength-message="30 caractères maximum" />
</div>
</div>
<div class="form-group">
<div class="col-xs-offset-2 col-xs-10">
<div class="form-group">
<a class="btn btn-default" href="${request.route_url('dossier_view', nodossier=nodossier)}">
<span class="glyphicon glyphicon-arrow-left"></span> Annuler</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="python: rdv.NOLIG <> '0'">
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
</div>
</div>
</div>
</form>
<br />
<br />
<br />
</div> <!-- row -->
<script>
$(document).ready(function() {
$('#empl_edit-form').formValidation();
$('form input').on('keypress', function(e) {
return e.which !== 13;
});
});
</script>
</div>
</metal:block>