--- a/web/views/actions.py Mon Apr 06 14:27:52 2009 +0200
+++ b/web/views/actions.py Mon Apr 06 14:52:34 2009 +0200
@@ -314,12 +314,17 @@
return self.build_url('euser/%s'%login, vid='epropertiesform')
# schema view action
+def schema_view(cls, req, rset, row=None, col=None, view=None,
+ **kwargs):
+ if view is None or not view.id == 'schema':
+ return 0
+ return 1
class DownloadOWLSchemaAction(Action):
category = 'mainactions'
id = 'download_as_owl'
title = _('download schema as owl')
- __selectors__ = none_rset,
+ __selectors__ = none_rset, schema_view
def url(self):
return self.build_url('view', vid='owl')
--- a/web/views/boxes.py Mon Apr 06 14:27:52 2009 +0200
+++ b/web/views/boxes.py Mon Apr 06 14:52:34 2009 +0200
@@ -31,7 +31,7 @@
title = _('actions')
order = 2
- def call(self, **kwargs):
+ def call(self, view=None, **kwargs):
_ = self.req._
title = _(self.title)
if self.rset:
@@ -42,7 +42,7 @@
title = u'%s - %s' % (title, etypelabel.lower())
box = BoxWidget(title, self.id, _class="greyBoxFrame")
# build list of actions
- actions = self.vreg.possible_actions(self.req, self.rset)
+ actions = self.vreg.possible_actions(self.req, self.rset, view=view)
add_menu = BoxMenu(_('add')) # 'addrelated' category
other_menu = BoxMenu(_('more actions')) # 'moreactions' category
searchstate = self.req.search_state[0]