Project

General

Profile

« Previous | Next » 

Revision 6b76bceb

Added by Benjamin Dauvergne over 13 years ago

fix disponibility display

View differences:

calebasse/agenda/templates/agenda/index.html
<td id="dispos">
Disponibilités
<table>
{% for start_time, quaters in disponnibility.items %}
<tr class="hour-mark">
<td rowspan="4">{{ start_time }}:00</td>
{% for quater in quaters|slice:":1" %}
{% for value in quater %}
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
{% for start_time, quaters in disponibility.items %}
<tr class="hour-mark">
<td rowspan="4">{{ start_time }}:00</td>
{% for quater in quaters|slice:":1" %}
{% for value in quater %}
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
{% endfor %}
{% endfor %}
</tr>
{% endfor %}
</tr>
{% for quater in quaters|slice:"1:4" %}
<tr>
{% for value in quater %}
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
{% endfor %}
{% for value in quater %}
<td class="worker-{{ value.id }} agenda {{ value.dispo }}" style="display: none; "></td>
{% endfor %}
</tr>
{% endfor %}
{% endfor %}
calebasse/agenda/views.py
context['workers_agenda'].append({'worker': worker,
'agenda': Occurrence.objects.daily_occurrences(context['date'], [worker])})
context['disponnibility'] = Occurrence.objects.daily_disponiblity(context['date'], workers)
context['disponibility'] = Occurrence.objects.daily_disponiblity(context['date'], workers)
return context
def new_appointment(request):

Also available in: Unified diff