diff --git a/browser/action.py b/browser/action.py index cf10efb..4330f6e 100644 --- a/browser/action.py +++ b/browser/action.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2008 Helmut Merz helmutm@cy55.de +# Copyright (c) 2009 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -33,9 +33,14 @@ from loops.util import _ class TargetAction(Action): - @Lazy + page = None + qualifier = typeToken = None + fixedType = False + viewTitle = '' + addParams = {} + + #@Lazy def url(self): - #return self.getActionUrl(self.page.getUrlForTarget(self.view)) if self.page is None: # how could this happen? baseUrl = self.view.virtualTargetUrl else: @@ -43,7 +48,17 @@ class TargetAction(Action): baseUrl = self.page.getUrlForTarget(self.target) else: baseUrl = self.page.virtualTargetUrl - return self.getActionUrl(baseUrl) + paramString = '' + urlParams = {} + if self.typeToken: + urlParams['form.type'] = self.typeToken + if self.fixedType: + urlParams['fixed_type'] = 'yes' + urlParams.update(self.addParams) + if urlParams: + paramString = '?' + urlencode(urlParams) + url = self.getActionUrl(baseUrl) + return url + paramString class DialogAction(Action): diff --git a/browser/form.py b/browser/form.py index e6c1265..8849868 100644 --- a/browser/form.py +++ b/browser/form.py @@ -74,6 +74,7 @@ class ObjectForm(NodeView): formState = FormState() # dummy, don't update! isInnerHtml = True isPopup = False + showAssignments = True def __init__(self, context, request): super(ObjectForm, self).__init__(context, request) @@ -375,6 +376,19 @@ class CreateConceptForm(CreateObjectForm): return () +class CreateConceptPage(CreateConceptForm): + + isInnerHtml = False + + def setupController(self): + super(CreateConceptPage, self).setupController() + self.registerDojoFormAll() + + @Lazy + def nextUrl(self): + return self.nodeView.getUrlForTarget(self.context) + + class InnerForm(CreateObjectForm): @property diff --git a/browser/form_macros.pt b/browser/form_macros.pt index dc84537..32697d9 100644 --- a/browser/form_macros.pt +++ b/browser/form_macros.pt @@ -46,12 +46,7 @@
-Assign Parent Concepts | -||||
Assign Parent Concepts | +||||
Type: | @@ -153,42 +150,46 @@||||
+ | ++ + | ++ | +
+
+
+
+
+ |
+ + + | +
- | - - | -- | -
-
-
-
-
- |
- - - | -