program: merge cell horizontally
This commit is contained in:
parent
8d561c83db
commit
da45ebae45
|
@ -74,8 +74,9 @@ class Program:
|
||||||
for ts, rooms in self.rows.items():
|
for ts, rooms in self.rows.items():
|
||||||
content = ''
|
content = ''
|
||||||
for room, events in rooms.items():
|
for room, events in rooms.items():
|
||||||
|
colspan = 1
|
||||||
for i in range(self.cols[room]):
|
for i in range(self.cols[room]):
|
||||||
options = ''
|
options = ' colspan="%d"' % colspan
|
||||||
cellcontent = ''
|
cellcontent = ''
|
||||||
if i < len(events) and events[i]:
|
if i < len(events) and events[i]:
|
||||||
event = events[i]
|
event = events[i]
|
||||||
|
@ -83,6 +84,10 @@ class Program:
|
||||||
continue
|
continue
|
||||||
options = ' rowspan="%d" bgcolor="%s"' % (event.rowcount, event.talk.event.color)
|
options = ' rowspan="%d" bgcolor="%s"' % (event.rowcount, event.talk.event.color)
|
||||||
cellcontent = str(event.talk) + ' — ' + event.talk.get_speakers_str()
|
cellcontent = str(event.talk) + ' — ' + event.talk.get_speakers_str()
|
||||||
|
elif (i+1 > len(events) or not events[i+1]) and i+1 < self.cols[room]:
|
||||||
|
colspan += 1
|
||||||
|
continue
|
||||||
|
colspan = 1
|
||||||
content += cell % {'options': options, 'content': escape(cellcontent)}
|
content += cell % {'options': options, 'content': escape(cellcontent)}
|
||||||
style, timeslot = self._timeslot(ts)
|
style, timeslot = self._timeslot(ts)
|
||||||
output.append(row % {
|
output.append(row % {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user