[Mpuls-commits] r360 - in wasko/trunk: . waskaweb/controllers waskaweb/templates/appointments waskaweb/templates/casemanagement
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Mar 11 11:56:50 CET 2009
Author: torsten
Date: 2009-03-11 11:56:48 +0100 (Wed, 11 Mar 2009)
New Revision: 360
Modified:
wasko/trunk/ChangeLog.txt
wasko/trunk/waskaweb/controllers/case_overview.py
wasko/trunk/waskaweb/templates/appointments/remindlist_body.mako
wasko/trunk/waskaweb/templates/appointments/show.mako
wasko/trunk/waskaweb/templates/casemanagement/caselist.mako
Log:
Fixed remaining broken hasRole calls in templates and controllers
Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt 2009-03-11 10:44:50 UTC (rev 359)
+++ wasko/trunk/ChangeLog.txt 2009-03-11 10:56:48 UTC (rev 360)
@@ -19,6 +19,14 @@
Caseappointmnts are now shown on the blackboard again. Furter the
creation of reminders was fixed.
+ Fixed remaining error of hasRole-call
+
+ * waskaweb/controllers/case_overview.py,
+ waskaweb/templates/appointments/show.mako,
+ waskaweb/templates/appointments/remindlist_body.mako,
+ waskaweb/templates/casemanagement/caselist.mako: hasRole expects a
+ list as parameter and not a string.
+
2009-03-10 Sascha L. Teichmann <teichmann at intevation.de>
* waskaweb/lib/xmlhelper.py: Replaced usage of datetime.strptime()
Modified: wasko/trunk/waskaweb/controllers/case_overview.py
===================================================================
--- wasko/trunk/waskaweb/controllers/case_overview.py 2009-03-11 10:44:50 UTC (rev 359)
+++ wasko/trunk/waskaweb/controllers/case_overview.py 2009-03-11 10:56:48 UTC (rev 360)
@@ -139,7 +139,7 @@
if options.get('show_anonymized') == '1':
search_options.append('state:%s' % 5)
# For cm users show cases which are marked for anon too
- if h.hasRole('cm_ka'):
+ if h.hasRole(['cm_ka']):
search_options.append('state:%s' % 4)
if options.get('gender', '-2') != '-2':
search_options.append('gender:%s' % options.get('gender'))
@@ -263,7 +263,7 @@
c.count_all = len([x for x in c.cases.getDatasets()])
c.count_own = len([x for x in c.cases.getDatasets() if x.getEditor().id == user.id])
c.count_standin = c.count_all - c.count_own
- if h.hasRole('cm_ka'):
+ if h.hasRole(['cm_ka']):
c.count_anon = len([x for x in c.cases.getDatasets() if x.getState().getState() in (4,5)])
else:
c.count_anon = len([x for x in c.cases.getDatasets() if x.getState().getState() == 5])
Modified: wasko/trunk/waskaweb/templates/appointments/remindlist_body.mako
===================================================================
--- wasko/trunk/waskaweb/templates/appointments/remindlist_body.mako 2009-03-11 10:44:50 UTC (rev 359)
+++ wasko/trunk/waskaweb/templates/appointments/remindlist_body.mako 2009-03-11 10:56:48 UTC (rev 360)
@@ -12,7 +12,7 @@
<td class="title">${appointment.title | F.NA, h}</td>
<td class="action">
${self.showAppointmentActions(appointment)}
- % if h.hasRole('cm_ka'):
+ % if h.hasRole(['cm_ka']):
${self.showKeepActiveActions(appointment)}
% endif
</td>
Modified: wasko/trunk/waskaweb/templates/appointments/show.mako
===================================================================
--- wasko/trunk/waskaweb/templates/appointments/show.mako 2009-03-11 10:44:50 UTC (rev 359)
+++ wasko/trunk/waskaweb/templates/appointments/show.mako 2009-03-11 10:56:48 UTC (rev 360)
@@ -11,7 +11,7 @@
<div id="modusfield">
<div class="actions">
<ul>
- % if h.hasRole('admin_ka'):
+ % if h.hasRole(['admin_ka']):
<li>
<a href="${h.url_for(controller='/appointment', action='edit', id=c.appointment.id)}">${_('sm_menu_link_appointment_edit')}</a>
</li>
Modified: wasko/trunk/waskaweb/templates/casemanagement/caselist.mako
===================================================================
--- wasko/trunk/waskaweb/templates/casemanagement/caselist.mako 2009-03-11 10:44:50 UTC (rev 359)
+++ wasko/trunk/waskaweb/templates/casemanagement/caselist.mako 2009-03-11 10:56:48 UTC (rev 360)
@@ -36,7 +36,7 @@
<td><input type="checkbox" name="case_id" value="${case.id}"></td>
## If the case is marked for anonymisation do not show the
## first and lastname and the customer number.
- % if case.getState().getState() == 4 and h.hasRole('cm_ka'):
+ % if case.getState().getState() == 4 and h.hasRole(['cm_ka']):
<td>${h.getCaseShort('', 15) | F.NA, h}</td>
<td>${h.getCaseShort('', 15) | F.NA, h}</td>
<td>${h.getCaseShort('', 15) | F.NA, h}</td>
@@ -95,7 +95,7 @@
<td class="table_row_h"><input type="checkbox" name="case_id" value="${case.id}"></td>
## If the case is marked for anonymisation do not show the
## first and lastname and the customer number.
- % if case.getState().getState() == 4 and h.hasRole('cm_ka'):
+ % if case.getState().getState() == 4 and h.hasRole(['cm_ka']):
<td class="table_row_h">${h.getCaseShort('', 15) | F.NA, h}</td>
<td class="table_row_h">${h.getCaseShort('', 15) | F.NA, h}</td>
<td class="table_row_h">${h.getCaseShort('', 15) | F.NA, h}</td>
More information about the Mpuls-commits
mailing list