chargement initial
This commit is contained in:
14
caotek_mesavoirs/templates/404.pt
Normal file
14
caotek_mesavoirs/templates/404.pt
Normal file
@@ -0,0 +1,14 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="content text-center">
|
||||
<img src="${request.static_url('mondumas:static/img/globe.png')}" width="90" />
|
||||
<br />
|
||||
<br />
|
||||
<p class="lead"><span class="font-semi-bold">404</span> Page non trouvée</p>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
47
caotek_mesavoirs/templates/agenda/agenda.pt
Normal file
47
caotek_mesavoirs/templates/agenda/agenda.pt
Normal file
@@ -0,0 +1,47 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<a class="btn btn-primary" role="button" href="/">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<p>
|
||||
<span class="label label-danger">RDV Peinture</span> <span class="label label-warning">RDV Menuiserie</span>
|
||||
<span class="label label-success">RDV Plomberiee</span> <span class="label label-info">RDV Polynet</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaDay agendaWeek month listMonth',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
defaultView: 'agendaWeek',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
events:${fullcalendar_events},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
111
caotek_mesavoirs/templates/agenda/dossier_view.pt
Normal file
111
caotek_mesavoirs/templates/agenda/dossier_view.pt
Normal file
@@ -0,0 +1,111 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<br />
|
||||
<!-- 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>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Visite</th>
|
||||
<th>Action</th>
|
||||
<th class="text-center">Avec</th>
|
||||
</tr>
|
||||
<tr tal:repeat="detail details">
|
||||
<td>${detail.DATE.strftime('%d/%m/%Y')}</td>
|
||||
<td>
|
||||
<span tal:condition="detail.rdv_debut==None"></span>
|
||||
<span tal:condition="detail.rdv_debut<>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>${detail.COMMENT} ${detail.COMMENTVI}</td>
|
||||
<td class="text-center">${detail.LISTE}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
59
caotek_mesavoirs/templates/agenda/planning.pt
Normal file
59
caotek_mesavoirs/templates/agenda/planning.pt
Normal file
@@ -0,0 +1,59 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<a class="btn btn-primary" role="button" href="/">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</div>
|
||||
<form method="POST" id="frm">
|
||||
<div class="col-md-3" tal:condition="access >= 5">
|
||||
<select class="form-control" id="agenda" name="agenda" onChange="$('#frm').submit()">
|
||||
<optgroup tal:repeat="item agendas">
|
||||
<option value="${item.cd_uti}" tal:attributes="selected agenda==item.cd_uti and 'selected' or None">${item.nom}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3" tal:condition="access < 5">
|
||||
<input type="hidden" name="agenda" value="${agenda}"/>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-md-5">
|
||||
<p>
|
||||
<span class="label label-danger">RDV Peinture</span> <span class="label label-warning">RDV Menuiserie</span>
|
||||
<span class="label label-success">RDV Plomberiee</span> <span class="label label-info">RDV Polynet</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaDay agendaWeek month listMonth',
|
||||
center: 'prev title next',
|
||||
right: 'today'
|
||||
},
|
||||
defaultView: 'agendaWeek',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
events:${fullcalendar_events},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
91
caotek_mesavoirs/templates/agenda/rdv_edit.pt
Normal file
91
caotek_mesavoirs/templates/agenda/rdv_edit.pt
Normal 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="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="col-xs-2 control-label" for="date_rdv">Date et heure</label>
|
||||
<div class="col-xs-3 input-group date" id="date_rdv_picker">
|
||||
<input class="form-control" type="text" name="date_rdv" value="${date_rdv.strftime('%d-%m-%Y %H:%M')}"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="La date et l'heure sont obligatoires"
|
||||
data-fv-date="true"
|
||||
data-fv-date-format="DD-MM-YYYY HH:mm"
|
||||
data-fv-date-message="La date et l'heure ne sont pas valides" />
|
||||
<span class="input-group-addon add-on">
|
||||
<span class="glyphicon glyphicon-calendar"></span>
|
||||
</span>
|
||||
</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="${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="${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: nolig <> '0'">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#rdv_edit-form').formValidation();
|
||||
$('#date_rdv_picker').datetimepicker({
|
||||
format: 'DD-MM-YYYY HH:mm',
|
||||
showClear: true,
|
||||
allowInputToggle: true,
|
||||
stepping: 15,
|
||||
})
|
||||
.on('changeDate', function(e) {
|
||||
// Revalidate the date field
|
||||
$('#rdv_edit-form').formValidation('revalidateField', 'date_rdv');
|
||||
});
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
57
caotek_mesavoirs/templates/changer_mdp.pt
Normal file
57
caotek_mesavoirs/templates/changer_mdp.pt
Normal file
@@ -0,0 +1,57 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-3">
|
||||
<form id="change-password-form" action="${url}" method="post" tal:condition="member"
|
||||
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="old_password">Mot de passe actuel</label>
|
||||
<input class="form-control" type="password" size="10" name="old_password"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="new_password1">Nouveau mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" name="new_password1"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire"
|
||||
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-min="6"
|
||||
data-fv-stringlength-message="Le mot de passe doit avoir au moins 6 charactères" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="new_password2">Confirmer le mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" name="new_password2"
|
||||
data-fv-identical="true"
|
||||
data-fv-identical-field="new_password1"
|
||||
data-fv-identical-message="Le mot de passe et sa confirmation ne sont pas identiques" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Changer le mot de passe</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-password-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
28
caotek_mesavoirs/templates/envoyer_mdp.pt
Normal file
28
caotek_mesavoirs/templates/envoyer_mdp.pt
Normal file
@@ -0,0 +1,28 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container">
|
||||
<div class="alert alert-danger" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row col-md-6 well">
|
||||
<p>
|
||||
Pour des raisons de sécurité, nous gardons votre mot de passe chiffré, et nous ne pouvons pas vous l'envoyer.
|
||||
Si vous souhaitez ré-initialiser votre mot de passe, remplissez le formulaire ci-dessous et nous vous enverrons un email pour démarrer la phase de ré-initialisation de votre mot de passe. </p>
|
||||
<br />
|
||||
<form id="email_login-form" role="form" action="${url}" method="post">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="login">Mon identifiant</label>
|
||||
<div>
|
||||
<input class="form-control" type="text" size="20" id="login" name="login" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" value="Envoyer">Envoyer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- row -->
|
||||
<br />
|
||||
|
||||
</div><!-- container -->
|
||||
</div>
|
||||
</metal:block>
|
||||
32
caotek_mesavoirs/templates/home.pt
Normal file
32
caotek_mesavoirs/templates/home.pt
Normal file
@@ -0,0 +1,32 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<div class="container-fluid text-center">
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/agenda">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>MON AGENDA</h4></a>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/planning">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>PLANNING</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 1 -->
|
||||
<br />
|
||||
<div class="row well" tal:condition="layout.isAdmin">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/users_list">
|
||||
<span class="glyphicon glyphicon-user logo-small"></span><br />
|
||||
<h4>UTILISATEURS</h4></a>
|
||||
</div>
|
||||
</div> <!-- row 2 -->
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
105
caotek_mesavoirs/templates/layouts/global_layout.pt
Normal file
105
caotek_mesavoirs/templates/layouts/global_layout.pt
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
||||
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
||||
lang="fr">
|
||||
<head>
|
||||
<title>${page_title}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=yes" />
|
||||
|
||||
<!-- Bootstrap core + Plug-ins CSS -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.css" rel="stylesheet">
|
||||
<link href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
|
||||
<link href="${request.static_url('caotek_mesavoirs:static/dist/datatable/dataTables.bootstrap.css')}" rel="stylesheet" media="all">
|
||||
<link href="${request.static_url('caotek_mesavoirs:static/dist/formvalidation/css/formValidation.min.css')}" rel="stylesheet">
|
||||
<!-- Custom CSS -->
|
||||
<link href="${request.static_url('caotek_mesavoirs:static/css/style.less')}" type="text/css" rel="stylesheet/less">
|
||||
|
||||
<!-- Bootstrap + jQuery JavaScript plugins) -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
|
||||
<!-- Bootstrap Fullcalendar plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/fr.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/locale/fr.js"></script>
|
||||
<!-- Bootstrap Datepicker plugin -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<!-- Datatable -->
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/datatable/jquery.dataTables.js')}"></script>
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/datatable/dataTables.bootstrap.js')}"></script>
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/datatable/datetime-moment.js')}"></script>
|
||||
<!-- FormValidation plugin -->
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/formvalidation/js/formValidation.min.js')}"></script>
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/formvalidation/js/framework/bootstrap.min.js')}"></script>
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/formvalidation/js/language/fr_FR.js')}" type="text/javascript"></script>
|
||||
|
||||
<!-- Less -->
|
||||
<script src="${request.static_url('caotek_mesavoirs:static/dist/less-1.5.0.min.js')}" type="text/javascript"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- HEADER -->
|
||||
<nav id="mainnav" class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="${request.application_url}" alt="Accueil">
|
||||
<img src="${request.static_url('caotek_mesavoirs:static/img/logo.png')}" class="logo" /></a>
|
||||
Entreprise DUMAS
|
||||
</div>
|
||||
<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>
|
||||
<!--
|
||||
<li tal:condition="python: layout.isAdmin()">
|
||||
<a href="${request.application_url}/gestionnaire"><span class="glyphicon glyphicon-eye-open"></span> Gestionnaire</a></li>
|
||||
-->
|
||||
${panel('dropdown_menu_panel')}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<div class="container">
|
||||
<h1>${page_title}</h1>
|
||||
<br />
|
||||
<div id="messages" tal:attributes="class request.is_xhr and 'ajax-replace' or None">
|
||||
<div tal:repeat="queue ('', 'info', 'success', 'warning', 'danger')"
|
||||
tal:omit-tag="">
|
||||
<div class="alert alert-${queue or 'info'}"
|
||||
tal:define="messages request.session.pop_flash(queue)"
|
||||
tal:condition="messages"
|
||||
tal:repeat="message messages">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
${structure:message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div metal:define-slot="content" />
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="well">
|
||||
<p>© 2017 - <a href="http://www.entreprise-dumas.com/" target="_blank">Entreprise Dumas</a></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div metal:define-slot="additional_scripts" />
|
||||
|
||||
</body>
|
||||
</html>
|
||||
22
caotek_mesavoirs/templates/layouts/pdf.pt
Normal file
22
caotek_mesavoirs/templates/layouts/pdf.pt
Normal file
@@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
||||
xmlns:tal="http://xml.zope.org/namespaces/tal"
|
||||
lang="fr">
|
||||
<head>
|
||||
<title>${page_title}</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<img src="http://www.caes.cnrs.fr/logo.jpg" class="caes-logo" alt="CAES du CNRS" title="CAES du CNRS" />
|
||||
|
||||
<div metal:define-slot="content" />
|
||||
|
||||
<div id="footer">
|
||||
<div class="well">
|
||||
Siège : <a href="http://www.caes.cnrs.fr">CAES du CNRS</a> - 2, Allée Georges Méliès - 94306 Vincennes CEDEX - France
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
57
caotek_mesavoirs/templates/login.pt
Normal file
57
caotek_mesavoirs/templates/login.pt
Normal file
@@ -0,0 +1,57 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div tal:condition="message" tal:content="message" class="alert alert-danger" />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-offset-4 col-md-4 well">
|
||||
|
||||
<form id="login-form" role="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">
|
||||
|
||||
<h3>Se connecter</h3>
|
||||
<input type="hidden" name="came_from" value="${came_from}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="text" name="login" value="${login}"
|
||||
placeholder="Identifiant"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'identifiant est obligatoire" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input class="form-control" type="password" name="password" value=""
|
||||
placeholder="Mot de passe"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le mot de passe est obligatoire">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted">Se connecter</button>
|
||||
|
||||
</div>
|
||||
<p class="help-block">
|
||||
<a href="/envoyer_mdp">Mot de passe oublié ?</a>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#login-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
18
caotek_mesavoirs/templates/panels/dropdown_menu_panel.pt
Normal file
18
caotek_mesavoirs/templates/panels/dropdown_menu_panel.pt
Normal file
@@ -0,0 +1,18 @@
|
||||
<li class="dropdown" tal:condition="logged_in">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">${logged_in_name}<b class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-header">
|
||||
${logged_in_email}<br />
|
||||
Identifiant : ${logged_in}<br />
|
||||
Fonction: ${logged_in_fonction}
|
||||
</li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="${request.application_url}/changer_mdp">Changer mon mot de passe</a></li>
|
||||
|
||||
<li class="divider"></li>
|
||||
<li><a href="${request.application_url}/logout">
|
||||
<span class="glyphicon glyphicon-off"></span> Se déconnecter</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
46
caotek_mesavoirs/templates/redefinir_mdp.pt
Normal file
46
caotek_mesavoirs/templates/redefinir_mdp.pt
Normal file
@@ -0,0 +1,46 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
|
||||
<div class="row">
|
||||
<form id="change-password-form" role="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 id="change-password" class="col-md-6 well">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="login">Mon identifiant</label>
|
||||
<input class="form-control" type="text" name="login"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Veuillez saisir votre identifiant" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="new_password1">Nouveau mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" id="new_password1" name="new_password1" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="new_password2">Confirmer le mot de passe</label>
|
||||
<input class="form-control" type="password" size="10" id="new_password2" name="new_password2"
|
||||
value="" />
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" type="submit" name="form.submitted" value="Changer le mot de passe">Envoyer</button>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- row -->
|
||||
|
||||
</div><!-- container -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#change-password-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</metal:block>
|
||||
11
caotek_mesavoirs/templates/security.py
Normal file
11
caotek_mesavoirs/templates/security.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from .models.default import get_member_by_id
|
||||
|
||||
def groupfinder(userid, request):
|
||||
member = get_member_by_id(request, userid)
|
||||
|
||||
if member:
|
||||
# Roles administrateur ?
|
||||
if member.access == 9:
|
||||
return ['group:administrators']
|
||||
else:
|
||||
return [] # it means that userid is logged in (it returns None if userid isn't logged in)
|
||||
110
caotek_mesavoirs/templates/user_edit.pt
Normal file
110
caotek_mesavoirs/templates/user_edit.pt
Normal file
@@ -0,0 +1,110 @@
|
||||
<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="user_edit-form" class="form-horizontal" action="${url}" method="post" tal:condition="individu"
|
||||
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-xs-2" for="cd_uti">Identifiant</label>
|
||||
<div class="col-xs-2">
|
||||
<input class="form-control" type="text" id="cd_uti" name="cd_uti" value="${individu.cd_uti}"
|
||||
placeholder="10 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="L'identifiant est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="3"
|
||||
data-fv-stringlength-message="3 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="intitule">Nom et prénom</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="intitule" name="nom" value="${individu.nom}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Le nom est obligatoire"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="25"
|
||||
data-fv-stringlength-message="25 caractères maximum" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-xs-2 control-label">Email</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" name="email"
|
||||
value="${individu.email}" placeholder="55 caractères maximum"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Accès</label>
|
||||
<div class="col-xs-2">
|
||||
<select class="form-control" id="access" name="access">
|
||||
<optgroup tal:repeat="item access">
|
||||
<option value="${item}" tal:attributes="selected individu.access==item[0] and 'selected' or None">${item}</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="agenda" value="individu.agenda" id="agenda"
|
||||
tal:attributes="checked individu.agenda <> 0 and 'checked' or None">Peut prendre des rendez-vous
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<label><input type="checkbox" name="actif" value="individu.actif" id="actif"
|
||||
tal:attributes="checked individu.actif <> 0 and 'checked' or None">La fiche est active
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="access">Dernière modif.</label>
|
||||
<div class="col-xs-7">
|
||||
<p class="form-control-static">${individu.modif_le.strftime('%d/%m/%Y - %H:%M')}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-7 checkbox">
|
||||
<p class="form-control-static">La fiche est active</p>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-group">
|
||||
<div class="col-xs-offset-2 col-xs-10">
|
||||
<div class="form-group">
|
||||
<a class="btn btn-default" href="${request.application_url}/users_list"><span class="glyphicon glyphicon-chevron-left"></span> Retour</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="individu.cd_uti > 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<br />
|
||||
<br />
|
||||
</div> <!-- row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#user_edit-form').formValidation();
|
||||
$('form input').on('keypress', function(e) {
|
||||
return e.which !== 13;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</metal:block>
|
||||
63
caotek_mesavoirs/templates/users_list.pt
Normal file
63
caotek_mesavoirs/templates/users_list.pt
Normal file
@@ -0,0 +1,63 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
|
||||
<p>
|
||||
<a href="${request.application_url}/" class="btn btn-default" role="button">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
<a href="${request.application_url}/user_edit/0" class="btn btn-success" role="button">
|
||||
<span class="glyphicon glyphicon-plus"></span> Nouveau utilisateur</a>
|
||||
</p>
|
||||
|
||||
<table id="users_list" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Login</th>
|
||||
<th>Nom, Prénom</th>
|
||||
<th>Email</th>
|
||||
<th>Agenda</th>
|
||||
<th>Rôle</th>
|
||||
<th>Dern cnx</th>
|
||||
<th>Etat</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');
|
||||
$('#users_list').DataTable({
|
||||
data: dataSet,
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
columnDefs: [
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/user_edit/' + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
{ "targets": 3,
|
||||
"render": function (data, type, full, meta) {
|
||||
if (data != 0) {
|
||||
return '<span class="glyphicon glyphicon-calendar"></span>';
|
||||
}
|
||||
else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</div><!-- content -->
|
||||
</metal:block>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user