provide 'Edit Concept Map' link

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1715 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2007-05-05 08:25:20 +00:00
parent b1f9088cae
commit 192b231cf2
2 changed files with 20 additions and 2 deletions

View file

@ -139,6 +139,10 @@ class BaseView(GenericView):
def url(self):
return absoluteURL(self.context, self.request)
@Lazy
def rootUrl(self):
return absoluteURL(self.loopsRoot, self.request)
@Lazy
def view(self):
return self
@ -331,6 +335,12 @@ class BaseView(GenericView):
# this may depend on system and user settings...
return True
@Lazy
def conceptMapEditorUrl(self):
return (checkPermission('loops.xmlrpc.ManageConcepts', self.context)
and self.rootUrl + '/swf.html'
or None)
inlineEditable = False
def inlineEdit(self, id):

View file

@ -209,15 +209,23 @@
<metal:actions define-macro="actions">
<tal:actions define="dummy view/registerDojo;
url view/virtualTargetUrl">
<div tal:define="cmUrl view/conceptMapEditorUrl"
tal:condition="url">
<a href="#" target="_blank" i18n:translate="" i18n:attributes="title"
title="Open concept map editor in new window"
tal:attributes="href cmUrl">
Edit Concept Map
</a>
</div>
<div>
<a href="#"
<a href="#" i18n:translate=""
onclick="objectDialog('create', 'create_object.html'); return false;"
tal:attributes="onclick string:objectDialog('create', '$url/create_object.html');; return false;;">
Create Resource...
</a>
</div>
<div tal:condition="view/hasEditableTarget">
<a href="#"
<a href="#" i18n:translate=""
onclick="objectDialog('edit', 'edit_object.html'); return false;"
tal:define="version request/version|nothing;
versionPar python: version and '?version=' + version or ''"