diff --git a/browser/concept.py b/browser/concept.py index 3e003d1..05dce0a 100644 --- a/browser/concept.py +++ b/browser/concept.py @@ -30,6 +30,8 @@ from zope.app.form.browser.interfaces import ITerms from zope.cachedescriptors.property import Lazy from zope.dottedname.resolve import resolve from zope.event import notify +from zope.formlib.form import EditForm, FormFields +from zope.formlib.namedtemplate import NamedTemplate from zope.interface import implements from zope.publisher.interfaces import BadRequest from zope.publisher.interfaces.browser import IBrowserRequest @@ -44,6 +46,12 @@ from loops.browser.common import BaseView, LoopsTerms from loops import util +class ConceptEditForm(EditForm): + + form_fields = FormFields(IConcept) + template = NamedTemplate('pageform') + + class ConceptView(BaseView): def children(self): diff --git a/browser/configure.zcml b/browser/configure.zcml index bb3c7bb..796a28f 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -109,7 +109,7 @@ permission="zope.ManageContent"> @@ -122,13 +122,26 @@ - --> + + + + @@ -319,7 +332,6 @@ content_factory="loops.view.Node" schema="loops.interfaces.INode" fields="title description nodeType body" - class="loops.browser.node.ConfigureView" permission="zope.ManageContent"> diff --git a/browser/node.py b/browser/node.py index 3c21bf8..1943811 100644 --- a/browser/node.py +++ b/browser/node.py @@ -118,7 +118,7 @@ class NodeView(object): if target is None or IDocument.providedBy(target): return 'textbody' if IConcept.providedBy(target): # TODO... - return 'filebody' + return 'conceptbody' if IMediaAsset.providedBy(target) and target.contentType.startswith('image/'): return 'imagebody' return 'filebody' diff --git a/browser/node_macros.pt b/browser/node_macros.pt index 783a1e0..c963483 100644 --- a/browser/node_macros.pt +++ b/browser/node_macros.pt @@ -12,10 +12,10 @@ - +
@@ -34,6 +34,21 @@ + + +
+ The body +
+
+
+ +
+ + + + +
+ +
+ +
+ + + +
+ +

Edit + Concept +

+ + + +
+ +
+ Form status summary +
+ +
    +
  • + Error Type +
  • +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + +
Extra top
+ + + + +
+
+
+ + error +
+
Extra bottom
+ +
+
+
+ + + +
+ +
+ + +