planning.pt : cacher les weekends
This commit is contained in:
@@ -45,6 +45,7 @@ $(document).ready(function() {
|
||||
right: 'today'
|
||||
},
|
||||
defaultView: 'agendaWeek',
|
||||
weekends: false,
|
||||
height: 'auto',
|
||||
minTime: "07:00:00",
|
||||
maxTime: "21:00:00",
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<h4>Statut : ${dossier.STATUS}</h4>
|
||||
</div> <!-- row -->
|
||||
|
||||
<div class="panel-group" id="accordion">
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
</div><!-- row -->
|
||||
|
||||
<div class="row">
|
||||
<div tal:condition="chantiers">
|
||||
<table class="table table-bordered">
|
||||
<table id="dossiers_list" class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Numéro</th>
|
||||
<th>Date</th>
|
||||
@@ -65,30 +65,40 @@
|
||||
<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>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user