Commit 4f077094 authored by Hanno Schlichting's avatar Hanno Schlichting

Retired icons from the `Zope Management Interface` and various smaller cleanups of ZMI screens.

parent f3ab4409
......@@ -33,6 +33,9 @@ Features Added
Restructuring
+++++++++++++
- Retired icons from the `Zope Management Interface` and various smaller
cleanups of ZMI screens.
- Removed the old help system, in favor of the current Sphinx documentation
hosted at http://docs.zope.org/zope2/. For backwards compatibility the
`registerHelp` and `registerHelpTitle` methods are still available on the
......
......@@ -57,7 +57,6 @@ class DatabaseManager(Item, Implicit):
id = 'DatabaseManagement'
name = title = 'Database Management'
meta_type = 'Database Management'
icon = 'p_/DatabaseManagement_icon'
manage_options=((
{'label':'Database', 'action':'manage_main'},
......@@ -90,7 +89,6 @@ class DatabaseChooser(SimpleItem):
"""
meta_type = 'Database Management'
name = title = 'Database Management'
icon = 'p_/DatabaseManagement_icon'
isPrincipiaFolderish = 1
manage_options=(
......@@ -150,7 +148,6 @@ class DebugManager(Item, Implicit):
id ='DebugInfo'
name = title = 'Debug Information'
meta_type = name
icon = 'p_/DebugManager_icon'
manage_options=((
{'label':'Debugging Info', 'action':'manage_main'},
......@@ -285,7 +282,6 @@ class ApplicationManager(Folder, CacheManager):
id = 'Control_Panel'
name = title = 'Control Panel'
meta_type = 'Control Panel'
icon = 'p_/ControlPanel_icon'
process_id = os.getpid()
process_start = int(time.time())
......
......@@ -17,7 +17,6 @@ This class is mixed into the database manager in App.ApplicationManager.
from AccessControl.class_init import InitializeClass
from App.special_dtml import DTMLFile
from App.ImageFile import ImageFile
from DateTime.DateTime import DateTime
class CacheManager:
......@@ -30,10 +29,6 @@ class CacheManager:
manage_cacheParameters = DTMLFile('dtml/cacheParameters', globals())
manage_cacheGC = DTMLFile('dtml/cacheGC', globals())
transparent_bar = ImageFile('www/transparent_bar.gif', globals())
store_bar = ImageFile('www/store_bar.gif', globals())
load_bar = ImageFile('www/load_bar.gif', globals())
def _getDB(self):
return self._p_jar.db()
......
......@@ -24,7 +24,6 @@ class DavLockManager(Item, Implicit):
id = 'DavLockManager'
name = title = 'WebDAV Lock Manager'
meta_type = 'WebDAV Lock Manager'
icon = 'p_/davlocked'
security = ClassSecurityInfo()
security.declareProtected('Manage WebDAV Locks',
......
......@@ -52,10 +52,7 @@ class Product(Base):
security = ClassSecurityInfo()
meta_type='Product'
icon='p_/Product_icon'
version=''
configurable_objects_=()
import_error_=None
thisIsAnInstalledProduct = True
title = 'This is a non-persistent product wrapper.'
......
......@@ -14,16 +14,14 @@
"""
from cgi import escape
import sys
import urllib
from zope.interface import implements
from AccessControl import getSecurityManager, Unauthorized
from AccessControl import Unauthorized
from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import view_management_screens
from App.interfaces import INavigation
from App.special_dtml import HTMLFile
from App.special_dtml import DTMLFile
from ExtensionClass import Base
from zExceptions import Redirect
......@@ -43,10 +41,7 @@ class Tabs(Base):
security.declarePublic('filtered_manage_options')
def filtered_manage_options(self, REQUEST=None):
validate=getSecurityManager().validate
result=[]
try:
options=tuple(self.manage_options)
except TypeError:
......@@ -170,12 +165,6 @@ class Navigation(Base):
manage_form_title._setFuncSignature(
varnames=('form_title', 'help_product', 'help_topic') )
security.declarePublic('zope_quick_start')
zope_quick_start=DTMLFile('dtml/zope_quick_start', globals())
security.declarePublic('manage_copyright')
manage_copyright=DTMLFile('dtml/copyright', globals())
security.declarePublic('manage_zmi_logout')
def manage_zmi_logout(self, REQUEST, RESPONSE):
"""Logout current user"""
......
##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
#
##############################################################################
'''Zope registerable permissions
'''
from AccessControl.class_init import InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit
from OFS.role import RoleManager
from OFS.SimpleItem import Item
from Persistence import Persistent
class Permission(RoleManager,
Persistent,
Implicit,
Item
):
"""Model Permission meta-data
"""
meta_type = 'Zope Permission'
icon = 'p_/Permission_icon'
index_html = None
security = ClassSecurityInfo()
manage_options=(
RoleManager.manage_options
+ Item.manage_options
)
def __init__(self, id, title, name):
self.id=id
self.title=title
self.name=name
InitializeClass(Permission)
......@@ -22,7 +22,6 @@ class ProductFolder(Folder):
id = 'Products'
name = title = 'Product Management'
meta_type = 'Product Management'
icon = 'p_/ProductFolder_icon'
all_meta_types=()
meta_types=()
......
......@@ -18,9 +18,6 @@ import os
from AccessControl.Permission import registerPermissions
from AccessControl.PermissionRole import PermissionRole
from App.ImageFile import ImageFile
from OFS.misc_ import Misc_
from OFS.misc_ import misc_
from OFS.ObjectManager import ObjectManager
from zope.interface import implementedBy
......@@ -76,10 +73,7 @@ class ProductContext:
The first method will be used as the initial method called
when creating an object.
icon -- The name of an image file in the package to
be used for instances. Note that the class icon
attribute will be set automagically if an icon is
provided.
icon -- No longer used.
permissions -- Additional permissions to be registered
If not provided, then permissions defined in the
......@@ -105,10 +99,6 @@ class ProductContext:
productObject=self.__prod
pid=productObject.id
if icon and instance_class is not None:
setattr(instance_class, 'icon', 'misc_/%s/%s' %
(pid, os.path.split(icon)[1]))
if permissions:
if isinstance(permissions, basestring): # You goofed it!
raise TypeError, ('Product context permissions should be a '
......@@ -207,14 +197,6 @@ class ProductContext:
m[name]=method
m[name+'__roles__']=pr
if icon:
name = os.path.split(icon)[1]
icon = ImageFile(icon, self.__pack.__dict__)
icon.__roles__=None
if not hasattr(misc_, pid):
setattr(misc_, pid, Misc_(pid, {}))
getattr(misc_, pid)[name]=icon
def registerHelp(self, directory=None, clear=None, title_re=None):
pass
......
......@@ -29,22 +29,7 @@
</table>
<p></p>
<div align="center">
<table style="border: solid thin black;">
<tr>
<td></td>
<dtml-in divs mapping>
<dtml-let url="REQUEST['URL'] + ('?chart_start=%s&chart_end=%s'
% (start, end))">
<td height="200" width="32"><a href="&dtml-url;"><dtml-if
trans_len><img src="transparent_bar" width="32"
height="&dtml-trans_len;" border="0" /><br /></dtml-if><dtml-if
store_len><img src="store_bar" width="32"
height="&dtml-store_len;" border="0" /><br /></dtml-if><dtml-if
load_len><img src="load_bar" width="32"
height="&dtml-load_len;" border="0" /></dtml-if></a></td>
</dtml-let>
</dtml-in>
</tr>
<table>
<tr>
<th align="left"><font color="#ff0000">Object stores</font></th>
......@@ -59,7 +44,6 @@
</th>
</tr>
<tr>
<th align="left" valign="top"><font color="#000080">Object loads</font></th>
<dtml-in divs mapping>
......@@ -73,7 +57,6 @@
</th>
</tr>
<tr>
<th align="left">Connections</th>
<dtml-in divs mapping>
......@@ -84,7 +67,6 @@
</th>
</tr>
<tr>
<th></th>
<dtml-in divs mapping>
......@@ -93,10 +75,8 @@
<th></th>
</tr>
</table>
</div>
</dtml-with>
<dtml-var manage_page_footer>
......@@ -96,7 +96,6 @@ accompanying credits file.
<a name="PYTHON" />
<h3>
<img src="&dtml-BASEPATH1;/p_/PyPoweredSmall_Gif" alt="Python powered" />
This software is powered by <a href="http://www.python.org/" target="_top">Python</a>!
</h3>
<p>Copyright &copy; 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
......
......@@ -126,10 +126,7 @@ functions such as database and product management.
<table cellspacing="0" cellpadding="2" border="0">
<dtml-in objectItems>
<tr>
<td width="16" align="left" valign="top">
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
<img src="&dtml-BASEPATH1;/&dtml-icon;" alt="" border="0" /></a>
</td>
<td width="16" align="left" valign="top"></td>
<td align="left" valign="top">
<div class="list-item">
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
......
......@@ -68,10 +68,6 @@ function toggleSelect() {
id="cb_&dtml-sequence-index;" />
</td>
<td align="left" valign="top" width="16">
<dtml-if icon>
<img src="&dtml-BASEPATH1;/&dtml-icon;" alt="[&dtml-meta_type;]"
title="[&dtml-meta_type;]" />
</dtml-if icon>
</td>
<td align="left" valign="top" class="list-item">
<label for="cb_&dtml-sequence-index;">&dtml-sequence-key;</label>
......
......@@ -15,10 +15,10 @@ function update_menu() {
<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"/>
marginwidth="2" marginheight="2" scrolling="no" noresize="noresize"/>
</dtml-if>
<frameset cols="200, *">
<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"
......
......@@ -16,38 +16,21 @@
<table cellpadding="0" cellspacing="0" width="100%" border="0">
<tr>
<td bgcolor="#000000" rowspan="5" width="10%" valign="bottom"
align="left">&nbsp;&nbsp;<img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" />
</td>
<td bgcolor="#000000" colspan="<dtml-var "4 * (n_ + 1)">"><img
src="&dtml-BASEPATH1;/p_/sp" width="1" height="5" alt="" /></td>
<td bgcolor="#000000" rowspan="5" width="1%"></td>
</tr>
<tr>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<td bgcolor="#ffffff" rowspan="2" valign="top"
align="left"><img src="&dtml-BASEPATH1;/p_/ltab" width="5"
height="5" alt="" /></td>
<td bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
width="1" height="2" alt="" /></td>
<td bgcolor="#ffffff" rowspan="2" valign="top"
align="right"><img src="&dtml-BASEPATH1;/p_/rtab" width="5"
height="5" alt="" /></td>
<td bgcolor="#000000" rowspan="4"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
<td bgcolor="#ffffff" rowspan="2"></td>
<td></td>
<td bgcolor="#ffffff" rowspan="2"></td>
<td bgcolor="#000000" rowspan="4">&nbsp;</td>
<dtml-else>
<td bgcolor="#efefef" rowspan="2" valign="top"
align="left"><img src="&dtml-BASEPATH1;/p_/ltab" width="5"
height="5" alt="" /></td>
<td bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
width="1" height="2" alt="" /></td>
<td bgcolor="#efefef" rowspan="2" valign="top"
align="right"><img src="&dtml-BASEPATH1;/p_/rtab" width="5"
height="5" alt="" /></td>
<td bgcolor="#000000" rowspan="4"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
<td bgcolor="#efefef" rowspan="2"></td>
<td bgcolor="#efefef"><span style="font-size:10%;">&nbsp;</span></td>
<td bgcolor="#efefef" rowspan="2"></td>
<td bgcolor="#000000" rowspan="4">&nbsp;</td>
</dtml-if>
</dtml-in>
</tr>
......@@ -79,22 +62,9 @@
<tr>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
<td colspan="3" bgcolor="#ffffff"><span style="font-size:30%;">&nbsp;</span></td>
<dtml-else>
<td colspan="3" bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
</dtml-if>
</dtml-in>
</tr>
<tr>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
<dtml-else>
<td colspan="3" bgcolor="#c0c0c0"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1" alt="" /></td>
<td colspan="3" bgcolor="#c0c0c0"><span style="font-size:30%;">&nbsp;</span></td>
</dtml-if>
</dtml-in>
</tr>
......@@ -107,10 +77,6 @@
<tr class="location-bar">
<td align="left" valign="top">
<div class="std-text">
<dtml-if icon>
<img src="&dtml-BASEPATH1;/&dtml-icon;"
alt="&dtml-meta_type;" border="0" />
</dtml-if>
<strong>
<dtml-if meta_type>
&dtml-meta_type;
......@@ -120,9 +86,7 @@
at <dtml-var expr="tabs_path_default(REQUEST)">
</strong>
<dtml-if wl_isLocked>
<img src="&dtml-BASEPATH1;/p_/davlocked"
alt="This item has been locked by WebDAV"
title="This item has been locked by WebDAV" />
Locked
</dtml-if wl_isLocked>
</div>
</td>
......
......@@ -4,13 +4,13 @@
<title></title>
<link rel="stylesheet" type="text/css" href="&dtml-BASEPATH1;/manage_page_style.css" />
</head>
<body bgcolor="#6699cc" link="#000099" alink="#000099" vlink="#000099">
<body>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="180" align="left" valign="top"><a
href="http://www.zope.org/" target="_blank"><img src="&dtml-BASEPATH1;/p_/zopelogo_jpg"
height="32" width="90" border="0" alt="" /></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">
......
......@@ -3,12 +3,6 @@
<table width="100%" cellspacing="0" border="0">
<tr bgcolor="#000000">
<td valign="top" nowrap="nowrap">
<dtml-if icon>
<a href="manage_workspace" target="manage_main"><img
src="&dtml-BASEPATH1;/&dtml-icon;" border="0"
title="Click to open this item" alt="&dtml-meta_type;" /></a>
</dtml-if>
<strong>
<a href="manage_workspace" target="manage_main" style="color: #ffffff;">
<dtml-if expr="URLPATH1==BASEPATH1">
Root Folder
......@@ -16,16 +10,10 @@
&dtml-id;
</dtml-if>
</a>
</strong>
</td>
</tr>
</table>
<dtml-tree nowrap=1>
<dtml-if icon>
<a href="&dtml.url_quote-tree-item-url;/manage_workspace"
target="manage_main"><img src="&dtml-BASEPATH1;/&dtml-icon;" border="0"
title="Click to open this item" alt="&dtml-meta_type;" /></a>
</dtml-if>
<a href="&dtml.url_quote-tree-item-url;/manage_workspace"
target="manage_main">&dtml-id;</a>
</dtml-tree>
......@@ -33,34 +21,14 @@
<table cellspacing="0" bgcolor="#efefef" width="100%">
<tr>
<td width="16"></td>
<td valign="top" nowrap="nowrap">
<strong>
<a href="manage_copyright" target="manage_main">
&copy; Zope Foundation
</a>
</strong>
</td>
</tr>
<tr>
<td width="16"></td>
<td valign="top" nowrap="nowrap">
<strong>
<a href="manage_menu">Refresh</a>
</strong>
</td>
</tr>
<tr>
<td width="16"></td>
<td valign="top" nowrap="nowrap">
<strong>
<td>
<a href="manage_menu?save_layout=1">Save layout</a>
</strong>
</td>
</tr>
</table>
<dtml-if save_layout>
<dtml-call "RESPONSE.setCookie('tree-s', REQUEST.get('tree-s'), expires=ZopeTime('2975-05-26').rfc822())">
<dtml-call "RESPONSE.setCookie('tree-s', REQUEST.get('tree-s'), expires=ZopeTime('2100-01-01').rfc822())">
</dtml-if>
<dtml-unless expr="REQUEST.get('zmi_top_frame', '1')">
......
......@@ -7,21 +7,20 @@
<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
<dtml-var "manage_form_title(this(), _,
form_title='Zope Quick Start',
form_title='Zope 2',
)">
<dtml-if expr="_.hasattr (PARENTS[0].acl_users, 'hasUsers') and not PARENTS[0].acl_users.hasUsers()">
<div class="system-msg">
<h3>
You have not created any users in this Zope instance. In order to
log in and manage this Zope instance, you'll need to add an administrative
user account.
You have not created any users in this Zope instance. In order to log in and
manage this Zope instance, you'll need to add an administrative user account.
</h3>
<p>
You can create an administrative user account via the "zopectl adduser"
You can create an administrative user account via the "addzope2user"
command from a shell. <b>Note: You'll need to shut Zope itself down before
"zopectl adduser" will work. Restart Zope after executing this command in
"addzope2user" will work. Restart Zope after executing this command in
order to log in.</b>
</p>
......@@ -29,48 +28,8 @@ order to log in.</b>
</dtml-if>
<p>
Welcome to <strong>Zope</strong>, a high-performance object-oriented
platform for building dynamic Web applications. Here are some quick
pointers to get you started:
The owner of this site has not yet added any content.
</p>
<ul>
<li>
<p>
<a href="http://docs.zope.org/zope2/zope2book/" target="_blank">Read The
Fine Manual</a>. This document guides you through the whole process of
learning Zope, from logging in for the first time to creating your own
web applications.
</p>
</li>
<li>
<p>
Go to the main <a href="http://docs.zope.org/" target="_blank">
Documentation Overview</a> on <a href="http://www.zope.org" target="_blank">Zope.org</a>.
Here you will find pointers to official and community contributed documentation.
</p>
</li>
<li>
<p>
Look at the various <a
href="http://www.zope.org/Resources/MailingLists" target="_blank">Mailing
Lists</a> about Zope. The Mailing Lists are where you can get
quick, accurate, friendly help from a large community of Zope
users from around the world.
</p>
</li>
<li>
<p>
Go directly to the <a href="&dtml-BASEPATH1;/manage" target="_top">
Zope Management Interface</a> if you'd like to start working with Zope
right away.
</p>
</li>
</ul>
</body>
</html>
......@@ -30,8 +30,6 @@ class INavigation(Interface):
manage_page_header = Attribute(""" """)
manage_page_footer = Attribute(""" """)
manage_form_title = Attribute("""Add Form""")
zope_quick_start = Attribute(""" """)
manage_copyright = Attribute(""" """)
manage_zmi_prefs = Attribute(""" """)
def manage_zmi_logout(REQUEST, RESPONSE):
......
......@@ -19,24 +19,24 @@ class TestImageFile(unittest.TestCase):
App.config._config = self.oldcfg
def test_warn_on_software_home_default(self):
App.ImageFile.ImageFile('App/www/zopelogo.jpg')
App.ImageFile.ImageFile('App/www/zopelogo.png')
self.assertEquals(self.warningshook.warnings.pop()[0],
App.ImageFile.NON_PREFIX_WARNING)
def test_no_warn_on_absolute_path(self):
path = os.path.join(os.path.dirname(App.__file__),
'www','zopelogo.jpg')
'www','zopelogo.png')
App.ImageFile.ImageFile(path)
self.assertFalse(self.warningshook.warnings)
def test_no_warn_on_path_as_prefix(self):
prefix = os.path.dirname(App.__file__)
App.ImageFile.ImageFile('www/zopelogo.jpg', prefix)
App.ImageFile.ImageFile('www/zopelogo.png', prefix)
self.assertFalse(self.warningshook.warnings)
def test_no_warn_on_namespace_as_prefix(self):
prefix = App.__dict__ # same as calling globals() inside the App module
App.ImageFile.ImageFile('www/zopelogo.jpg', prefix)
App.ImageFile.ImageFile('www/zopelogo.png', prefix)
self.assertFalse(self.warningshook.warnings)
def test_suite():
......
......@@ -7,8 +7,6 @@
<tr tal:repeat="info databases">
<td tal:define="name python: info[0];
qname python: info[1]">
<img src="/p_/DatabaseManagement_icon"
tal:attributes="src string:${request/BASE1}/p_/DatabaseManagement_icon" />
<a tal:content="name" tal:attributes="href
string:${context/absolute_url}/${qname}/manage_main">Main</a>
</td>
......
......@@ -15,7 +15,6 @@
import os, sys
from logging import getLogger
from cgi import escape
import Products
import transaction
......@@ -153,15 +152,6 @@ class Application(ApplicationDefaultPermissions,
ZopeTime = PrincipiaTime
security.declarePublic('ZopeAttributionButton')
def ZopeAttributionButton(self):
"""Returns an HTML fragment that displays the 'powered by zope'
button along with a link to the Zope site."""
return '<a href="http://www.zope.org/Credits" target="_top"><img ' \
'src="%s/p_/ZopeButton" width="115" height="50" border="0" ' \
'alt="Powered by Zope" /></a>' % escape(self.REQUEST.BASE1, 1)
def DELETE(self, REQUEST, RESPONSE):
"""Delete a resource object."""
self.dav__init(REQUEST, RESPONSE)
......@@ -172,9 +162,6 @@ class Application(ApplicationDefaultPermissions,
self.dav__init(REQUEST, RESPONSE)
raise Forbidden, 'This resource cannot be moved.'
test_url___allow_groups__=None
test_url = ZopeAttributionButton
def absolute_url(self, relative=0):
"""The absolute URL of the root object is BASE1 or "/".
"""
......@@ -230,8 +217,6 @@ InitializeClass(Application)
class Expired(Persistent):
icon='p_/broken'
def __setstate__(self, s={}):
dict=self.__dict__
if s.has_key('id'):
......@@ -649,7 +634,6 @@ def install_standards(app):
# Install the replaceable standard objects
from App.Common import package_home
from App.special_dtml import DTMLFile
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
std_dir = os.path.join(package_home(globals()), 'standard')
wrote = False
......@@ -661,17 +645,6 @@ def install_standards(app):
ob = DTMLFile(base, std_dir)
app.manage_addProduct['OFSP'].manage_addDTMLMethod(
id=base, file=open(ob.raw))
elif ext in ('.pt', '.zpt'):
if hasattr(app, base):
continue
ob = PageTemplateFile(fn, std_dir, __name__=fn)
app.manage_addProduct['PageTemplates'].manage_addPageTemplate(
id=base, title='', text=open(ob.filename))
elif ext in ('.ico', '.gif', '.png'):
if hasattr(app, fn):
continue
app.manage_addProduct['OFSP'].manage_addImage(
id=fn, title='', file=open(os.path.join(std_dir, fn)))
else:
continue
wrote = True
......
......@@ -342,12 +342,11 @@ def findCacheables(ob, manager_id, require_assoc, subfolders,
if not sm.checkPermission('Change cache settings', subob):
continue
subpath = path + (subob.getId(),)
icon = getattr(aq_base(subob), 'icon', '')
info = {
'sortkey': subpath,
'path': '/'.join(subpath),
'title': getattr(aq_base(subob), 'title', ''),
'icon': icon,
'icon': None,
'associated': associated,}
rval.append(info)
......
......@@ -36,7 +36,6 @@ class DTMLDocument(PropertyManager, DTMLMethod):
""" DocumentTemplate.HTML objects whose 'self' is the DTML object.
"""
meta_type = 'DTML Document'
icon ='p_/dtmldoc'
manage_options = (
DTMLMethod.manage_options[:2] +
......
......@@ -14,7 +14,6 @@
"""
from cgi import escape
import time
import sys
from AccessControl.class_init import InitializeClass
......@@ -25,7 +24,7 @@ from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager
from Acquisition import aq_base
from Acquisition import aq_parent
from Acquisition import Implicit, Explicit
from Acquisition import Implicit
from App.Common import iso8601_date
from App.Common import rfc1123_date
from App.Dialogs import MessageDialog
......@@ -104,7 +103,6 @@ class PropertySheet(Traversable, Persistent, Implicit):
_properties=()
_extensible=1
icon='p_/Properties_icon'
security = ClassSecurityInfo()
security.declareObjectProtected(access_contents_information)
......
......@@ -113,10 +113,6 @@ class Item(Base,
# Alias id to __name__, which will make tracebacks a good bit nicer:
__name__=ComputedAttribute(lambda self: self.getId())
# Name, relative to BASEPATH1 of icon used to display item
# in folder listings.
icon=''
# Meta type used for selecting all objects of a given type.
meta_type='simple item'
......
......@@ -32,7 +32,7 @@ LOG = getLogger('OFS.Uninstalled')
class BrokenClass(ZODB_Broken, Explicit, Item, Overridable):
_p_changed=0
meta_type='Broken Because Product is Gone'
icon='p_/broken'
product_name='unknown'
id='broken'
......
......@@ -50,8 +50,6 @@ are shown.
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-if icon><a href="../&dtml-path;/manage_main"><img src="&dtml-icon;"
border="0"></a> &nbsp;</dtml-if>
<a href="../&dtml-path;/manage_main">&dtml-path;</a><dtml-if
title>(&dtml-title;)</dtml-if>
</div>
......
......@@ -79,11 +79,7 @@ your search terms below.
<dtml-else>
<TR class="row-hilite">
</dtml-if>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16">
<A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
<IMG SRC="&dtml-BASEPATH1;/&dtml-icon;"
ALT="[&dtml-meta_type;]" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16"></TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<div class="list-item">
<A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
......
......@@ -118,25 +118,7 @@ function toggleSelect() {
<input type="checkbox" name="ids:list" value="&dtml-sequence-key;" />
</td>
<td align="left" valign="top" nowrap="nowrap">
<dtml-if om_icons>
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
<dtml-in om_icons mapping>
<img src="&dtml-BASEPATH1;/&dtml.url_quote-path;" alt="&dtml.missing-alt;"
title="&dtml.missing-title;" border="0" width="16" height="16"/></dtml-in></a>
<dtml-else>
<dtml-if icon>
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
<img src="&dtml-BASEPATH1;/&dtml-icon;" alt="&dtml-meta_type;"
title="&dtml-meta_type;" border="0" /></a>
<dtml-else>
&nbsp;
</dtml-if>
</dtml-if>
<i>&dtml-meta_type;</i>
</td>
<td align="left" valign="top">
......@@ -146,7 +128,7 @@ function toggleSelect() {
</a>
<dtml-try>
<dtml-if "wl_isLocked()==1">
<img src="/p_/davlocked">
Locked
</dtml-if>
<dtml-except>
</dtml-try>
......
......@@ -20,8 +20,6 @@ user to edit that user.
</td>
<td align="left" valign="top">
<div class="list-item">
<a href="manage_users?name=&dtml.url_quote-sequence-item;&submit=Edit"><img src="&dtml-BASEPATH1;/p_/User_icon"
alt="" border="0" /></a>
<a href="manage_users?name=&dtml.url_quote-sequence-item;&submit=Edit">&dtml-sequence-item;</a>
</div>
</td>
......
......@@ -15,11 +15,9 @@
<a href="&dtml-id;/manage">&dtml-id; <dtml-if xml_namespace>(<dtml-var xml_namespace>)</dtml-if></a>
<dtml-if locked_in_session>
<dtml-if modified_in_session>
<img src="&dtml-BASEPATH1;/p_/locked"
alt="This item has been modified in this session" />
This item has been modified in this session
<dtml-else>
<img src="&dtml-BASEPATH1;/p_/lockedo"
alt="This item has been modified in another session" />
This item has been modified in another session
</dtml-if>
</dtml-if>
</td>
......
......@@ -9,9 +9,7 @@
<table border="0">
<dtml-in expr="manage_CopyContainerAllItems(REQUEST)">
<tr>
<td align="left" valign="bottom" width="16">
<img src="&dtml-BASEPATH1;/&dtml-icon;" alt="" border="0" />
</td>
<td align="left" valign="bottom" width="16"></td>
<td align="left" valign="bottom">
<div class="form-text">
&dtml-id;
......
......@@ -336,11 +336,6 @@ class IItem(IZopeObject, IManageable, IFTPAccess, IDAVResource,
title=u"Title"
)
icon = BytesLine(
title=u"Icon",
description=u"Name of icon, relative to BASEPATH1",
)
def getId():
"""Return the id of the object as a string.
......@@ -858,12 +853,6 @@ class IApplication(IFolder, IRoot):
ZopeTime = PrincipiaTime
def ZopeAttributionButton():
"""Returns an HTML fragment that displays the 'powered by zope'
button along with a link to the Zope site."""
test_url = ZopeAttributionButton
def absolute_url(relative=0):
"""The absolute URL of the root object is BASE1 or "/".
"""
......
......@@ -118,10 +118,6 @@ def _registerClass(class_, meta_type, permission, addview, icon, global_):
setattr(class_, 'meta_type', meta_type)
permission_obj = getUtility(IPermission, permission)
if icon:
setattr(class_, 'icon', '++resource++%s' % icon)
interfaces = tuple(implementedBy(class_))
info = {'name': meta_type,
......@@ -151,10 +147,6 @@ def registerClass(_context, class_, meta_type, permission, addview=None,
def unregisterClass(class_):
delattr(class_, 'meta_type')
try:
delattr(class_, 'icon')
except AttributeError:
pass
def setDeprecatedManageAddDelete(class_):
......
......@@ -31,47 +31,9 @@ class p_:
security = ClassSecurityInfo()
security.declareObjectPublic()
here = dirname(__file__)
broken = ImageFile('www/broken.gif', here)
import OFS
ofs_dir = dirname(OFS.__file__)
User_icon = ImageFile('www/User_icon.gif', ofs_dir)
locked = ImageFile('www/modified.gif', here)
lockedo = ImageFile('www/locked.gif', here)
import webdav
davlocked = ImageFile('www/davlock.gif', dirname(webdav.__file__))
pl = ImageFile('www/Plus_icon.gif', ofs_dir)
mi = ImageFile('www/Minus_icon.gif', ofs_dir)
import App
app_dir = dirname(App.__file__)
rtab = ImageFile('www/rtab.gif', app_dir)
ltab = ImageFile('www/ltab.gif', app_dir)
sp = ImageFile('www/sp.gif', app_dir)
r_arrow_gif = ImageFile('www/r_arrow.gif', here)
l_arrow_gif = ImageFile('www/l_arrow.gif', here)
ControlPanel_icon = ImageFile('www/ControlPanel_icon.gif', ofs_dir)
ApplicationManagement_icon = ImageFile('www/cpSystem.gif', app_dir)
DatabaseManagement_icon = ImageFile('www/dbManage.gif', app_dir)
DebugManager_icon = ImageFile('www/DebugManager_icon.gif', app_dir)
InstalledProduct_icon = ImageFile('www/installedProduct.gif', app_dir)
BrokenProduct_icon = ImageFile('www/brokenProduct.gif', app_dir)
Product_icon = ImageFile('www/product.gif', app_dir)
Permission_icon = ImageFile('www/permission.gif', app_dir)
ProductFolder_icon = ImageFile('www/productFolder.gif', app_dir)
PyPoweredSmall_Gif = ImageFile('www/PythonPoweredSmall.gif', app_dir)
ZopeButton = ImageFile('www/zope_button.jpg', app_dir)
ZButton = ImageFile('www/z_button.jpg', app_dir)
zopelogo_jpg = ImageFile('www/zopelogo.jpg', app_dir)
Properties_icon = ImageFile('www/Properties_icon.gif', ofs_dir)
Propertysheets_icon = ImageFile('www/Properties_icon.gif', ofs_dir)
zopelogo_png = ImageFile('www/zopelogo.png', app_dir)
InitializeClass(p_)
......
<tal:text tal:replace="structure context/zope_quick_start" />
......@@ -31,19 +31,10 @@
an error.</li>
</ul>
<p>For more detailed information about the error, please
refer to the error log.
</p>
<p>If the error persists please contact the site maintainer.
Thank you for your patience.
</p>
<dtml-comment>
Here, events like logging and other actions may also be performed, such as
sending mail automatically to the administrator.
</dtml-comment>
</dtml-if>
</body>
......
......@@ -202,7 +202,7 @@ class TestInitialization( unittest.TestCase ):
self.configure(good_cfg)
i = self.getOne()
i.install_products()
self.assertTrue(Application.misc_.__dict__.has_key('OFSP'))
self.assertTrue('__roles__' in Application.misc_.__dict__)
def test_install_standards(self):
self.configure(good_cfg)
......
......@@ -87,13 +87,6 @@ class Test__registerClass(unittest.TestCase):
self.assertEqual(mt[0]['instance'], klass)
self.assertEqual(mt[0]['container_filter'], None)
def test_w_icon(self):
klass = self._makeClass()
self._registerPermission('perm')
self._callFUT(klass, 'Dummy', 'perm', icon='dummy.png')
self.assertEqual(klass.icon, '++resource++dummy.png')
def test_w_global_(self):
klass = self._makeClass()
self._registerPermission('perm')
......
......@@ -73,7 +73,6 @@ def test_registerClass():
... meta_type="Foo Type"
... permission="foo.add"
... addview="addfoo.html"
... icon="foo_icon.png"
... global="false"
... />
... </configure>'''
......@@ -85,8 +84,6 @@ def test_registerClass():
>>> from OFS.tests.test_registerclass import SimpleContent
>>> SimpleContent.meta_type
'Foo Type'
>>> SimpleContent.icon
'++resource++foo_icon.png'
And the meta_type is registered correctly::
......@@ -138,8 +135,6 @@ def test_registerClass():
>>> SimpleContent.meta_type
'Bar Type'
>>> SimpleContent.icon
''
And the meta_type is registered correctly::
......@@ -168,8 +163,6 @@ def test_registerClass():
>>> tearDown()
>>> SimpleContent.meta_type
'simple item'
>>> SimpleContent.icon
''
>>> [info for info in Products.meta_types if info['name'] == 'Bar Type']
[]
"""
......
......@@ -302,7 +302,6 @@ class UserFolder(accesscontrol_userfolder.UserFolder, BasicUserFolder):
UserFolders function chiefly to control access by authenticating
users and binding them to a collection of roles."""
icon = 'p_/UserFolder'
_ofs_migrated = False
def __init__(self):
......
......@@ -54,47 +54,11 @@ Let's check for the various aq_* attributes:
>>> view.aq_self == view
True
Let's try to acquire something from the root folder:
>>> button = view.aq_acquire('ZopeAttributionButton')
>>> print button()
<a href="http://www.zope.org/Credits" target="_top"><img src="http://nohost/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope" /></a>
Let's check that we're in the right context:
>>> view.aq_inContextOf(self.folder)
1
>>> view.aq_inContextOf(self.app)
1
>>> view.aq_inContextOf(object())
0
Views also still support the __of__ protocol, at least pro forma:
>>> view == view.__of__(self.app)
True
Acquisition API legacy on a browser view's template
---------------------------------------------------
A view's template will also support the various aq_* attributes:
>>> view = getMultiAdapter((self.folder, request), name='template')
>>> template = view.template
>>> template.aq_parent == view
True
>>> template.aq_inner == template
True
>>> template.aq_base == template
True
>>> template.aq_self == template
True
>>> button = template.aq_acquire('ZopeAttributionButton')
>>> print button()
<a href="http://www.zope.org/Credits" target="_top"><img src="http://nohost/p_/ZopeButton" width="115" height="50" border="0" alt="Powered by Zope" /></a>
Mixing in Acquisition.{Ex|Im}plicit
-----------------------------------
......
......@@ -26,7 +26,6 @@ from Acquisition import Acquired
from Acquisition import Explicit
from Acquisition import aq_get
from App.Common import package_home
from App.ImageFile import ImageFile
from DateTime.DateTime import DateTime
from OFS.SimpleItem import SimpleItem
from OFS.History import Historical, html_diff
......@@ -387,18 +386,6 @@ class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
return self._text
return self.read()
def om_icons(self):
"""Return a list of icon URLs to be displayed by an ObjectManager"""
icons = ({'path': 'misc_/PageTemplates/zpt.gif',
'alt': self.meta_type, 'title': self.meta_type},)
if not self._v_cooked:
self._cook()
if self._v_errors:
icons = icons + ({'path': 'misc_/PageTemplates/exclamation.gif',
'alt': 'Error',
'title': 'This template has an error'},)
return icons
security.declareProtected(view, 'pt_source_file')
def pt_source_file(self):
"""Returns a file name to be compiled into the TAL code."""
......@@ -490,8 +477,6 @@ def manage_addPageTemplate(self, id, title='', text='', encoding='utf-8',
else:
return zpt
from Products.PageTemplates import misc_
misc_['exclamation.gif'] = ImageFile('www/exclamation.gif', globals())
def initialize(context):
context.registerClass(
......@@ -499,5 +484,4 @@ def initialize(context):
permission='Add Page Templates',
constructors=(manage_addPageTemplateForm,
manage_addPageTemplate),
icon='www/zpt.gif',
)
......@@ -436,7 +436,6 @@ class BrowserIdManager(Item, Persistent, Implicit, RoleManager, Owned, Tabs):
registerBeforeTraverse(parent, hook, name, priority)
# ZMI
icon = 'misc_/Sessions/idmgr.gif'
manage_options=({'label': 'Settings', 'action':'manage_browseridmgr'},
{'label': 'Security', 'action':'manage_access'},
{'label': 'Ownership', 'action':'manage_owner'},
......
......@@ -54,6 +54,11 @@ def constructSessionDataManager(self, id, title='', path=None,
if REQUEST is not None:
return self.manage_main(self, REQUEST, update_menu=1)
class SessionIdManagerErr(Exception):
pass
class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
""" The Zope default session data manager implementation """
......@@ -84,8 +89,6 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
security.setPermissionDefault(ACCESS_SESSIONDATA_PERM,
['Manager','Anonymous'])
icon='misc_/CoreSessionTracking/datamgr.gif'
implements(ISessionDataManager)
manage_sessiondatamgr = DTMLFile('dtml/manageDataManager',
......@@ -214,7 +217,7 @@ class SessionDataManager(Item, Implicit, Persistent, RoleManager, Owned, Tabs):
if self.obpath is None:
err = 'Session data container is unspecified in %s' % self.getId()
LOG.warn(err)
raise SessionIdManagerErr, err
raise SessionIdManagerErr(err)
try:
# This should arguably use restrictedTraverse, but it
# currently fails for mounted storages. This might
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment