[Mpuls-commits] r5567 - in base/trunk/mpulsweb: controllers templates templates/usersettings
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Nov 10 21:56:05 CET 2011
Author: bh
Date: 2011-11-10 21:56:03 +0100 (Thu, 10 Nov 2011)
New Revision: 5567
Modified:
base/trunk/mpulsweb/controllers/usersettings.py
base/trunk/mpulsweb/templates/main.mako
base/trunk/mpulsweb/templates/usersettings/change_password.mako
base/trunk/mpulsweb/templates/usersettings/edit_standin.mako
Log:
Generate URLs for /usersettings/showSettings without ids.
They're not needed anymore.
Implements the mpulsweb part of the showSettings URL generation part of
mpuls/issue2367
Modified: base/trunk/mpulsweb/controllers/usersettings.py
===================================================================
--- base/trunk/mpulsweb/controllers/usersettings.py 2011-11-10 20:26:40 UTC (rev 5566)
+++ base/trunk/mpulsweb/controllers/usersettings.py 2011-11-10 20:56:03 UTC (rev 5567)
@@ -91,7 +91,7 @@
c.dialog_text = _(u"You password was successfully changed") + \
" " + _("Please click OK to continue.")
c.url_ok = h.url_for(controller="usersettings",
- action="showSettings", id=user.id)
+ action="showSettings")
else:
return "Password could not be changed"
except formencode.Invalid, error:
@@ -126,8 +126,7 @@
c.dialog_text = _(u"You password was successfully changed") + \
" " + _("Please click OK to continue.")
c.url_ok = h.url_for(controller="usersettings",
- action="showSettings",
- id=session_user.id)
+ action="showSettings")
else:
return "Password could not be changed"
except formencode.Invalid, error:
@@ -166,9 +165,7 @@
return render('usersettings/edit_standin.mako')
c.dialog_title = _('Standin saved!')
c.dialog_text = _('Your standin is saved. Please click on ok to continue.')
- uid = c.form_result.get('uid')
- c.url_ok = h.url_for(controller='/usersettings', action='showSettings',
- id=uid)
+ c.url_ok = h.url_for(controller='/usersettings', action='showSettings')
return render ('/usersettings/dialogs/success_edit_standin.mako')
# vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8:
Modified: base/trunk/mpulsweb/templates/main.mako
===================================================================
--- base/trunk/mpulsweb/templates/main.mako 2011-11-10 20:26:40 UTC (rev 5566)
+++ base/trunk/mpulsweb/templates/main.mako 2011-11-10 20:56:03 UTC (rev 5567)
@@ -3,8 +3,7 @@
<%def name="buildStatusBar()">
<div id="statusbar">
${_('Login as')}:
- <a href="${h.url_for(controller='/usersettings', action='showSettings',
- id=h.getUserId())}"
+ <a href="${h.url_for(controller='/usersettings', action='showSettings')}"
title="${_('My Account')}"
onclick="return checkModification();">
% if h.getLogin() != 'adm':
@@ -26,8 +25,7 @@
</li>
% if g.mpuls_config.is_enabled('module', 'administration'):
<li>
- <a href="${h.url_for(controller='/usersettings', action='showSettings',
- id=h.getUserId())}"
+ <a href="${h.url_for(controller='/usersettings', action='showSettings')}"
onclick="return checkModification();">
${_('My Account')}
</a>
Modified: base/trunk/mpulsweb/templates/usersettings/change_password.mako
===================================================================
--- base/trunk/mpulsweb/templates/usersettings/change_password.mako 2011-11-10 20:26:40 UTC (rev 5566)
+++ base/trunk/mpulsweb/templates/usersettings/change_password.mako 2011-11-10 20:56:03 UTC (rev 5567)
@@ -1,8 +1,7 @@
## -*- coding: utf-8 -*-
<%inherit file="../main.mako" />
<%def name="buildNavipath()">
- <li><a href="${h.url_for(controller='/usersettings', action='showSettings',
- id=h.getUserId())}"
+ <li><a href="${h.url_for(controller='/usersettings', action='showSettings')}"
onclick="return checkModification();">${_('My Account')}</a></li>
<li><a href="#" onclick="return checkModification();">${_('Change password')}
</a></li>
@@ -19,7 +18,7 @@
<div id="modusfield">
<div class="actions">
<ul>
- <li><a href="${h.url_for(controller='usersettings', action='showSettings', id=h.getUserId())}"> ${_('Back to: My Account')}</a></li>
+ <li><a href="${h.url_for(controller='usersettings', action='showSettings')}"> ${_('Back to: My Account')}</a></li>
</ul>
</div>
</div>
Modified: base/trunk/mpulsweb/templates/usersettings/edit_standin.mako
===================================================================
--- base/trunk/mpulsweb/templates/usersettings/edit_standin.mako 2011-11-10 20:26:40 UTC (rev 5566)
+++ base/trunk/mpulsweb/templates/usersettings/edit_standin.mako 2011-11-10 20:56:03 UTC (rev 5567)
@@ -8,7 +8,7 @@
<div id="modusfield">
<div class="actions">
<ul>
- <li><a href="${h.url_for(controller='/usersettings', action='showSettings', id=h.getUserId())}"> ${_('Back to: My Account')}</a></li>
+ <li><a href="${h.url_for(controller='/usersettings', action='showSettings')}"> ${_('Back to: My Account')}</a></li>
</ul>
</div>
</div>
More information about the Mpuls-commits
mailing list