anchor list link to current day
This commit is contained in:
parent
1d19470dcc
commit
1943e00571
|
@ -143,6 +143,9 @@ class View(grok.View, utils.MonthlyView):
|
|||
events.sort(lambda x,y: cmp(x.start, y.start))
|
||||
return events
|
||||
|
||||
def todayanchor(self):
|
||||
return 'd%d-%d-%d' % datetime.datetime.today().timetuple()[:3]
|
||||
|
||||
class List(View):
|
||||
grok.context(IAgendaFolder)
|
||||
grok.require('zope2.View')
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<h2 tal:condition="view/has_view_switcher" tal:content="context/title" />
|
||||
<div tal:condition="view/has_view_switcher" id="agenda-view-switcher">
|
||||
<span>Calendrier</span> | <a tal:attributes="href string:list?navyear=${view/year}&navmonth=${view/month}">Liste</a>
|
||||
<span>Calendrier</span> | <a tal:attributes="href string:list?navyear=${view/year}&navmonth=${view/month}#${view/todayanchor}">Liste</a>
|
||||
</div>
|
||||
|
||||
<table class="ploneCalendar"
|
||||
|
|
Reference in New Issue