indicator attribute depending on work item type: background color for event
This commit is contained in:
parent
953e150e0f
commit
96850f110c
3 changed files with 17 additions and 6 deletions
|
@ -510,6 +510,12 @@ img.notselected {
|
|||
text-align: right;
|
||||
}
|
||||
|
||||
/* work */
|
||||
|
||||
.work_event {
|
||||
background-color: #f3f3ff;
|
||||
}
|
||||
|
||||
/* lobo layout-specific classes */
|
||||
|
||||
.legend {
|
||||
|
|
|
@ -63,6 +63,10 @@ class WorkItemDetails(TrackDetails):
|
|||
""" Render a single work item.
|
||||
"""
|
||||
|
||||
@Lazy
|
||||
def workItemType(self):
|
||||
return self.track.getWorkItemType()
|
||||
|
||||
@Lazy
|
||||
def description(self):
|
||||
return self.track.description
|
||||
|
@ -81,11 +85,13 @@ class WorkItemDetails(TrackDetails):
|
|||
|
||||
@Lazy
|
||||
def start(self):
|
||||
return self.formatTimeStamp(self.track.start, 'time')
|
||||
result = self.formatTimeStamp(self.track.start, 'time')
|
||||
return result != '00:00' and result or ''
|
||||
|
||||
@Lazy
|
||||
def end(self):
|
||||
return self.formatTimeStamp(self.track.end, 'time')
|
||||
result = self.formatTimeStamp(self.track.end, 'time')
|
||||
return result != '00:00' and result or ''
|
||||
|
||||
@Lazy
|
||||
def duration(self):
|
||||
|
@ -349,8 +355,7 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
|||
|
||||
@Lazy
|
||||
def workItemType(self):
|
||||
name = self.track.workItemType
|
||||
return (name and workItemTypes[name] or self.workItemTypes[0])
|
||||
return self.track.getWorkItemType() or self.workItemTypes[0]
|
||||
|
||||
@Lazy
|
||||
def workItemTypes(self):
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
<td class="headline"
|
||||
tal:attributes="colspan python: len(work.columns)"
|
||||
tal:content="row/month">2009-01</td></tr>
|
||||
<tr tal:attributes="class python:
|
||||
(repeat['row'].odd() and 'even' or 'odd')">
|
||||
<tr tal:define="wiType row/workItemType"
|
||||
tal:attributes="class wiType/indicator|nothing">
|
||||
<td class="nowrap center"
|
||||
tal:define="today python: row.isToday and ' today' or ''"
|
||||
tal:attributes="title row/weekDay;
|
||||
|
|
Loading…
Add table
Reference in a new issue