work item list: show description of task as link title; fix docttests: changed handling of field defaults
This commit is contained in:
parent
6db71366c6
commit
b70b522137
5 changed files with 24 additions and 14 deletions
|
@ -737,7 +737,9 @@ on data provided in this form:
|
||||||
|
|
||||||
>>> component.provideAdapter(NameChooser)
|
>>> component.provideAdapter(NameChooser)
|
||||||
>>> request = TestRequest(form={'title': u'Test Note',
|
>>> request = TestRequest(form={'title': u'Test Note',
|
||||||
... 'form.type': u'.loops/concepts/note'})
|
... 'form.type': u'.loops/concepts/note',
|
||||||
|
... 'contentType': u'text/restructured',
|
||||||
|
... 'linkUrl': u'http://'})
|
||||||
>>> view = NodeView(m112, request)
|
>>> view = NodeView(m112, request)
|
||||||
>>> cont = CreateObject(view, request)
|
>>> cont = CreateObject(view, request)
|
||||||
>>> cont.update()
|
>>> cont.update()
|
||||||
|
@ -802,7 +804,7 @@ The new technique uses the ``fields`` and ``data`` attributes...
|
||||||
linkText textline False None
|
linkText textline False None
|
||||||
|
|
||||||
>>> view.data
|
>>> view.data
|
||||||
{'linkUrl': u'http://', 'contentType': 'text/restructured', 'data': u'',
|
{'linkUrl': u'http://', 'contentType': u'text/restructured', 'data': u'',
|
||||||
'linkText': u'', 'title': u'Test Note'}
|
'linkText': u'', 'title': u'Test Note'}
|
||||||
|
|
||||||
The object is changed via a FormController adapter created for
|
The object is changed via a FormController adapter created for
|
||||||
|
|
8
external/README.txt
vendored
8
external/README.txt
vendored
|
@ -136,7 +136,7 @@ Writing object information to the external storage
|
||||||
concept(u'myquery', u'My Query', u'query', options=u'option1\noption2',
|
concept(u'myquery', u'My Query', u'query', options=u'option1\noption2',
|
||||||
viewName=u'mystuff.html'...)...
|
viewName=u'mystuff.html'...)...
|
||||||
child(u'projects', u'customer', u'standard')...
|
child(u'projects', u'customer', u'standard')...
|
||||||
resource(u'doc04.txt', u'Document 4', u'textdocument', contentType='text/restructured')...
|
resource(u'doc04.txt', u'Document 4', u'textdocument', contentType=u'')...
|
||||||
resourceRelation(u'myquery', u'doc04.txt', u'standard')
|
resourceRelation(u'myquery', u'doc04.txt', u'standard')
|
||||||
node('home', u'Home', '', u'menu')
|
node('home', u'Home', '', u'menu')
|
||||||
node('myquery', u'My Query', 'home', u'page', target=u'concepts/myquery')...
|
node('myquery', u'My Query', 'home', u'page', target=u'concepts/myquery')...
|
||||||
|
@ -194,9 +194,9 @@ Extracting selected parts of the concept map
|
||||||
concept(u'cust1', u'Customer 1', u'customer')
|
concept(u'cust1', u'Customer 1', u'customer')
|
||||||
concept(u'cust2', u'Customer 2', u'customer')
|
concept(u'cust2', u'Customer 2', u'customer')
|
||||||
concept(u'cust3', u'Customer 3', u'customer')
|
concept(u'cust3', u'Customer 3', u'customer')
|
||||||
resource(u'd001.txt', u'Doc 001', u'textdocument', contentType='text/restructured')
|
resource(u'd001.txt', u'Doc 001', u'textdocument', contentType=u'')
|
||||||
resource(u'd003.txt', u'Doc 003', u'textdocument', contentType='text/restructured')
|
resource(u'd003.txt', u'Doc 003', u'textdocument', contentType=u'')
|
||||||
resource(u'd002.txt', u'Doc 002', u'textdocument', contentType='text/restructured')
|
resource(u'd002.txt', u'Doc 002', u'textdocument', contentType=u'')
|
||||||
resourceRelation(u'cust1', u'd001.txt', u'standard')
|
resourceRelation(u'cust1', u'd001.txt', u'standard')
|
||||||
resourceRelation(u'cust1', u'd003.txt', u'standard')
|
resourceRelation(u'cust1', u'd003.txt', u'standard')
|
||||||
resourceRelation(u'cust3', u'd002.txt', u'standard')
|
resourceRelation(u'cust3', u'd002.txt', u'standard')
|
||||||
|
|
|
@ -177,11 +177,15 @@ Recent changes
|
||||||
|
|
||||||
>>> data[0].timeStamp
|
>>> data[0].timeStamp
|
||||||
u'... ...:...'
|
u'... ...:...'
|
||||||
|
|
||||||
>>> data[0].objectData
|
>>> data[0].objectData
|
||||||
{'version': '', 'canAccess': True, 'title': 'Change Doc 001', 'url': '',
|
{'version': '', 'description': u'', 'title': 'Change Doc 001', 'url': '',
|
||||||
'object': <loops.resource.Resource object at ...>, 'type': u'Text'}
|
'object': <loops.resource.Resource object at ...>, 'type': u'Text',
|
||||||
|
'canAccess': True}
|
||||||
|
|
||||||
>>> data[0].user
|
>>> data[0].user
|
||||||
{'url': '', 'object': <loops.concept.Concept ...>, 'title': u'john'}
|
{'url': '', 'object': <loops.concept.Concept ...>, 'title': u'john'}
|
||||||
|
|
||||||
>>> data[0].action
|
>>> data[0].action
|
||||||
'modify'
|
'modify'
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014 Helmut Merz helmutm@cy55.de
|
# Copyright (c) 2015 Helmut Merz helmutm@cy55.de
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -265,20 +265,23 @@ class TrackDetails(BaseView):
|
||||||
def objectData(self):
|
def objectData(self):
|
||||||
obj = self.object
|
obj = self.object
|
||||||
if obj is None:
|
if obj is None:
|
||||||
return dict(object=None, title='-', type='-', url='',
|
return dict(object=None, title='-', description='',
|
||||||
|
type='-', url='',
|
||||||
version=None, canAccess=False)
|
version=None, canAccess=False)
|
||||||
node = self.view.nodeView
|
node = self.view.nodeView
|
||||||
url = node is not None and node.getUrlForTarget(obj) or ''
|
url = node is not None and node.getUrlForTarget(obj) or ''
|
||||||
view = self.view.getViewForObject(obj)
|
view = self.view.getViewForObject(obj)
|
||||||
if view is None:
|
if view is None:
|
||||||
title = obj.title
|
title = obj.title
|
||||||
|
desc = obj.description
|
||||||
else:
|
else:
|
||||||
title = view.listingTitle
|
title = view.listingTitle
|
||||||
|
desc = view.description
|
||||||
versionable = IVersionable(self.object, None)
|
versionable = IVersionable(self.object, None)
|
||||||
version = ((versionable is not None and
|
version = ((versionable is not None and
|
||||||
not (versionable.notVersioned) and
|
not (versionable.notVersioned) and
|
||||||
versionable.versionId) or '')
|
versionable.versionId) or '')
|
||||||
return dict(object=obj, title=title,
|
return dict(object=obj, title=title, description=desc,
|
||||||
type=self.longTypeTitle, url=url, version=version,
|
type=self.longTypeTitle, url=url, version=version,
|
||||||
canAccess=canAccessObject(obj))
|
canAccess=canAccessObject(obj))
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<tr tal:define="wiType row/workItemType"
|
<tr tal:define="wiType row/workItemType"
|
||||||
tal:attributes="class wiType/indicator|nothing">
|
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;
|
||||||
class string:nowrap center$today"
|
class string:nowrap center$today"
|
||||||
i18n:attributes="title"
|
i18n:attributes="title"
|
||||||
|
@ -35,9 +35,10 @@
|
||||||
<td class="nowrap center" tal:content="row/start">17:30</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/end">20:00</td>
|
||||||
<td class="nowrap center" tal:content="row/duration">2:30</td>
|
<td class="nowrap center" tal:content="row/duration">2:30</td>
|
||||||
<td tal:condition="python: 'Task' in work.columns">
|
<td tal:condition="python:'Task' in work.columns">
|
||||||
<a tal:define="data row/objectData"
|
<a tal:define="data row/objectData"
|
||||||
tal:attributes="href data/url"
|
tal:attributes="href data/url;
|
||||||
|
title data/description"
|
||||||
tal:content="data/title">Task</a></td>
|
tal:content="data/title">Task</a></td>
|
||||||
<td tal:condition="python: 'User' in work.columns">
|
<td tal:condition="python: 'User' in work.columns">
|
||||||
<a tal:attributes="href row/user/url"
|
<a tal:attributes="href row/user/url"
|
||||||
|
|
Loading…
Add table
Reference in a new issue