From 460520be2071e64d018cf294d25f7a48c3aa2554 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Fri, 27 Apr 2012 13:04:58 +0200 Subject: [PATCH] page structure via standard parts working --- compound/book/browser.py | 25 +++++++++++++++++++++++-- compound/book/configure.zcml | 32 ++++++++++++++++++++++++++++++++ compound/book/view_macros.pt | 3 ++- 3 files changed, 57 insertions(+), 3 deletions(-) diff --git a/compound/book/browser.py b/compound/book/browser.py index a293839..584e478 100644 --- a/compound/book/browser.py +++ b/compound/book/browser.py @@ -39,8 +39,8 @@ book_template = ViewPageTemplateFile('view_macros.pt') class PageLayout(standard.Layout): def getParts(self): - parts = ['headline', 'keyquestions', 'maintext', - 'story', 'usecase', 'quote'] + parts = ['headline', 'keyquestions', 'quote', 'maintext', + 'story', 'usecase'] return self.getPartViews(parts) @@ -69,3 +69,24 @@ class Headline(PagePart, standard.Header2): class MainText(PagePart, standard.BasePart): partName = 'maintext' + + +class KeyQuestions(PagePart, standard.BasePart): + + partName = 'keyquestions' + + +class Story(PagePart, standard.BasePart): + + partName = 'story' + + +class UseCase(PagePart, standard.BasePart): + + partName = 'usecase' + + +class Quote(PagePart, standard.BasePart): + + partName = 'quote' + gridPattern = ['span-2 last'] diff --git a/compound/book/configure.zcml b/compound/book/configure.zcml index fe63f85..f1837cd 100644 --- a/compound/book/configure.zcml +++ b/compound/book/configure.zcml @@ -35,6 +35,14 @@ factory="loops.compound.book.browser.Headline" permission="zope.View" /> + + + + + + + + diff --git a/compound/book/view_macros.pt b/compound/book/view_macros.pt index 7e3a6f3..e330154 100644 --- a/compound/book/view_macros.pt +++ b/compound/book/view_macros.pt @@ -11,7 +11,8 @@
- +

+