ajout : création du rapport de RDF

This commit is contained in:
2019-02-27 16:15:43 +01:00
parent 45d9b75a22
commit 145501fe81
19 changed files with 772 additions and 295 deletions

View File

@@ -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>

View 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>

View 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>

View File

@@ -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>';
},
},
]
});