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;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* work */
|
||||||
|
|
||||||
|
.work_event {
|
||||||
|
background-color: #f3f3ff;
|
||||||
|
}
|
||||||
|
|
||||||
/* lobo layout-specific classes */
|
/* lobo layout-specific classes */
|
||||||
|
|
||||||
.legend {
|
.legend {
|
||||||
|
|
|
@ -63,6 +63,10 @@ class WorkItemDetails(TrackDetails):
|
||||||
""" Render a single work item.
|
""" Render a single work item.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def workItemType(self):
|
||||||
|
return self.track.getWorkItemType()
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def description(self):
|
def description(self):
|
||||||
return self.track.description
|
return self.track.description
|
||||||
|
@ -81,11 +85,13 @@ class WorkItemDetails(TrackDetails):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def start(self):
|
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
|
@Lazy
|
||||||
def end(self):
|
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
|
@Lazy
|
||||||
def duration(self):
|
def duration(self):
|
||||||
|
@ -349,8 +355,7 @@ class CreateWorkItemForm(ObjectForm, BaseTrackView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def workItemType(self):
|
def workItemType(self):
|
||||||
name = self.track.workItemType
|
return self.track.getWorkItemType() or self.workItemTypes[0]
|
||||||
return (name and workItemTypes[name] or self.workItemTypes[0])
|
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def workItemTypes(self):
|
def workItemTypes(self):
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
<td class="headline"
|
<td class="headline"
|
||||||
tal:attributes="colspan python: len(work.columns)"
|
tal:attributes="colspan python: len(work.columns)"
|
||||||
tal:content="row/month">2009-01</td></tr>
|
tal:content="row/month">2009-01</td></tr>
|
||||||
<tr tal:attributes="class python:
|
<tr tal:define="wiType row/workItemType"
|
||||||
(repeat['row'].odd() and 'even' or 'odd')">
|
tal:attributes="class wiType/indicator|nothing">
|
||||||
<td class="nowrap center"
|
<td class="nowrap center"
|
||||||
tal:define="today python: row.isToday and ' today' or ''"
|
tal:define="today python: row.isToday and ' today' or ''"
|
||||||
tal:attributes="title row/weekDay;
|
tal:attributes="title row/weekDay;
|
||||||
|
|
Loading…
Add table
Reference in a new issue