dossier_view.pt : remplacer panels par tabs

This commit is contained in:
2019-09-19 19:00:07 +02:00
parent 2e896772ff
commit 64154c7045
2 changed files with 140 additions and 157 deletions

View File

@@ -113,167 +113,150 @@
</tr> </tr>
</table> </table>
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#tab_suivi"><b>SUIVI du DOSSIER</b></a></li>
<li tal:condition="documents">
<a data-toggle="tab" href="#tab_documents"><b>DEVIS - FACTURES</b></a></li>
<li tal:condition="docs_attaches">
<a data-toggle="tab" href="#tab_attaches"><b>DOCUMENTS ATTACHES</b></a></li>
<li tal:condition="nodossier.startswith('PL')">
<a data-toggle="tab" href="#tab_rdf"><b>RAPPORTS DE RDF</b></a></li>
</ul>
<!-- PANEL SUIVI --> <!-- PANEL SUIVI -->
<div class="panel-group" id="accordion"> <div class="tab-content">
<div class="panel panel-default"> <div id="tab_suivi" class="tab-pane fade in active">
<div class="panel-heading"> <h3>SUIVI du DOSSIER</h3>
<h4 class="panel-title"> <p>
<a data-toggle="collapse" data-parent="#accordion" href="#panel-suivi"> <a class="btn btn-success" role="button" href="${request.route_url('suivi_edit', nodossier=nodossier, nolig='0')}">
<span class="glyphicon glyphicon-plus"></span>&nbsp;SUIVI du DOSSIER</a> <span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a>
</h4> <a class="btn btn-warning" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}">
</div> <span class="glyphicon glyphicon-calendar"></span> Nouveau rendez-vous</a>
<div id="panel-suivi" class="panel-collapse collapse"> </p>
<div class="panel-body"> <table class="table table-bordered table-condensed">
<p> <tr>
<a class="btn btn-success" role="button" href="${request.route_url('suivi_edit', nodossier=nodossier, nolig='0')}"> <th>Date</th>
<span class="glyphicon glyphicon-plus"></span> Nouvelle ligne</a> <th>Rendez-vous</th>
<a class="btn btn-warning" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}"> <th>Avec</th>
<span class="glyphicon glyphicon-calendar"></span> Nouveau rendez-vous</a> <th>Action - commentaire</th>
</p> <th class="text-right">Montant</th>
<table class="table table-bordered table-condensed"> <th>Réf. lettre</th>
<tr> <th class="text-center">Par</th>
<th>Date</th> </tr>
<th>Rendez-vous</th> <tr tal:repeat="detail details">
<th>Avec</th> <td>
<th>Action - commentaire</th> ${detail.DATE.strftime('%d-%m-%Y')}
<th class="text-right">Montant</th> </td>
<th>Réf. lettre</th> <td>
<th class="text-center">Par</th> <span tal:condition="detail.rdv_debut==None"></span>
</tr> <span tal:condition="detail.rdv_debut!=None">
<tr tal:repeat="detail details"> <a href="${request.route_url('rdv_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
<td> ${detail.rdv_debut.strftime('%d-%m-%Y %H:%M')}</a>
${detail.DATE.strftime('%d-%m-%Y')} </span>
</td> </td>
<td> <td class="text-center">
<span tal:condition="detail.rdv_debut==None"></span> <span tal:condition="detail.rdv_debut!=None">${detail.LISTE}</span>
<span tal:condition="detail.rdv_debut!=None"> </td>
<a href="${request.route_url('rdv_edit', nodossier=nodossier, nolig=detail.NOLIG)}"> <td tal:condition="detail.COMMENT.startswith('!!')" class="text-danger">
${detail.rdv_debut.strftime('%d-%m-%Y %H:%M')}</a> <b>${detail.COMMENT}</b>
</span> </td>
</td> <td tal:condition="not detail.COMMENT.startswith('!!')">
<td class="text-center"> <a href="${request.route_url('suivi_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
<span tal:condition="detail.rdv_debut!=None">${detail.LISTE}</span> ${detail.COMMENT}</a>
</td> </td>
<td tal:condition="detail.COMMENT.startswith('!!')" class="text-danger"> <td class="text-right">${layout.to_euroz(detail.montant)}</td>
<b>${detail.COMMENT}</b> <td class="text-center">${detail.REF_LET}</td>
</td> <td class="text-center">${detail.USERMAJ}</td>
<td tal:condition="not detail.COMMENT.startswith('!!')"> </tr>
<a href="${request.route_url('suivi_edit', nodossier=nodossier, nolig=detail.NOLIG)}"> </table>
${detail.COMMENT}</a> </div>
</td>
<td class="text-right">${layout.to_euroz(detail.montant)}</td>
<td class="text-center">${detail.REF_LET}</td>
<td class="text-center">${detail.USERMAJ}</td>
</tr>
</table>
</div>
</div>
</div>
<!-- PANEL RDF -->
<div class="panel panel-default" tal:condition="nodossier.startswith('PL')">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#panel-rdf">
<span class="glyphicon glyphicon-plus"></span>&nbsp;RECHERCHE DE FUITE</a>
</h4>
</div>
<div id="panel-rdf" class="panel-collapse collapse">
<div class="panel-body">
<p>
<a class="btn btn-success" role="button" href="${request.route_url('rdf_edit', nodossier=nodossier, date_inter='new')}">
<span class="glyphicon glyphicon-plus"></span> Nouveau rapport</a>
</p>
<table class="table table-bordered table-condensed" tal:condition="rapports">
<tr>
<th>No rapport</th>
<th>Date interv.</th>
<th>Date rapport</th>
<th>Chantier</th>
<th>No sinistre</th>
<th>Modif le</th>
</tr>
<tr tal:repeat="rapport rapports">
<td>
<a href="/rdf_view/${rapport.no_id}">${rapport.no_id}</a>
</td>
<td>${rapport.date_inter.strftime('%d-%m-%Y')}</td>
<td tal:condition="rapport.date_rapport">${rapport.date_rapport.strftime('%d-%m-%Y')}</td>
<td tal:condition="not rapport.date_rapport"></td>
<td>${rapport.C_QUALITE} ${rapport.C_NOM}</td>
<td>${rapport.NOSIN}</td>
<td>${rapport.modif_le.strftime('%d-%m-%Y')} - ${rapport.auteur_code}</td>
</tr>
</table>
</div>
</div>
</div>
<!-- PANEL DOCUMENTS --> <!-- PANEL DOCUMENTS -->
<div class="panel panel-default" tal:condition="documents"> <div id="tab_documents" class="tab-pane fade">
<div class="panel-heading"> <h3>DEVIS - FACTURES</h3>
<h4 class="panel-title"> <table class="table table-bordered table-condensed">
<a data-toggle="collapse" data-parent="#accordion" href="#panel-documents"> <tr>
<span class="glyphicon glyphicon-plus"></span>&nbsp;DEVIS - FACTURES</a> <th>Numéro</th>
</h4> <th>Date</th>
</div> <th>Client</th>
<div id="panel-documents" class="panel-collapse collapse"> <th class="text-right">Montant</th>
<div class="panel-body"> <th class="text-center">Statut</th>
<table class="table table-bordered table-condensed"> </tr>
<tr> <tr tal:repeat="detail documents">
<th>Numéro</th> <td>
<th>Date</th> <a href="/devis_view/${detail.nodossier}">${detail.nodossier}</a>
<th>Client</th> </td>
<th class="text-right">Montant</th> <td>${detail.date.strftime('%d-%m-%Y')}</td>
<th class="text-center">Statut</th> <td>${detail.nomcli}</td>
</tr> <td class="text-right">${layout.to_euro(detail.montant)}</td>
<tr tal:repeat="detail documents"> <td class="text-center">${detail.status}</td>
<td> </tr>
<a href="/devis_view/${detail.nodossier}">${detail.nodossier}</a> </table>
</td> </div>
<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>
<!-- PANEL DOCS ATTACHES --> <!-- PANEL DOCS ATTACHES -->
<div class="panel panel-default"> <div id="tab_attaches" class="tab-pane fade">
<div class="panel-heading"> <h3>DOCUMENTS ATTACHES</h3>
<h4 class="panel-title"> <p>
<a data-toggle="collapse" data-parent="#accordion" href="#panel-attaches"> <a href="${request.application_url}/upload_doc/${nodossier}" class="btn btn-success" role="button">
<span class="glyphicon glyphicon-plus"></span>&nbsp;DOCUMENTS ATTACHES</a> <span class="glyphicon glyphicon-cloud-upload"></span>&nbsp;Ajouter un document</a>
</h4> </p>
</div> <table class="table table-bordered table-condensed">
<div id="panel-attaches" class="panel-collapse collapse"> <tr>
<div class="panel-body"> <th></th>
<p> <th>Nom du fichier</th>
<a href="${request.application_url}/upload_doc/${nodossier}" class="btn btn-success" role="button"> <th class="text-right">Taille</th>
<span class="glyphicon glyphicon-cloud-upload"></span>&nbsp;Ajouter un document</a> <th>Crée le</th>
</p> <th class="text-center">par</th>
<ul> </tr>
<div tal:repeat="detail docs_attaches"> <tr tal:repeat="detail docs_attaches">
<li> <td class="text-center">
<span class="glyphicon glyphicon-file" tal:condition="detail.nomfichier[-3:]=='pdf'"></span> <span class="glyphicon glyphicon-file" tal:condition="detail.nomfichier[-3:]=='pdf'"></span>
<span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier[-3:]=='jpg'"></span> <span class="glyphicon glyphicon-picture" tal:condition="detail.nomfichier.lower()[-3:]=='jpg'"></span>
<a href="${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier}" </td>
target="popup" <td>
onclick="window.open('${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;"> <a href="${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier}"
${detail.nomfichier} target="popup"
</a> onclick="window.open('${docs_url}${detail.nomrep}/${detail.societe}/${detail.nochantier}/${detail.nomfichier},'popup','width=900,height=768'); return false;">
&nbsp;-&nbsp;crée le ${detail.cree_le.strftime('%d-%m-%Y')}&nbsp;par&nbsp;${detail.usermaj} ${detail.nomfichier}
</li> </a>
</div> </td>
</ul> <td class="text-right">${detail.taillefichier}</td>
</div> <td>${detail.cree_le.strftime('%d-%m-%Y')}</td>
</div> <td class="text-center">${detail.usermaj}</td>
</div> </tr>
</div> </table>
</div>
<!-- PANEL RDF -->
<div id="tab_rdf" class="tab-pane fade">
<h3>RECHERCHE DE FUITE</h3>
<p>
<a class="btn btn-success" role="button" href="${request.route_url('rdf_edit', nodossier=nodossier, date_inter='new')}">
<span class="glyphicon glyphicon-plus"></span> Nouveau rapport</a>
</p>
<table class="table table-bordered table-condensed" tal:condition="rapports">
<tr>
<th>No rapport</th>
<th>Date interv.</th>
<th>Date rapport</th>
<th>Chantier</th>
<th>No sinistre</th>
<th>Modif le</th>
</tr>
<tr tal:repeat="rapport rapports">
<td>
<a href="/rdf_view/${rapport.no_id}">${rapport.no_id}</a>
</td>
<td>${rapport.date_inter.strftime('%d-%m-%Y')}</td>
<td tal:condition="rapport.date_rapport">${rapport.date_rapport.strftime('%d-%m-%Y')}</td>
<td tal:condition="not rapport.date_rapport"></td>
<td>${rapport.C_QUALITE} ${rapport.C_NOM}</td>
<td>${rapport.NOSIN}</td>
<td>${rapport.modif_le.strftime('%d-%m-%Y')} - ${rapport.auteur_code}</td>
</tr>
</table>
</div>
</div>
</div> </div>
</metal:block> </metal:block>

View File

@@ -728,7 +728,7 @@ def demandes(request):
liste=[] liste=[]
# lire les demandes de la MAIF puis de DOMUS # lire les demandes de la MAIF puis de DOMUS
demandes_afficher(conn, mbx_name, mbx_search1, liste) demandes_afficher(conn, mbx_name, mbx_search1, liste)
# demandes_afficher(conn, mbx_name, mbx_search2, liste) demandes_afficher(conn, mbx_name, mbx_search2, liste)
# messages lus # messages lus
msglus = bool(liste) msglus = bool(liste)
conn.logout() conn.logout()