tested login.pt
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
<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>
|
||||
@@ -1,59 +0,0 @@
|
||||
<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>
|
||||
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
<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>
|
||||
@@ -1,22 +0,0 @@
|
||||
<!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>
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
<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" />
|
||||
placeholder="Email"
|
||||
data-fv-emailaddress="true"
|
||||
data-fv-emailaddress-message="L'adresse email n'est pas valide" />
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -11,15 +11,12 @@
|
||||
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" />
|
||||
<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">
|
||||
@@ -86,7 +83,7 @@
|
||||
<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">
|
||||
tal:condition="individu.email > 0">
|
||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,13 +11,11 @@
|
||||
<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>
|
||||
<th>Expire le</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
@@ -35,22 +33,12 @@
|
||||
pageLength: 50,
|
||||
bLengthChange: false,
|
||||
columnDefs: [
|
||||
{ "targets": 0,
|
||||
{ "targets": 1,
|
||||
"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 '';
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-header">
|
||||
${logged_in_email}<br />
|
||||
Identifiant : ${logged_in}<br />
|
||||
${logged_in}<br />
|
||||
Fonction: ${logged_in_fonction}
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user