planning.pt : cacher les weekends

This commit is contained in:
2018-09-25 15:55:16 +02:00
parent 5197325fe4
commit 1b3702225b
4 changed files with 46 additions and 29 deletions

View File

@@ -45,6 +45,7 @@ $(document).ready(function() {
right: 'today' right: 'today'
}, },
defaultView: 'agendaWeek', defaultView: 'agendaWeek',
weekends: false,
height: 'auto', height: 'auto',
minTime: "07:00:00", minTime: "07:00:00",
maxTime: "21:00:00", maxTime: "21:00:00",

View File

@@ -80,6 +80,7 @@
</tr> </tr>
</table> </table>
</div> </div>
<h4>Statut : ${dossier.STATUS}</h4>
</div> <!-- row --> </div> <!-- row -->
<div class="panel-group" id="accordion"> <div class="panel-group" id="accordion">

View File

@@ -54,8 +54,8 @@
</div><!-- row --> </div><!-- row -->
<div class="row"> <div class="row">
<div tal:condition="chantiers"> <table id="dossiers_list" class="table table-bordered">
<table class="table table-bordered"> <thead>
<tr> <tr>
<th>Numéro</th> <th>Numéro</th>
<th>Date</th> <th>Date</th>
@@ -65,30 +65,40 @@
<th>Sinistre</th> <th>Sinistre</th>
<th class="text-center">Statut</th> <th class="text-center">Statut</th>
</tr> </tr>
<tr tal:repeat="detail chantiers"> </thead>
<td>
<a href="dossier_view/${societe}-${detail.numero}">${societe}-${detail.numero}<a>
</td>
<td>${detail.date.strftime('%d-%m/-%Y')}</td>
<td>${detail.nomcli}</td>
<td>${detail.chantier}</td>
<td class="text-right">${layout.to_euro(detail.montant)}</td>
<td>${detail.nosin}</td>
<td class="text-center">${detail.status}</td>
</tr>
</table> </table>
</div>
<br /> <br />
<br /> <br />
</div> </div>
<script> <script type="text/javascript">
var dataSet = ${dt_data};
$(document).ready(function() { $(document).ready(function() {
$.fn.dataTable.moment('DD-MM-YYYY');
$('#dossiers_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="/dossier_view/' + data + '">' + data + '</a>';
},
},
]
});
});
$('#site-search-form').formValidation(); $('#site-search-form').formValidation();
$('form input').on('keypress', function(e) { $('form input').on('keypress', function(e) {
return e.which !== 13; return e.which !== 13;
}); });
});
</script> </script>
</div> </div>

View File

@@ -313,7 +313,7 @@ def chantier_lookup(request):
message = u'' message = u''
societes = ['PE','ME','PL','PO','CD'] societes = ['PE','ME','PL','PO','CD']
societe = 'PE' societe = 'PE'
chantiers = [] liste=[]
name = u'' name = u''
cb_tous = "non" cb_tous = "non"
if 'form.submitted' in request.params: if 'form.submitted' in request.params:
@@ -328,12 +328,17 @@ def chantier_lookup(request):
chantiers = get_chantiers_byName(request, societe, name, False) chantiers = get_chantiers_byName(request, societe, name, False)
if len(chantiers) == 0: if len(chantiers) == 0:
message = u"Chantier non trouvé : %s" % name message = u"Chantier non trouvé : %s" % name
# construire la liste
for item in chantiers:
d = ('%s-%s' % (societe, item.numero),item.date.strftime('%d-%m-%Y'), item.nomcli, item.chantier, to_euro(item.montant),
item.nosin, item.status)
liste.append(d)
return { return {
'page_title': u"Rechercher un chantier", 'page_title': u"Rechercher un chantier",
'url': url, 'url': url,
'message': message, 'message': message,
'chantiers': chantiers, 'dt_data': json.dumps(liste),
'societes': societes, 'societes': societes,
'societe': societe, 'societe': societe,
'name': name, 'name': name,