ajout suppression des photos, bouton valider rapport
This commit is contained in:
@@ -193,8 +193,8 @@
|
||||
<td>
|
||||
<a href="/rdf_view/${rapport.no_id}">${rapport.no_id}</a>
|
||||
</td>
|
||||
<td>${rapport.date_inter.strftime('%Y-%m-%d')}</td>
|
||||
<td tal:condition="rapport.date_rapport">${rapport.date_rapport.strftime('%d-%m-%Y')}</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>
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
<table id="users_list" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dossier</th>
|
||||
<th>Date interv.</th>
|
||||
<th>Date rapport</th>
|
||||
<th>Rapport</th>
|
||||
<th>Intervenu</th>
|
||||
<th>Validé</th>
|
||||
<th>Généré</th>
|
||||
<th>Chantier</th>
|
||||
<th>Client</th>
|
||||
<th>No sinistre</th>
|
||||
<th>Auteur</th>
|
||||
<th>Rapport</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -40,10 +40,11 @@
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, row, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/rdf_view/' + row[7] + '">' + data + '</a>';
|
||||
return '<a href="/rdf_view/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
],
|
||||
order: [[ 0, "desc" ]],
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -289,8 +289,8 @@
|
||||
<br />
|
||||
<div tal:condition="pt_name=='rdf_view'">
|
||||
<p>
|
||||
<a href="${request.application_url}/upload_img/${norapport}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> Ajouter une photo</a>
|
||||
<a href="${request.application_url}/upload_img/${norapport}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-picture"></span> Gérer les photos</a>
|
||||
</p>
|
||||
<br />
|
||||
</div>
|
||||
@@ -308,7 +308,7 @@
|
||||
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td>
|
||||
<td width="40%">
|
||||
<label>Date du rapport :</label> ${date_rapport}
|
||||
<br />
|
||||
<br />
|
||||
@@ -316,8 +316,11 @@
|
||||
<br />${rapport.auteur_nom}
|
||||
<br />
|
||||
<br />
|
||||
<label>Relu par le superviseur :</label>
|
||||
<br />Jean-Marc PENEL
|
||||
<div tal:condition="date_relu!=''">
|
||||
<label>Relu par le superviseur :</label>
|
||||
<br />Jean-Marc PENEL
|
||||
<br />le ${date_relu}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<label>Signature du client :</label>
|
||||
@@ -334,12 +337,17 @@
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Retour Dossier</a>
|
||||
<a class="btn btn-primary" href="/rdf_edit/${nodossier}/${rapport.date_inter.strftime('%Y-%m-%d')}">
|
||||
<span class="glyphicon glyphicon-pencil"></span> Modifier</a>
|
||||
<button class="btn btn-danger" type="submit" name="form.delete" tal:condition="not rapport.signature_svg and date_rapport==''">
|
||||
<button class="btn btn-danger" type="submit" name="form.delete" tal:condition="not rapport.signature_svg and date_relu==''">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<a class="btn btn-default" href="/rdf_rapport/${rapport.no_id}">
|
||||
<span class="glyphicon glyphicon-file"></span> Aperçu PDF</a>
|
||||
<button class="btn btn-warning" type="submit" name="form.generate">
|
||||
<span class="glyphicon glyphicon-file"></span> Générer PDF</button>
|
||||
<button class="btn btn-success" type="submit" name="form.validate" tal:condition="(logged_in=='JMP' or logged_in=='CAO') and date_relu==''">
|
||||
<span class="glyphicon glyphicon-remove"></span> Valider</button>
|
||||
<div tal:condition="(logged_in=='MD' or logged_in=='CAO') and date_relu!=''">
|
||||
<br />
|
||||
<a class="btn btn-default" href="/rdf_rapport/${rapport.no_id}">
|
||||
<span class="glyphicon glyphicon-file"></span> Aperçu PDF</a>
|
||||
<button class="btn btn-warning" type="submit" name="form.generate">
|
||||
<span class="glyphicon glyphicon-file"></span> Générer PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,38 +1,59 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form id="upload_doc-form" action="${url}" method="post" accept-charset="utf-8" enctype="multipart/form-data"
|
||||
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 for="uploadfile">Veuillez séléctionner un fichier</label>
|
||||
<input id="uploadfile" name="filename" type="file" value="" required />
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-plus"></span> AJOUTER UNE PHOTO
|
||||
</h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_view', no_id=norapport)}">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Retour au rapport</a>
|
||||
<button id="uploadButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-refresh"></i> Télécharger</button>
|
||||
<div class="panel-body">
|
||||
<div class="col-sm-6">
|
||||
<form id="upload_doc-form" action="${url}" method="post" accept-charset="utf-8" enctype="multipart/form-data"
|
||||
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 for="uploadfile">Veuillez séléctionner un fichier</label>
|
||||
<input id="uploadfile" name="filename" type="file" value="" required />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_view', no_id=norapport)}">
|
||||
<span class="glyphicon glyphicon-arrow-left"></span> Retour au rapport</a>
|
||||
<button id="uploadButton" class="btn btn-primary" type="submit" name="form.submitted">
|
||||
<i class="glyphicon glyphicon-refresh"></i> Télécharger</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-6 well well-sm">
|
||||
<ul>
|
||||
<li>Seuls les documents au format <b>PNG, JPG ou JPEG</b> seront acceptés.</li>
|
||||
<li>La taille de chaque document ne doit <b>pas dépasser 2 Mo</b>.</li>
|
||||
</ul>
|
||||
</div> <!-- row -->
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<div class="row">
|
||||
<ul>
|
||||
<li>Seuls les documents au format <b>PNG, JPG ou JPEG</b> seront acceptés.</li>
|
||||
<li>La taille de chaque document ne doit <b>pas dépasser 2 Mo</b>.</li>
|
||||
</ul>
|
||||
</div> <!-- row -->
|
||||
|
||||
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<span class="glyphicon glyphicon-arrow-up"></span> PHOTOS DEJA TELECHARGES
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<form id="upload_doc-form" action="${url}" method="post">
|
||||
<ul tal:repeat="detail photos">
|
||||
<li>
|
||||
${detail.nomfichier} <a href="/rdf_imgdel/${nochantier}/${norapport}/${detail.nomfichier}">[Suppimer cet image]</a>
|
||||
<img src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
width="700" align="center" />
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Photos déjà téléchargées</h3>
|
||||
<p tal:repeat="detail photos">
|
||||
<img src="${docs_url}${detail.nomrep}/${detail.societe}/${nochantier}/${norapport}/${detail.nomfichier}"
|
||||
width="800" align="center" />
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('#uploadButton').on('click', function(){
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
language: {
|
||||
url: 'https://cdn.datatables.net/plug-ins/1.10.16/i18n/French.json'
|
||||
},
|
||||
"order": [[ 0, "desc" ]]
|
||||
order: [[ 0, "desc" ]]
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user