make viewing of tracks more flexible: show links to metadata targets if appropriate
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3761 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
20ec0fe61b
commit
4f6223177e
1 changed files with 10 additions and 0 deletions
|
@ -85,6 +85,16 @@ class BaseTrackView(TrackView):
|
|||
if user is not None and not isinstance(user, basestring):
|
||||
return '%s/@@introspector.html' % absoluteURL(user, self.request)
|
||||
|
||||
def getMetadataTarget(self, key):
|
||||
value = self.metadata.get(key)
|
||||
if value.isdigit():
|
||||
obj = util.getObjectForUid(value)
|
||||
if obj is not None:
|
||||
url = ('%s/@@SelectedManagementView.html' %
|
||||
absoluteURL(obj, self.request))
|
||||
return dict(title=obj.title, url=url, obj=obj)
|
||||
return dict(title=value, url=None, obj=None)
|
||||
|
||||
|
||||
class ChangeView(BaseTrackView):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue