diff --git a/browser/concept.py b/browser/concept.py index 3c0112c..f105db9 100644 --- a/browser/concept.py +++ b/browser/concept.py @@ -54,7 +54,13 @@ class ConceptView(BaseView): for token in tokens: concept = self.loopsRoot.loopsTraverse(token) if action == 'assign': - self.context.assignChild(removeSecurityProxy(concept)) + assignAs = self.request.get('assignAs', 'child') + if assignAs == 'child': + self.context.assignChild(removeSecurityProxy(concept)) + elif assignAs == 'parent': + self.context.assignParent(removeSecurityProxy(concept)) + else: + raise(BadRequest, 'Illegal assignAs parameter: %s.' % assignAs) elif action == 'remove': qualifier = self.request.get('qualifier', None) if qualifier == 'parents': diff --git a/browser/concept_related.pt b/browser/concept_related.pt index 8569e9f..f8c87e0 100644 --- a/browser/concept_related.pt +++ b/browser/concept_related.pt @@ -26,14 +26,30 @@ + + + + - + + + + + + as + + object(s) + + diff --git a/browser/configure.zcml b/browser/configure.zcml index b2bba13..9401a95 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -96,15 +96,6 @@ view="AddLoopsConcept.html" /> - - + + -
- - -
- + Parent Concepts + + + + @@ -31,7 +32,9 @@ @@ -41,10 +44,57 @@ value="Remove Assignment(s)" i18n:attributes="value" tal:attributes="value buttonText" /> + - + + +
+ Create Object +
+
+ Name + + Title + + Type + +
+
+ + and assign as + +
+ +
+
+ + + +
+
+ Search Term + +
+
+ +
+ +
+ +
Title + tal:attributes="href string:${item/url}/@@SelectedManagementView.html"> + Title +