Repository :
http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
---------------------------------------------------------------
commit 5dbf970d67c1295c3452c079f001e9bdb218dbea
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Nov 9 10:56:08 2012 +0100
Add display of half-hours
Meetings are allowed to go to the half-hour but in the view we
only display full hour
---------------------------------------------------------------
fedocal/fedocallib/__init__.py | 7 ++++---
fedocal/templates/agenda.html | 4 ++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fedocal/fedocallib/__init__.py b/fedocal/fedocallib/__init__.py
index c05ee3a..ed25e0e 100644
--- a/fedocal/fedocallib/__init__.py
+++ b/fedocal/fedocallib/__init__.py
@@ -228,9 +228,10 @@ def get_meetings(session, calendar, year=None, month=None, day=None,
meetings = {}
fmt = '%Hh%M'
for hour in HOURS[:-1]:
- key = '%sh00' % (hour)
- # pylint: disable=W0612
- meetings[key] = [None for cnt2 in range(0, 7)]
+ for key in ['%sh00', '%sh30']:
+ key = key % (hour)
+ # pylint: disable=W0612
+ meetings[key] = [None for cnt2 in range(0, 7)]
for meeting in week.meetings:
start = meeting.meeting_time_start.hour
stop = meeting.meeting_time_stop.hour
diff --git a/fedocal/templates/agenda.html b/fedocal/templates/agenda.html
index 42d5b50..257c909 100644
--- a/fedocal/templates/agenda.html
+++ b/fedocal/templates/agenda.html
@@ -40,7 +40,11 @@
</tr>
{% for time_entry in meetings |sort %}
<tr>
+ {% if time_entry.endswith('00') %}
<th class="time">{{ time_entry }}</th>
+ {% else %}
+ <th></th>
+ {% endif %}
{% for meeting_list in meetings[time_entry] %}
{% if loop.index == day_index %}
<td class="today">