[IMP]add talks

bzr revid: vme@tinyerp.com-20140313133224-jmzacgnqlxee32y5
This commit is contained in:
Vidhin Mehta (OpenERP) 2014-03-13 19:02:24 +05:30
parent 03ca05f638
commit 0628fca1fc
2 changed files with 10 additions and 4 deletions

View File

@ -116,6 +116,12 @@ class website_event(http.Controller):
''',(event.id,))
fetch_tracks = request.cr.fetchall()
request.cr.execute('''
select count(*), date_trunc('day',date) from event_track where event_id = %s group by date_trunc('day',date) order by date_trunc('day',date)
''',(event.id,))
talks = request.cr.fetchall()
unsort_tracks = {}
room_list = []
new_schedule = {}
@ -193,13 +199,13 @@ class website_event(http.Controller):
for skip in skip_td.keys():
for loc in skip_td[skip].keys():
skip_td[skip][loc] = list(set(skip_td[skip][loc]))
values = {
'event': event,
'main_object': event,
'room_list': rooms,
'days': unsort_tracks,
'skip_td': skip_td
'skip_td': skip_td,
'talks':talks
}
return request.website.render("website_event_track.agenda", values)

View File

@ -59,7 +59,7 @@
<t t-foreach="days" t-as="day">
<h3 class="page-header mt0">
<t t-esc="day"/>
<small>23 talks</small>
<small><t t-esc="(talks[(days.keys()).index(day)])[0]"/> talks</small>
<div class="form-group col-md-3 pull-right">
<input type="text" class="form-control" placeholder="Search..." id="start_search"/>
</div>