provide description appropriately formatted for title attribute and info field
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3236 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
2fd20f6508
commit
02901cb83f
2 changed files with 11 additions and 2 deletions
|
@ -35,6 +35,7 @@ from cybertools.ajax import innerHtml
|
|||
from cybertools.browser.action import actions
|
||||
from cybertools.organize.interfaces import IWorkItems
|
||||
from cybertools.tracking.btree import getTimeStamp
|
||||
from cybertools.util import format
|
||||
from loops.browser.action import DialogAction
|
||||
from loops.browser.concept import ConceptView
|
||||
from loops.browser.form import ObjectForm, EditObject
|
||||
|
@ -61,6 +62,14 @@ class WorkItemDetails(TrackDetails):
|
|||
def description(self):
|
||||
return self.track.description
|
||||
|
||||
@Lazy
|
||||
def descriptionPlain(self):
|
||||
return format.nl2pipe(self.description)
|
||||
|
||||
@Lazy
|
||||
def descriptionFormatted(self):
|
||||
return format.nl2br(self.description)
|
||||
|
||||
@Lazy
|
||||
def start(self):
|
||||
return self.formatTimeStamp(self.track.start, 'time')
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<a tal:attributes="href row/user/url"
|
||||
tal:content="row/user/title">John</a></td>
|
||||
<td tal:content="row/track/title"
|
||||
tal:attributes="title row/track/description">Title</td>
|
||||
tal:attributes="title row/descriptionPlain">Title</td>
|
||||
<td class="nowrap">
|
||||
<tal:actions repeat="action row/actions">
|
||||
<metal:action use-macro="action/macro" />
|
||||
|
@ -150,7 +150,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="top"><span i18n:translate="">Description</span>:</td>
|
||||
<td tal:content="item/description"></td>
|
||||
<td tal:content="structure item/descriptionFormatted"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span i18n:translate="">Party</span>:</td>
|
||||
|
|
Loading…
Add table
Reference in a new issue