diff --git a/browser/concept.py b/browser/concept.py
index 245e174..3ccfad5 100644
--- a/browser/concept.py
+++ b/browser/concept.py
@@ -176,6 +176,14 @@ class ConceptRelationView(BaseView):
def order(self):
return self.relation.order
+ def getActions(self, category='object', page=None, target=None):
+ t = IType(self.context)
+ actInfo = t.optionsDict.get('action.' + category, '')
+ actNames = [n.strip() for n in actInfo.split(',')]
+ if actNames:
+ return actions.get(category, actNames, view=self, page=page, target=target)
+ return []
+
class ConceptView(BaseView):
diff --git a/browser/concept_macros.pt b/browser/concept_macros.pt
index d44d40b..f223696 100644
--- a/browser/concept_macros.pt
+++ b/browser/concept_macros.pt
@@ -12,13 +12,16 @@
+
+
+
-
- Description
+
+ Description
@@ -80,6 +83,8 @@
Type |
Modification Date |
Author(s) |
+ Info |
Type
Type |
Type |
+
+
+ |
diff --git a/browser/node.py b/browser/node.py
index 20400f8..2eb669f 100644
--- a/browser/node.py
+++ b/browser/node.py
@@ -329,6 +329,7 @@ class NodeView(BaseView):
def targetDefaultView(self):
target = self.virtualTargetObject
if target is not None:
+ # zope.app.publisher.browser
name = zapi.getDefaultViewName(target, self.request)
return self.targetView(name)
return u''
@@ -396,7 +397,8 @@ class NodeView(BaseView):
target = self.virtualTarget
if target is not None:
actions.extend(target.getActions(category, page=self, target=target))
- actions.extend(self.view.getAdditionalActions(category, self, target))
+ if target != self.virtualTarget: # self view must be used directly for target
+ actions.extend(self.view.getAdditionalActions(category, self, target))
return actions
def getPortletActions(self, target=None):
diff --git a/browser/resource_macros.pt b/browser/resource_macros.pt
index fe1cdf2..5941385 100644
--- a/browser/resource_macros.pt
+++ b/browser/resource_macros.pt
@@ -109,5 +109,3 @@
-
-
diff --git a/organize/stateful/base.py b/organize/stateful/base.py
index 221cc9a..faafcda 100644
--- a/organize/stateful/base.py
+++ b/organize/stateful/base.py
@@ -31,7 +31,7 @@ from cybertools.meta.interfaces import IOptions
from cybertools.stateful.base import Stateful as BaseStateful
from cybertools.stateful.base import StatefulAdapter, IndexInfo
from cybertools.stateful.interfaces import IStatesDefinition, ITransitionEvent
-from loops.interfaces import ILoopsObject, IResource
+from loops.interfaces import ILoopsObject, IConcept, IResource
from loops import util
@@ -59,6 +59,16 @@ class SimplePublishable(StatefulLoopsObject):
statesDefinition = 'simple_publishing'
+class StatefulConceptIndexInfo(IndexInfo):
+
+ adapts(IConcept)
+
+ @property
+ def availableStatesDefinitions(self):
+ options = IOptions(self.context.getLoopsRoot())
+ return options('organize.stateful.concept', ())
+
+
class StatefulResourceIndexInfo(IndexInfo):
adapts(IResource)
diff --git a/organize/stateful/configure.zcml b/organize/stateful/configure.zcml
index 5f84a96..5bd50ab 100644
--- a/organize/stateful/configure.zcml
+++ b/organize/stateful/configure.zcml
@@ -12,6 +12,13 @@
+
+
+
+
+