ajout : création du rapport de RDF
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control" id="agenda" name="agenda" onChange="$('#frm').submit()">
|
||||
<select class="form-control" id="agenda" name="agenda" onChange="$('#frm').submit()" tal:condition="isCommercial==False">
|
||||
<div tal:repeat="item agendas">
|
||||
<option value="${item.CD_UTI}" tal:attributes="selected agenda==item.CD_UTI and 'selected' or None">${item.NOM}</option>
|
||||
</div>
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
<button class="btn btn-danger" type="submit" name="form.deleted"
|
||||
tal:condition="nolig != '0' and logged_in.upper()==rdv.USERMAJ.upper()">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
<a class="btn btn-warning" href="${request.route_url('dossier_view', nodossier=nodossier)}">
|
||||
<span class="glyphicon glyphicon-folder-open"></span> Dossier</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,8 +109,8 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- PANEL SUIVI -->
|
||||
<div class="panel-group" id="accordion">
|
||||
<!-- PANEL SUIVI -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@@ -165,7 +165,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- PANEL DOCUMENTS -->
|
||||
|
||||
<!-- 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-documents">
|
||||
<span class="glyphicon glyphicon-plus"></span> RECHERCHE DE FUITE</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="panel-documents" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<a class="btn btn-success" role="button" href="${request.route_url('rdf_edit', nodossier=nodossier)}">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle recherche</a>
|
||||
</p>
|
||||
<table class="table table-bordered table-condensed" tal:condition="rapport">
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
<th>Chantier</th>
|
||||
<th>No sinistre</th>
|
||||
<th>Modif le</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="/rdf_edit/${nodossier}">${rapport.nochantier}</a>
|
||||
</td>
|
||||
<td>${rapport.DATE.strftime('%d-%m-%Y')}</td>
|
||||
<td>${rapport.C_QUALITE} ${rapport.C_NOM}</td>
|
||||
<td>${rapport.NOSIN}</td>
|
||||
<td>${rapport.modif_le.strftime('%d-%m-%Y')}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PANEL DOCUMENTS -->
|
||||
<div class="panel panel-default" tal:condition="documents">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@@ -198,7 +235,7 @@
|
||||
</div>
|
||||
|
||||
<!-- PANEL DOCS ATTACHES -->
|
||||
<div class="panel panel-default" tal:condition="docs_attaches">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion" href="#panel-attaches">
|
||||
@@ -208,8 +245,8 @@
|
||||
<div id="panel-attaches" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<p>
|
||||
<a href="${request.application_url}/upload_doc/${nodossier}" class="btn btn-primary" role="button">
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> Télécharger un document</a>
|
||||
<a href="${request.application_url}/upload_doc/${nodossier}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> Ajouter un document</a>
|
||||
</p>
|
||||
<ul>
|
||||
<div tal:repeat="detail docs_attaches">
|
||||
|
||||
124
mondumas/templates/dossier/rdf_edit.pt
Normal file
124
mondumas/templates/dossier/rdf_edit.pt
Normal file
@@ -0,0 +1,124 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<br />
|
||||
<!-- ENTETE -->
|
||||
<div class="row">
|
||||
<h4>ADRESSE d'INTERVENTION</h4>
|
||||
<table class="table table-condensed ">
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<h4>${rapport.C_QUALITE} ${rapport.C_NOM}</h4>
|
||||
${rapport.C_ADR}<br />
|
||||
<span tal:condition="rapport.C_ADR2">${rapport.C_ADR2}<br /></span>
|
||||
${rapport.C_CP} ${rapport.C_VILLE}<br />
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
Assureur : <b>${rapport.NOMCLI}</b><br />
|
||||
No Sinistre : ${rapport.NOSIN}
|
||||
<br />
|
||||
Etage : ${rapport.C_ETAGE}<br />
|
||||
Téléphone : ${rapport.C_TEL1}<br />
|
||||
Mobile: ${rapport.C_TELP}<br />
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> <!-- row -->
|
||||
|
||||
<div class="row">
|
||||
<form id="rdv_edit-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" for="comment">Caractéristique du risque sinistré :</label>
|
||||
<select class="form-control" id="caracteristique" name="caracteristique">
|
||||
<div tal:repeat="item caracteristiques">
|
||||
<option value="${item}" tal:attributes="selected str(rapport.caracteristique)==item[0] and 'selected' or None">${item}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h4 class="text-center">ANALYSE</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="equipement">Les dommages sont-ils causés par un bien d'équipement ?</label>
|
||||
<select class="form-control" id="equipement" name="equipement">
|
||||
<div tal:repeat="item equipements">
|
||||
<option value="${item.libelle}" tal:attributes="selected str(rapport.equipement)==item.libelle and 'selected' or None">${item.libelle}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="reseau_int">Les dommages sont-ils causés par un bien d'équipement ?</label>
|
||||
<select class="form-control" id="reseau_int" name="reseau_int">
|
||||
<div tal:repeat="item reseaux_int">
|
||||
<option value="${item.libelle}" tal:attributes="selected str(rapport.reseau_int)==item.libelle and 'selected' or None">${item.libelle}</option>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h4 class="text-center">TRAVAUX relatifs à la DETECTION de la fuite</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="descr_detect">Descriptif détection</label>
|
||||
<textarea class="form-control" rows="6" cols="40" id="descr_detect" name="descr_detect"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="2000"
|
||||
data-fv-stringlength-message="2000 caractères maximum">${rapport.descr_detect}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<h4 class="text-center">TRAVAUX relatifs à la REPARATION de la fuite</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="descr_repar">Descriptif réparation</label>
|
||||
<textarea class="form-control" rows="6" cols="40" id="descr_repar" name="descr_repar"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="2000"
|
||||
data-fv-stringlength-message="2000 caractères maximum">${rapport.descr_repar}
|
||||
</textarea>
|
||||
</div>
|
||||
<h4 class="text-center">PHOTOS</h4>
|
||||
<p>
|
||||
<a href="${request.application_url}/upload_doc/${nodossier}" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-cloud-upload"></span> Ajouter une photo</a>
|
||||
</p>
|
||||
|
||||
<h4 class="text-center">CONCLUSIONS</h4>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="conclusions">Conclusions</label>
|
||||
<textarea class="form-control" rows="6" cols="40" id="conclusions" name="conclusions"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="2000"
|
||||
data-fv-stringlength-message="2000 caractères maximum">${rapport.conclusions}
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label">Dern. modif le</label>
|
||||
<div>
|
||||
<p class="form-control-static">${rapport.modif_le.strftime('%d-%m-%Y %H:%M')} par ${rapport.USERMAJ}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
@@ -62,7 +62,7 @@
|
||||
<div class="collapse navbar-collapse" id="myNavbar" tal:condition="not layout.isAnonymous()">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="${request.application_url}"><span class="glyphicon glyphicon-home"></span> Accueil</a></li>
|
||||
<a href="${request.application_url}/chantier_lookup"><span class="glyphicon glyphicon-search"></span> Recherche</a></li>
|
||||
<li tal:condition="layout.isAdmin()">
|
||||
<a href="${request.application_url}/parametres"><span class="glyphicon glyphicon-cog"></span>Paramètres</a></li>
|
||||
${panel('dropdown_menu_panel')}
|
||||
|
||||
@@ -7,6 +7,13 @@
|
||||
<a href="${request.application_url}/users_list"><span class="glyphicon glyphicon-user logo-primary"></span></a>
|
||||
<h4>UTILISATEURS</h4>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/rdf_causes_list"><span class="glyphicon glyphicon-tint logo-primary"></span></a>
|
||||
<h4>RDF : CAUSES</h4>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row text-center">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/users_ua"><span class="glyphicon glyphicon-log-in logo-primary"></span></a>
|
||||
<h4>CONNEXIONS</h4>
|
||||
|
||||
72
mondumas/templates/parametres/rdf_cause_edit.pt
Normal file
72
mondumas/templates/parametres/rdf_cause_edit.pt
Normal file
@@ -0,0 +1,72 @@
|
||||
<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="rdv_edit-form" class="form-horizontal" 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-sm-3" for="code">Code</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" id="code" name="code" value="${cause.code}"
|
||||
placeholder="5 caractères : Cxxyy"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Un code est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="5"
|
||||
data-fv-stringlength-min="5"
|
||||
data-fv-stringlength-message="5 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3" for="libelle">Libellé</label>
|
||||
<div class="col-sm-9">
|
||||
<input class="form-control" type="text" id="libelle" name="libelle" value="${cause.libelle}"
|
||||
placeholder="150 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Un libellé est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="150"
|
||||
data-fv-stringlength-message="150 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3">Dern. modif le</label>
|
||||
<div class="col-sm-9">
|
||||
<p class="form-control-static">${cause.modif_le.strftime('%d-%m-%Y %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<a class="btn btn-default" href="${request.route_url('rdf_causes_list')">
|
||||
<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-danger" type="submit" name="form.deleted" tal:condition="old_code != '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdv_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
52
mondumas/templates/parametres/rdf_causes_list.pt
Normal file
52
mondumas/templates/parametres/rdf_causes_list.pt
Normal file
@@ -0,0 +1,52 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/parametres" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/rdf_cause_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouvelle cause</a>
|
||||
</p>
|
||||
|
||||
<table id="rdf_causes_list" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Libelle de la cause</th>
|
||||
<th>Modif le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD/MM/YYYY - HH:mm');
|
||||
$('#rdf_causes_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="/rdf_cause_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Email</th>
|
||||
<th>Agenda</th>
|
||||
<th>Rôle</th>
|
||||
<th>Fonction</th>
|
||||
<th>Etat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -52,7 +52,13 @@
|
||||
return '';
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
{ "targets": 4,
|
||||
"render": function (data, type, row, meta) {
|
||||
// ajouter un link vers le login
|
||||
return '<a href="/connecter_a/' + row[0] + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user