Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Frederic Thoma
erp5
Commits
b86a7355
Commit
b86a7355
authored
Feb 18, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_xhtml_style: rewrite logged_in ZPT in Python script
parent
a69c49ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
39 deletions
+37
-39
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
...nTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
+36
-38
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+1
-1
No files found.
product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/logged_in.xml
View file @
b86a7355
...
@@ -2,10 +2,14 @@
...
@@ -2,10 +2,14 @@
<ZopeData>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<pickle>
<global
name=
"
ZopePageTemplate"
module=
"Products.PageTemplates.ZopePageTemplate
"
/>
<global
name=
"
PythonScript"
module=
"Products.PythonScripts.PythonScript
"
/>
</pickle>
</pickle>
<pickle>
<pickle>
<dictionary>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<key>
<string>
_bind_names
</string>
</key>
<value>
<value>
...
@@ -20,6 +24,18 @@
...
@@ -20,6 +24,18 @@
<key>
<string>
_asgns
</string>
</key>
<key>
<string>
_asgns
</string>
</key>
<value>
<value>
<dictionary>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
<value>
<string>
traverse_subpath
</string>
</value>
...
@@ -33,52 +49,34 @@
...
@@ -33,52 +49,34 @@
</value>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
_
text
</string>
</key>
<key>
<string>
_
body
</string>
</key>
<value>
<
unicode
encoding=
"cdata"
>
<![CDATA[
<value>
<
string
encoding=
"cdata"
>
<![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
portal = context.getPortalObject()\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
if portal.portal_skins.updateSkinCookie():\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">
\n
portal.setupCurrentSkin()\n
<tal:block
tal:condition=
"here/portal_skins/updateSkinCookie | nothing"
\n
url = REQUEST.get("came_from")\n
tal:define=
"dummy here/setupCurrentSkin;"
/>
\n
if portal.portal_membership.isAnonymousUser():\n
<tal:block
tal:define=
"response request/RESPONSE;\n
RESPONSE.expireCookie("__ac", path="/")\n
mtool here/portal_membership;\n
url = "%s/login_form?portal_status_message=%s" % (\n
isAnon mtool/isAnonymousUser|nothing;"
>
\n
context.absolute_url(),\n
<tal:block
tal:condition=
"isAnon"
>
\n
context.Base_translateString("Login and/or password is incorrect.")\n
<tal:block
tal:define=
"dummy python: response.expireCookie(\'__ac\', path=\'/\');\n
+ ("&came_from=" + url if url else ""))\n
url python: \'%s/login_form?portal_status_message=%s\' % (here.absolute_url(), here.Base_translateString(\'Login and/or password is incorrect.\'));\n
elif not url:\n
url python: request.get(\'came_from\') and \'%s&came_from=%s\' % (url, request[\'came_from\']) or url;\n
url = context.absolute_url()\n
dummy python: response.redirect(url);"
/>
\n
return RESPONSE.redirect(url)\n
</tal:block>
\n
<tal:block
tal:condition=
"not: isAnon"
>
\n
<tal:block
tal:define=
"came_from python: request.get(\'came_from\') or here.absolute_url();\n
dummy python: response.redirect(came_from);"
/>
\n
</tal:block>
\n
</tal:block>
\n
</tal:block>
]]>
</unicode>
</value>
</item>
]]>
</string>
</value>
<item>
<key>
<string>
content_type
</string>
</key>
<value>
<string>
text/html
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
expand
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<
int>
0
</int
>
</value>
<value>
<
string>
REQUEST, RESPONSE
</string
>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
logged_in
</string>
</value>
<value>
<string>
logged_in
</string>
</value>
</item>
</item>
<item>
<key>
<string>
output_encoding
</string>
</key>
<value>
<string>
utf-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<unicode></unicode>
</value>
</item>
</dictionary>
</dictionary>
</pickle>
</pickle>
</record>
</record>
...
...
product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
View file @
b86a7355
1112
1113
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment