[IMP]format for date

bzr revid: vme@tinyerp.com-20140314072056-kictunm2cx3jonvq
This commit is contained in:
Vidhin Mehta (OpenERP) 2014-03-14 12:50:56 +05:30
parent 9374159c00
commit cfa7e909c1
2 changed files with 7 additions and 3 deletions

View File

@ -197,7 +197,9 @@ class website_event(http.Controller):
skip_td[track] [i['location_id']] = skip_td[track] [i['location_id']] + skip_time
#Remove repeated element in list if any.
format_date = []
for skip in skip_td.keys():
format_date.append((datetime.datetime.strptime(skip, '%m-%d-%y')).strftime("%d %B, %Y"))
for loc in skip_td[skip].keys():
skip_td[skip][loc] = list(set(skip_td[skip][loc]))
values = {
@ -206,7 +208,8 @@ class website_event(http.Controller):
'room_list': rooms,
'days': unsort_tracks,
'skip_td': skip_td,
'talks':talks
'talks':talks,
'format_date':format_date
}
return request.website.render("website_event_track.agenda", values)

View File

@ -55,9 +55,10 @@
</div>
<div class="col-md-12" id="right_column">
<t t-foreach="days" t-as="day">
<t t-set="index_of_day" t-value="(days.keys()).index(day)" />
<h3 class="page-header mt0">
<t t-esc="day"/>
<small><t t-esc="(talks[(days.keys()).index(day)])[0]"/> talks</small>
<t t-esc="format_date[index_of_day]" />
<small><t t-esc="(talks[index_of_day])[0]"/> talks</small>
<div class="form-group col-md-3 pull-right">
<input type="text" class="form-control" placeholder="Filter..." id="start_search"/>
</div>