From f9d023f10b3c4872f95573367b27406dbc3aacdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 14 Aug 2011 17:38:05 +0200 Subject: [PATCH] added sessions config and configurable paths for persons & parlementary events --- tabellio/config/controlpanel.pt | 82 +++++++++++++++++++++++++++++++-- tabellio/config/controlpanel.py | 9 ++++ tabellio/config/interfaces.py | 12 +++++ 3 files changed, 98 insertions(+), 5 deletions(-) diff --git a/tabellio/config/controlpanel.pt b/tabellio/config/controlpanel.pt index c0fd8c2..01cf1a5 100644 --- a/tabellio/config/controlpanel.pt +++ b/tabellio/config/controlpanel.pt @@ -67,6 +67,22 @@ /> +
+ + +
+ +
+
+
+ + +
+ +
+
-
Other settings
-
+
Sessions settings
+
-

- ... -

+
+ +
+ + +
+ +
+ +
+ + + +
+ + + +
diff --git a/tabellio/config/controlpanel.py b/tabellio/config/controlpanel.py index 47db1cd..3eed073 100644 --- a/tabellio/config/controlpanel.py +++ b/tabellio/config/controlpanel.py @@ -44,17 +44,26 @@ class TabellioControlpanel(BrowserView): submitted = True deputies_path = form.get('deputiesPath') + persons_path = form.get('personsPath') ministries_path = form.get('ministriesPath') documents_path = form.get('documentsPath') dossiers_path = form.get('dossiersPath') polgroups_path = form.get('polgroupsPath') + parlevents_path = form.get('parleventsPath') if not self.errors: self.settings.deputiesPath = deputies_path + self.settings.personsPath = persons_path self.settings.ministriesPath = ministries_path self.settings.documentsPath = documents_path self.settings.dossiersPath = dossiers_path self.settings.polgroupsPath = polgroups_path + self.settings.parleventsPath = parlevents_path + + if 'form.button.SessionsSave' in form: + self.authorize() + submitted = True + self.settings.sessions = form.get('sessions') if submitted and not self.errors: self._setup() diff --git a/tabellio/config/interfaces.py b/tabellio/config/interfaces.py index 9fc8dc8..cdd798c 100644 --- a/tabellio/config/interfaces.py +++ b/tabellio/config/interfaces.py @@ -23,7 +23,19 @@ class ITabellioSettings(Interface): title=_('ministries_path', 'Ministries Path'), required=False) + parleventsPath = schema.TextLine( + title=_('parlevents_path', 'Parlementary Events Path'), + required=False) + + personsPath = schema.TextLine( + title=_('persons_path', 'Persons Path'), + required=False) + polgroupsPath = schema.TextLine( title=_('polgroups_path', 'Political Groups Path'), required=False) + sessions = schema.Text( + title=_('sessions', 'Sessions'), + required=False) +