only show owl action when displaying the schema view
authorsylvain.thenault@logilab.fr
Mon, 06 Apr 2009 14:43:43 +0200
changeset 1248 4a8c5f8ddff5
parent 1247 3332c92d950c
child 1249 905d76e38433
child 1255 9d25fd39f9b5
only show owl action when displaying the schema view
web/views/actions.py
--- a/web/views/actions.py	Mon Apr 06 14:43:23 2009 +0200
+++ b/web/views/actions.py	Mon Apr 06 14:43:43 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')