Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
b2a81901
Commit
b2a81901
authored
Jul 18, 2016
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify ZMI structure a bit more.
parent
0a9afd9d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
209 deletions
+22
-209
setup.py
setup.py
+1
-1
src/App/Management.py
src/App/Management.py
+0
-6
src/App/dtml/manage.dtml
src/App/dtml/manage.dtml
+16
-24
src/App/dtml/manage_page_header.dtml
src/App/dtml/manage_page_header.dtml
+0
-4
src/App/dtml/manage_top_frame.dtml
src/App/dtml/manage_top_frame.dtml
+0
-36
src/App/dtml/manage_zmi_prefs.dtml
src/App/dtml/manage_zmi_prefs.dtml
+0
-115
src/App/dtml/menu.dtml
src/App/dtml/menu.dtml
+5
-21
src/App/interfaces.py
src/App/interfaces.py
+0
-2
No files found.
setup.py
View file @
b2a81901
...
...
@@ -30,7 +30,7 @@ CHANGES = _read_file('CHANGES.rst')
setup
(
name
=
'Zope2'
,
version
=
'4.0a1.dev0'
,
url
=
'http
://zope2.zope.org
'
,
url
=
'http
s://zope.readthedocs.io/en/latest/
'
,
license
=
'ZPL 2.1'
,
description
=
'Zope2 application server / web framework'
,
author
=
'Zope Foundation and Contributors'
,
...
...
src/App/Management.py
View file @
b2a81901
...
...
@@ -148,9 +148,6 @@ class Navigation(Base):
security
.
declareProtected
(
view_management_screens
,
'manage_menu'
)
manage_menu
=
DTMLFile
(
'dtml/menu'
,
globals
())
security
.
declareProtected
(
view_management_screens
,
'manage_top_frame'
)
manage_top_frame
=
DTMLFile
(
'dtml/manage_top_frame'
,
globals
())
security
.
declareProtected
(
view_management_screens
,
'manage_page_header'
)
manage_page_header
=
DTMLFile
(
'dtml/manage_page_header'
,
globals
())
...
...
@@ -185,9 +182,6 @@ You have been logged out.
</html>"""
)
return
security
.
declarePublic
(
'manage_zmi_prefs'
)
manage_zmi_prefs
=
DTMLFile
(
'dtml/manage_zmi_prefs'
,
globals
())
# Navigation doesn't have an inherited __class_init__ so doesn't get
# initialized automatically.
...
...
src/App/dtml/manage.dtml
View file @
b2a81901
...
...
@@ -10,30 +10,22 @@ function update_menu() {
//-->
</script>
</head>
<dtml-let
tf=
"REQUEST.get('zmi_top_frame', '1')"
>
<dtml-if
tf
>
<frameset
rows=
"34, *"
>
<frame
src=
"<dtml-var "
REQUEST
.
URL1
"
html_quote
>
/manage_top_frame" name="manage_top_frame"
marginwidth="2" marginheight="2" scrolling="no" noresize="noresize"/>
</dtml-if>
<frameset
cols=
"250, *"
>
<frame
src=
"<dtml-var "
REQUEST
.
URL1
"
html_quote
>
/manage_menu"
name="manage_menu"
marginwidth="2" marginheight="2"
/>
<frame
src=
"<dtml-var "
REQUEST
.
URL1
"
html_quote
>
/manage_workspace"
name="manage_main"
marginwidth="2" marginheight="2"
/>
<noframes>
<body>
<p>
Management interfaces require the use of a
<b>
frames-capable
</b>
web
browser.
</p>
</body>
</noframes>
</frameset>
<frameset
cols=
"250, *"
>
<frame
src=
"<dtml-var "
REQUEST
.
URL1
"
html_quote
>
/manage_menu" name="manage_menu"
marginwidth="2" marginheight="2" scrolling="auto"/>
<frame
src=
"<dtml-var "
REQUEST
.
URL1
"
html_quote
>
/manage_workspace" name="manage_main"
marginwidth="2" marginheight="2" scrolling="auto"/>
<noframes>
<body>
<p>
Management interfaces require the use of a
<b>
frames-capable
</b>
web
browser.
</p>
</body>
</noframes>
</frameset>
<dtml-if
tf
>
</frameset>
</dtml-if>
</dtml-let>
</html>
src/App/dtml/manage_page_header.dtml
View file @
b2a81901
...
...
@@ -7,11 +7,7 @@
<meta
http-equiv=
"content-type"
content=
"text/html;charset=&dtml-management_page_charset;"
/>
<dtml-call
"
RESPONSE
and
RESPONSE
.
setHeader
('
content-type
','
text
/
html
;
charset=
'+management_page_charset)">
<title><dtml-if title_or_id><dtml-var title_or_id><dtml-else>Zope</dtml-if></title>
<dtml-let use_css="REQUEST.get('
zmi_use_css
',
'
1
')"
>
<dtml-if
use_css
>
<link rel="stylesheet" type="text/css" href="&dtml-BASEPATH1;/manage_page_style.css" />
</dtml-if>
</dtml-let>
</head>
<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
src/App/dtml/manage_top_frame.dtml
deleted
100644 → 0
View file @
0a9afd9d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"&dtml-BASEPATH1;/manage_page_style.css"
/>
</head>
<body>
<table
width=
"100%"
cellpadding=
"0"
cellspacing=
"0"
border=
"0"
>
<tr>
<td
width=
"180"
align=
"left"
valign=
"top"
><a
href=
"http://zope2.zope.org/"
target=
"_blank"
><img
src=
"&dtml-BASEPATH1;/p_/zopelogo_png"
height=
"33"
width=
"83"
border=
"0"
alt=
""
/></a>
</td>
<td
align=
"right"
valign=
"top"
>
<div
class=
"form-element"
>
<form
action=
"&dtml-BASEPATH1;/"
method=
"post"
target=
"manage_main"
>
<span
class=
"std-text"
>
Logged in as
<strong>
&dtml-AUTHENTICATED_USER;
</strong></span>
<select
class=
"form-element"
name=
":action"
onchange=
"window.parent.manage_main.location.href='&dtml-BASEPATH1;/'+this.options[this.selectedIndex].value"
>
<dtml-if
"
AUTHENTICATED_USER
.
getUserName
()
!=
'
Anonymous
User
'"
>
<option
value=
"manage_zmi_prefs"
>
Set Preferences
</option>
<option
value=
"manage_zmi_logout"
>
Logout
</option>
</dtml-if>
</select>
<input
class=
"form-element"
type=
"submit"
name=
"submit"
value=
" Go "
/>
</form>
</div>
</td>
</tr>
</table>
</body>
</html>
src/App/dtml/manage_zmi_prefs.dtml
deleted
100644 → 0
View file @
0a9afd9d
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Browser Preferences',
)">
<dtml-if set_zmi_cookies>
<dtml-let expires="(_.DateTime('GMT') + 365).rfc822()">
<dtml-call expr="RESPONSE.setCookie('dtpref_cols', REQUEST['dtpref_cols'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('dtpref_rows', REQUEST['dtpref_rows'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('zmi_use_css', REQUEST['zmi_use_css'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('zmi_top_frame',
REQUEST['zmi_top_frame'],
path='/', expires=expires)">
</dtml-let>
</dtml-if>
<p class="form-help">
This form lets you tweak the Zope management interface to fit
your browser. Note that you need to press the browser reload
button in order for some changes to take effect.
</p>
<form action="&dtml-URL;" method="post">
<input type="hidden" name="set_zmi_cookies" value="1" />
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Show Top Frame
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-let tf="REQUEST.get('zmi_top_frame', '1')">
<input type="radio" name="zmi_top_frame" value="1"
<dtml-if tf>checked="checked"</dtml-if>
/> Yes
<input type="radio" name="zmi_top_frame" value=""
<dtml-unless tf>checked="checked"</dtml-unless>
/> No
</dtml-let>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Use Style Sheets
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-let use_css="REQUEST.get('zmi_use_css', '1')">
<input type="radio" name="zmi_use_css" value="1"
<dtml-if expr="use_css and use_css != 'inline'">checked="checked"</dtml-if>
/> Yes
<input type="radio" name="zmi_use_css" value=""
<dtml-if expr="not use_css">checked="checked"</dtml-if>
/> No
</dtml-let>
</div>
</td>
</tr>
<dtml-let cols="REQUEST.get('dtpref_cols', '100%')"
rows="REQUEST.get('dtpref_rows', '20')">
<tr>
<td align="left" valign="top">
<div class="form-label">
Text Area Width
</div>
</td>
<td align="left" valign="top">
<input type="text" name="dtpref_cols" value="&dtml-cols;" size="6" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Text Area Height
</div>
</td>
<td align="left" valign="top">
<input type="text" name="dtpref_rows:int" value="&dtml-rows;" size="6" />
</td>
</tr>
</table>
<span class="form-element">
<input type="submit" name="submit" value="Change" />
</span>
<div class="form-help">
<dtml-if expr="cols[-1]=='%'">
<textarea name="data:text" cols="" rows="&dtml-rows;" style="width: &dtml-cols;;">
<dtml-else>
<textarea name="data:text" cols="&dtml-cols;" rows="&dtml-rows;">
</dtml-if>
This is a sample edit textarea.
</textarea>
</div>
</dtml-let>
</form>
<dtml-var manage_page_footer>
src/App/dtml/menu.dtml
View file @
b2a81901
...
...
@@ -17,41 +17,25 @@
<a href="&dtml.url_quote-tree-item-url;/manage_workspace"
target="manage_main">&dtml-id;</a>
</dtml-tree>
<br />
<table cellspacing="0" bgcolor="#efefef" width="100%">
<tr>
<td width="16"></td>
<td>
<a href="manage_menu?save_layout=1">Save layout</a>
</td>
</tr>
</table>
<dtml-if save_layout>
<dtml-call "RESPONSE.setCookie('tree-s', REQUEST.get('tree-s'), expires=ZopeTime('2100-01-01').rfc822())">
</dtml-if>
<br />
<dtml-unless expr="REQUEST.get('zmi_top_frame', '1')">
<table width="100%" bgcolor="#6699cc">
<tr>
<td valign="top" align="center">
<div class="form-element">
<form action="&dtml-BASEPATH1;/" method="POST" target="manage_main">
<span class="std-text">Logged in as <strong>&dtml-AUTHENTICATED_USER;</strong></span>
<form action="&dtml-BASEPATH1;/manage_zmi_logout" method="POST" target="manage_main">
<span class="std-text">Logged in as <strong>&dtml-AUTHENTICATED_USER;</strong></span>
<br />
<select class="form-element" name=":action" onchange="window.parent.manage_main.location.href='&dtml-BASEPATH1;/'+this.options[this.selectedIndex].value">
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
<option value="manage_zmi_prefs">Set Preferences</option>
<option value="manage_zmi_logout">Logout</option>
<input class="form-element" type="submit" name="submit" value="Logout" />
</dtml-if>
</select>
<input class="form-element" type="submit" name="submit" value=" Go " />
</form>
</div>
</td>
</tr>
</table>
</dtml-unless>
<dtml-var manage_page_footer>
src/App/interfaces.py
View file @
b2a81901
...
...
@@ -26,11 +26,9 @@ class INavigation(Interface):
manage
=
Attribute
(
""" """
)
manage_menu
=
Attribute
(
""" """
)
manage_top_frame
=
Attribute
(
""" """
)
manage_page_header
=
Attribute
(
""" """
)
manage_page_footer
=
Attribute
(
""" """
)
manage_form_title
=
Attribute
(
"""Add Form"""
)
manage_zmi_prefs
=
Attribute
(
""" """
)
def
manage_zmi_logout
(
REQUEST
,
RESPONSE
):
"""Logout current user"""
...
...
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