[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam - template.pt:1.40
Stephan Richter
srichter@cosmos.phy.tufts.edu
Thu, 31 Jul 2003 23:22:07 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv1850/browser/skins/rotterdam
Modified Files:
template.pt
Log Message:
After I finally got sick of not having a Login/Logout button, I implemented
it. The code is simple and straight forward. If someone has a different
authentication method (cookies or via URL), then s/he just needs to register
their own ling.html and logout.html following pretty much what I have done
for HTTP Authentication.
Only one thing is left: How in the world do you want to write tests for
this functionality?!? As sson as I hear a good suggestion I will add a test
or two for this code.
=== Zope3/src/zope/app/browser/skins/rotterdam/template.pt 1.39 => 1.40 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/template.pt:1.39 Wed Jul 30 03:46:10 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/template.pt Thu Jul 31 23:21:33 2003
@@ -52,7 +52,14 @@
User
</tal:block>
</metal:block>
- <span tal:content="string:Usage $usage" />
+ <a href=""
+ tal:attributes="href string:@@logout.html?nextURL=${request/URL}"
+ tal:condition="python: hasattr(view.request.user, 'getLogin')">
+ [Logout]</a>
+ <a href=""
+ tal:attributes="href string:@@login.html?nextURL=${request/URL}"
+ tal:condition="python: not hasattr(view.request.user, 'getLogin')">
+ [Login]</a>
</div>
<img tal:attributes="src context/++resource++zope3logo.gif" />
</div>