add a "today" class to events in list view
This commit is contained in:
parent
737a2e7c0e
commit
0fe18d887e
|
@ -102,6 +102,11 @@ class Event(BaseEvent):
|
|||
def klass(self):
|
||||
return 'generic-event'
|
||||
|
||||
def todayclass(self):
|
||||
if self.start.timetuple()[:3] == datetime.datetime.today().timetuple()[:3]:
|
||||
return 'today'
|
||||
return ''
|
||||
|
||||
class EventBaseView:
|
||||
def next_event_url(self, portal_type=None):
|
||||
# do not go more than 100 days in the future
|
||||
|
|
|
@ -205,7 +205,7 @@ jq('#tabellio-agenda tbody a').click(
|
|||
<ul id="events-ul-list" tal:condition="view/as_list">
|
||||
<li tal:repeat="event view/getMonthEventsWithRepetition"
|
||||
tal:attributes="id string:event-${event/id};
|
||||
class event/klass">
|
||||
class string:${event/klass} ${event/todayclass}">
|
||||
<div tal:attributes="id string:d${event/start/year}-${event/start/month}-${event/start/day}">
|
||||
<p class="date"><span tal:content="event/longdatetime"/>
|
||||
<br/><span tal:condition="event/place" class="place" tal:content="event/place"></span>
|
||||
|
|
Reference in New Issue