[Checkins] SVN: grokapps/gbepastebin/src/gbepastebin/browser provide a gentler logout
Michael Haubenwallner
michael at d2m.at
Mon Sep 22 02:43:06 EDT 2008
Log message for revision 91306:
provide a gentler logout
Changed:
U grokapps/gbepastebin/src/gbepastebin/browser.py
U grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt
U grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt
U grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt
-=-
Modified: grokapps/gbepastebin/src/gbepastebin/browser.py
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser.py 2008-09-22 02:47:59 UTC (rev 91305)
+++ grokapps/gbepastebin/src/gbepastebin/browser.py 2008-09-22 06:43:04 UTC (rev 91306)
@@ -4,6 +4,7 @@
from pygments import util
from zope.interface import Interface
from zope.app.security.interfaces import IUnauthenticatedPrincipal
+from zope.app.security.interfaces import IAuthentication
from zope.component import getUtility
import z3c.flashmessage.interfaces
import grok
@@ -105,6 +106,10 @@
grok.context(PasteBase)
grok.name('index')
+ def application_url(self):
+ site=grok.getSite()
+ return self.url(site)
+
def format(self):
context = self.context
language=''
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt 2008-09-22 02:47:59 UTC (rev 91305)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/entry.pt 2008-09-22 06:43:04 UTC (rev 91306)
@@ -20,7 +20,7 @@
<a href="..">Main Page</a>
<tal:block tal:condition="view/isManager"> /
<a tal:attributes="href string:@@delete">Delete</a> /
- <a tal:attributes="href string:/@@logout.html">Log Out</a>
+ <a tal:attributes="href string:../@@logout.html?nextURL=${view/application_url}">Log Out</a>
</tal:block>
</div>
</metal:block>
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt 2008-09-22 02:47:59 UTC (rev 91305)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/index.pt 2008-09-22 06:43:04 UTC (rev 91306)
@@ -46,7 +46,7 @@
<metal:block fill-slot="userinfo">
<div class="userinfo" tal:condition="view/isManager">
<a tal:attributes="href string:@@manage">Manage</a> /
- <a tal:attributes="href string:/@@logout.html">Log Out</a>
+ <a tal:attributes="href string:@@logout.html?nextURL=${view/application_url}">Log Out</a>
<br />
</div>
</metal:block>
Modified: grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt
===================================================================
--- grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt 2008-09-22 02:47:59 UTC (rev 91305)
+++ grokapps/gbepastebin/src/gbepastebin/browser_templates/manage.pt 2008-09-22 06:43:04 UTC (rev 91306)
@@ -23,7 +23,7 @@
<div class="userinfo">
<a href=".">Main Page</a>
<tal:block tal:condition="view/isManager"> /
- <a tal:attributes="href string:/@@logout.html">Log Out</a>
+ <a tal:attributes="href string:@@logout.html?nextURL=${view/application_url}">Log Out</a>
</tal:block>
</div>
<br />
More information about the Checkins
mailing list