[Mpuls-commits] r4583 - in base/trunk: . mpulsweb/templates mpulsweb/templates/casemanagement mpulsweb/templates/statements mpulsweb/tests/functional
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Feb 7 10:29:18 CET 2011
Author: torsten
Date: 2011-02-07 10:29:17 +0100 (Mon, 07 Feb 2011)
New Revision: 4583
Added:
base/trunk/mpulsweb/templates/statements/
base/trunk/mpulsweb/templates/statements/list.mako
base/trunk/mpulsweb/templates/statements/statements.mako
base/trunk/mpulsweb/tests/functional/test_statement.py
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/templates/casemanagement/main.mako
Log:
Issue1775: Include new statement section
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2011-02-07 09:25:43 UTC (rev 4582)
+++ base/trunk/ChangeLog 2011-02-07 09:29:17 UTC (rev 4583)
@@ -1,3 +1,18 @@
+2011-02-07 Torsten Irlaender <torsten at intevation.de>
+
+ * mpulsweb/controllers/statement.py (StatementController): New
+ Statement controller. Very basic implementation yet. Should provide
+ much of the functionallity of the privacy controller in the future, so
+ privacy-controller will only handle accepting and declining
+ "Einwilligungserklärung".
+ * mpulsweb/templates/statements/list.mako: List of available
+ statements. Default: No statements.
+ * mpulsweb/templates/statements/statements.mako: This file is included
+ in the main.mako an will include links the different statements and
+ the link to show all available statements.
+ * mpulsweb/templates/casemanagement/main.mako: Include new statement
+ section.
+
2011-02-04 Torsten Irlaender <torsten at intevation.de>
* mpulsweb/model/user.py: Internationalisation of rolenames
Modified: base/trunk/mpulsweb/templates/casemanagement/main.mako
===================================================================
--- base/trunk/mpulsweb/templates/casemanagement/main.mako 2011-02-07 09:25:43 UTC (rev 4582)
+++ base/trunk/mpulsweb/templates/casemanagement/main.mako 2011-02-07 09:29:17 UTC (rev 4583)
@@ -180,6 +180,7 @@
onclick="return checkModification();"
target="_blank">${_('cm_menu_link_print')}</a>
</li>
+ <%include file="/statements/statements.mako" />
% endif
</ul>
</li>
Added: base/trunk/mpulsweb/templates/statements/list.mako
===================================================================
--- base/trunk/mpulsweb/templates/statements/list.mako 2011-02-07 09:25:43 UTC (rev 4582)
+++ base/trunk/mpulsweb/templates/statements/list.mako 2011-02-07 09:29:17 UTC (rev 4583)
@@ -0,0 +1,12 @@
+## -*- coding: utf-8 -*-
+<%inherit file="/casemanagement/main.mako" />
+<%! import mpulsweb.lib.helper.filters as F %>
+<%def name="buildNavipath()">
+ ${parent.buildNavipath()}
+ <li><a href="${h.url_for(controller='/case', action='select', id=session.get('case').id, confirmed=1)}">${_('cm_np_select')}</a></li>
+ <li><a href="${h.url_for(controller='/statements', action='index')}">${_('statement_list_statement')}</a></li>
+</%def>
+<h1>${_('Avaliable statements')}</h1>
+<div class="widget container">
+ <p>${_('No statements available')}</p>
+</div>
Added: base/trunk/mpulsweb/templates/statements/statements.mako
===================================================================
--- base/trunk/mpulsweb/templates/statements/statements.mako 2011-02-07 09:25:43 UTC (rev 4582)
+++ base/trunk/mpulsweb/templates/statements/statements.mako 2011-02-07 09:29:17 UTC (rev 4583)
@@ -0,0 +1,6 @@
+## -*- coding: utf-8 -*-
+<li>
+ <a href="${h.url_for(controller='statement', action='index')}"
+ onclick="return checkModification();"> ${_('statement_list_statement')}
+ </a>
+</li>
Added: base/trunk/mpulsweb/tests/functional/test_statement.py
===================================================================
--- base/trunk/mpulsweb/tests/functional/test_statement.py 2011-02-07 09:25:43 UTC (rev 4582)
+++ base/trunk/mpulsweb/tests/functional/test_statement.py 2011-02-07 09:29:17 UTC (rev 4583)
@@ -0,0 +1,7 @@
+from mpulsweb.tests import *
+
+class TestStatementController(TestController):
+
+ def test_index(self):
+ response = self.app.get(url(controller='statement', action='index'))
+ # Test response...
More information about the Mpuls-commits
mailing list