From 66b616e5e1ec797ca3a31d1efd1adeea00023e63 Mon Sep 17 00:00:00 2001 From: hplattner Date: Wed, 16 May 2018 12:04:14 +0200 Subject: [PATCH] add subviewmode feature --- browser/common.py | 8 ++++++-- browser/node_macros.pt | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/browser/common.py b/browser/common.py index 4bf58f6..abce04e 100755 --- a/browser/common.py +++ b/browser/common.py @@ -95,16 +95,20 @@ class NameField(schema.ASCIILine): class ViewMode(object): def __init__(self, name='view', title=None, url=None, active=False, - description=u''): + description=u'', subViewModes=Jeep()): self.name = name self.title = title self.url = url self.active = active self.description = description + self.subViewModes = subViewModes @property def cssClass(self): - return self.active and u'active' or u'inactive' + result = self.active and u'active' or u'inactive' + if self.subViewModes: + result += u' sub-modes' + return result class IAddForm(Interface): diff --git a/browser/node_macros.pt b/browser/node_macros.pt index 3432f53..57c5297 100644 --- a/browser/node_macros.pt +++ b/browser/node_macros.pt @@ -271,6 +271,17 @@ title mode/description" tal:content="mode/title" i18n:translate="" /> +