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'
},
defaultView: 'agendaWeek',
weekends: false,
height: 'auto',
minTime: "07:00:00",
maxTime: "21:00:00",

View File

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

View File

@@ -54,41 +54,51 @@
</div><!-- row -->
<div class="row">
<div tal:condition="chantiers">
<table class="table table-bordered">
<tr>
<th>Numéro</th>
<th>Date</th>
<th>Client</th>
<th>Chantier</th>
<th class="text-right">Montant</th>
<th>Sinistre</th>
<th class="text-center">Statut</th>
</tr>
<tr tal:repeat="detail chantiers">
<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>
</div>
<table id="dossiers_list" class="table table-bordered">
<thead>
<tr>
<th>Numéro</th>
<th>Date</th>
<th>Client</th>
<th>Chantier</th>
<th class="text-right">Montant</th>
<th>Sinistre</th>
<th class="text-center">Statut</th>
</tr>
</thead>
</table>
<br />
<br />
</div>
<script>
$(document).ready(function() {
<script type="text/javascript">
var dataSet = ${dt_data};
$(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();
$('form input').on('keypress', function(e) {
return e.which !== 13;
});
});
</script>
</div>

View File

@@ -313,7 +313,7 @@ def chantier_lookup(request):
message = u''
societes = ['PE','ME','PL','PO','CD']
societe = 'PE'
chantiers = []
liste=[]
name = u''
cb_tous = "non"
if 'form.submitted' in request.params:
@@ -328,12 +328,17 @@ def chantier_lookup(request):
chantiers = get_chantiers_byName(request, societe, name, False)
if len(chantiers) == 0:
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 {
'page_title': u"Rechercher un chantier",
'url': url,
'message': message,
'chantiers': chantiers,
'dt_data': json.dumps(liste),
'societes': societes,
'societe': societe,
'name': name,