mark today by bold text, show weekdays in title attributes of day fields
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3192 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
2ad0570c04
commit
396cc946d6
2 changed files with 15 additions and 1 deletions
|
@ -93,6 +93,16 @@ class WorkItemDetails(TrackDetails):
|
|||
currentWorkItems = list(self.view.workItems.query(runId=self.track.runId))
|
||||
return self.track == currentWorkItems[-1]
|
||||
|
||||
@Lazy
|
||||
def isToday(self):
|
||||
return date.fromtimestamp(self.track.timeStamp) == date.today()
|
||||
|
||||
@Lazy
|
||||
def weekDay(self):
|
||||
value = date.fromtimestamp(self.track.timeStamp)
|
||||
if value is not None:
|
||||
return weekDays[value.weekday()].title()
|
||||
|
||||
def actions(self):
|
||||
info = DialogAction(self.view,
|
||||
description=_(u'Information about this work item.'),
|
||||
|
|
|
@ -26,7 +26,11 @@
|
|||
tal:content="row/month">2009-01</td></tr>
|
||||
<tr tal:attributes="class python:
|
||||
repeat['row'].odd() and 'even' or 'odd'">
|
||||
<td class="nowrap center" tal:content="row/day">2007-03-30</td>
|
||||
<td class="nowrap center"
|
||||
tal:attributes="title row/weekDay"
|
||||
i18n:attributes="title">
|
||||
<b tal:omit-tag="not:row/isToday"
|
||||
tal:content="row/day">2007-03-30</b></td>
|
||||
<td class="nowrap center" tal:content="row/start">17:30</td>
|
||||
<td class="nowrap center" tal:content="row/end">20:00</td>
|
||||
<td class="nowrap center" tal:content="row/duration">2:30</td>
|
||||
|
|
Loading…
Add table
Reference in a new issue