ajout module Default et suivi_edit.pt
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
<div class="container">
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<form method="POST" id="frm">
|
||||
<div class="col-md-2">
|
||||
<a class="btn btn-default" role="button" href="/">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span> Retour</a>
|
||||
</div>
|
||||
<div class="alert alert-warning" tal:condition="message" tal:content="message" />
|
||||
|
||||
<div class="row">
|
||||
<form method="POST" id="frm" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-md-4">
|
||||
<select class="form-control" id="agenda" name="agenda" onChange="$('#frm').submit()">
|
||||
<div tal:repeat="item agendas">
|
||||
@@ -16,28 +14,36 @@
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
<label class="control-label col-md-2">Dossier en cours :</label>
|
||||
<div class="col-md-6">
|
||||
<p>
|
||||
<span class="label" style="background-color:LightYellow; color:black;">RDV Peinture</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">RDV Menuiserie</span>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">RDV Plomberie</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">RDV Plomberie</span>
|
||||
</p>
|
||||
<div class="input-group">
|
||||
<input class="form-control" type="text" name="dossier" value="${mem_nodossier} - ${mem_nomdossier}" readonly />
|
||||
<div class="input-group-btn">
|
||||
<a href="${url_select}" class="btn btn-primary">
|
||||
<span class="glyphicon glyphicon-search"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
<br />
|
||||
<p align="center">
|
||||
<span class="label" style="background-color:LightYellow; color:black;">RDV Peinture</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">RDV Menuiserie</span>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">RDV Plomberie</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">RDV Plomberie</span>
|
||||
</p>
|
||||
<br />
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
left: 'agendaDay agendaWeek month listMonth',
|
||||
@@ -50,6 +56,9 @@ $(document).ready(function() {
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
events:${fullcalendar_events},
|
||||
eventRender: function(event, element){
|
||||
element.find('.fc-title').append("<br/>" + event.description);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,38 +1,29 @@
|
||||
<metal:block use-macro="main_template">
|
||||
<div metal:fill-slot="content">
|
||||
<div class="container">
|
||||
<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" style="background-color:LightYellow; color:black;">RDV Peinture</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">RDV Menuiserie</span>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">RDV Plomberie</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">RDV Plomberie</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<div id="calendar"></div>
|
||||
</div>
|
||||
<br />
|
||||
<p align="center">
|
||||
<span class="label" style="background-color:LightYellow; color:black;">RDV Peinture</span>
|
||||
<span class="label" style="background-color:Gold; color:black;">RDV Menuiserie</span>
|
||||
<span class="label" style="background-color:LightGreen; color:black;">RDV Plomberie</span>
|
||||
<span class="label" style="background-color:LightBlue; color:black;">RDV Plomberie</span>
|
||||
</p>
|
||||
<br />
|
||||
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
schedulerLicenseKey: 'GPL-My-Project-Is-Open-Source',
|
||||
defaultView: 'timelineDay',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
maxTime: "20:00:00",
|
||||
height: 'auto',
|
||||
locale: 'fr',
|
||||
header: {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
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>
|
||||
<label class="control-label col-xs-2" for="date_rdv_picker">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')}"
|
||||
<input class="form-control" type="text" name="rdv_debut" value="${rdv.rdv_debut.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"
|
||||
@@ -26,9 +26,9 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="comment">Commentaire 1</label>
|
||||
<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}"
|
||||
<input class="form-control" type="text" id=".COMMENT" name="COMMENT" value="${rdv.COMMENT}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-notempty="true"
|
||||
data-fv-notempty-message="Un commentaire est obligatoire"
|
||||
@@ -38,9 +38,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2" for="commentvi">Commentaire 2</label>
|
||||
<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}"
|
||||
<input class="form-control" type="text" id="COMMENTVI" name="COMMENTVI" value="${rdv.COMMENTVI}"
|
||||
placeholder="30 caractères maximum"
|
||||
data-fv-stringlength="true"
|
||||
data-fv-stringlength-max="30"
|
||||
@@ -48,16 +48,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-2">Dern. modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${rdv.DATEMAJ.strftime('%d-%m-%Y %H:%M')} par ${rdv.USERMAJ}</p>
|
||||
</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)}">
|
||||
<a class="btn btn-default" href="/agenda/${rdv.rdv_debut.strftime('%Y-%m-%d')}">
|
||||
<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"
|
||||
<button class="btn btn-danger" type="submit" name="form.deleted"
|
||||
tal:condition="python: nolig != '0'">
|
||||
<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>
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var dataSet = ${dt_data};
|
||||
var goto_url = '${goto_url}';
|
||||
|
||||
$(document).ready(function() {
|
||||
$.fn.dataTable.moment('DD-MM-YYYY');
|
||||
@@ -87,7 +88,7 @@
|
||||
{ "targets": 0,
|
||||
"render": function (data, type, full, meta) {
|
||||
// ajouter un link vers le formulaire
|
||||
return '<a href="/dossier_view/' + data + '">' + data + '</a>';
|
||||
return '<a href="' + goto_url + data + '">' + data + '</a>';
|
||||
},
|
||||
},
|
||||
]
|
||||
@@ -92,19 +92,23 @@
|
||||
<span class="glyphicon glyphicon-arrow-down"></span> SUIVI</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="panel-suivi" class="panel-collapse collapse">
|
||||
<div id="panel-suivi" class="panel-collapse">
|
||||
<div class="panel-body">
|
||||
<p><a class="btn btn-success" role="button" href="${request.route_url('rdv_edit', nodossier=nodossier, nolig='0')}">
|
||||
<p><a class="btn btn-success" role="button" href="${request.route_url('suivi_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>Action</th>
|
||||
<th>Rendez-vous</th>
|
||||
<th>Réf. lettre</th>
|
||||
<th class="text-center">Par</th>
|
||||
</tr>
|
||||
<tr tal:repeat="detail details">
|
||||
<td>${detail.DATE.strftime('%d/%m/%Y')}</td>
|
||||
<td>
|
||||
<a href="${request.route_url('suivi_edit', nodossier=nodossier, nolig=detail.NOLIG)}">
|
||||
${detail.DATE.strftime('%d-%m-%Y')}</a>
|
||||
</td>
|
||||
<td tal:condition="detail.COMMENT.startswith('!!')" class="text-danger">
|
||||
<b>${detail.COMMENT} ${detail.COMMENTVI}</b>
|
||||
</td>
|
||||
@@ -114,18 +118,17 @@
|
||||
<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>
|
||||
avec ${detail.LISTE}
|
||||
${detail.rdv_debut.strftime('%d-%m-%Y %H:%M')} avec ${detail.LISTE}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">${detail.REF_LET}</td>
|
||||
<td class="text-center">${detail.USERMAJ}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- PANEL SUIVI -->
|
||||
<!-- PANEL DOCUMENTS -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
@@ -5,12 +5,12 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<a href="${request.application_url}/agenda">
|
||||
<a href="${request.application_url}/agenda/today">
|
||||
<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">
|
||||
<a href="${request.application_url}/planning/today">
|
||||
<span class="glyphicon glyphicon-calendar logo-small"></span><br />
|
||||
<h4>PLANNING</h4></a>
|
||||
</div>
|
||||
82
mondumas/templates/default/suivi_edit.pt
Normal file
82
mondumas/templates/default/suivi_edit.pt
Normal file
@@ -0,0 +1,82 @@
|
||||
<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-xs-2" for="comment">Commentaire 1</label>
|
||||
<div class="col-xs-5">
|
||||
<input class="form-control" type="text" id="COMMENT" name="COMMENT" value="${suivi.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="${suivi.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">
|
||||
<label class="control-label col-xs-2">Dern. modif le</label>
|
||||
<div class="col-xs-9">
|
||||
<p class="form-control-static">${suivi.DATEMAJ.strftime('%d-%m-%Y %H:%M')} par ${suivi.USERMAJ}</p>
|
||||
</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,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