Commit d339009b authored by Hanno Schlichting's avatar Hanno Schlichting

- No longer show the Help! links in the ZMI, if there is no help available....

- No longer show the Help! links in the ZMI, if there is no help available. The help system depends on the product registry.

- Updated the quick start page and simplified the standard content. The default index_html is now a page template.

- Removed deprecated Draft and Version support from Products.OFSP. Also removed version handling from the control panel. Versions are no longer supported on the ZODB level.

- Removed left-overs of the deprecated persistent product distribution mechanism.
parent 1ae96944
......@@ -9,6 +9,19 @@ Zope Changes
Restructuring
- No longer show the Help! links in the ZMI, if there is no help
available. The help system depends on the product registry.
- Updated the quick start page and simplified the standard content.
The default index_html is now a page template.
- Removed deprecated Draft and Version support from Products.OFSP.
Also removed version handling from the control panel. Versions are
no longer supported on the ZODB level.
- Removed left-overs of the deprecated persistent product distribution
mechanism.
- The persistent product registry is not required for starting Zope
anymore. `enable-product-installation` can be set to off if you don't
rely on the functionality provided by the registry.
......
......@@ -24,7 +24,6 @@ add_mailhost_objects='Add MailHost objects'
add_page_templates='Add Page Templates'
add_python_scripts='Add Python Scripts'
add_user_folders='Add User Folders'
add_versions='Add Versions'
add_vocabularies='Add Vocabularies'
add_z_gadfly_database_connections='Add Z Gadfly Database Connections'
add_zcatalogs='Add ZCatalogs'
......@@ -36,7 +35,6 @@ change_database_methods='Change Database Methods'
change_external_methods='Change External Methods'
change_images_and_files='Change Images and Files'
change_python_scripts='Change Python Scripts'
change_versions='Change Versions'
change_configuration='Change configuration'
change_page_templates='Change Page Templates'
change_permissions='Change permissions'
......@@ -47,7 +45,6 @@ delete_objects='Delete objects'
edit_factories='Edit Factories'
ftp_access='FTP access'
import_export_objects='Import/Export objects'
join_leave_versions='Join/leave Versions'
manage_vocabulary='Manage Vocabulary'
manage_zcatalog_entries='Manage ZCatalog Entries'
manage_zcatalog_indexes='Manage ZCatalogIndex Entries'
......@@ -56,7 +53,6 @@ manage_users='Manage users'
open_close_database_connection='Open/Close Database Connection'
open_close_database_connections='Open/Close Database Connections'
query_vocabulary='Query Vocabulary'
save_discard_version_changes='Save/discard Version changes'
search_zcatalog='Search ZCatalog'
take_ownership='Take ownership'
test_database_connections='Test Database Connections'
......
......@@ -28,14 +28,12 @@ from App.CacheManager import CacheManager
from App.class_init import InitializeClass
from App.config import getConfiguration
from App.DavLockManager import DavLockManager
from App.Dialogs import MessageDialog
from App.special_dtml import DTMLFile
from App.Undo import UndoSupport
from App.version_txt import version_txt
from DateTime.DateTime import DateTime
from Lifetime import shutdown
from OFS.Folder import Folder
from OFS.ObjectManager import ObjectManager
from OFS.SimpleItem import Item
from OFS.SimpleItem import SimpleItem
from Product import ProductFolder
......@@ -48,10 +46,8 @@ try: import thread
except: get_ident=lambda: 0
else: get_ident=thread.get_ident
class Fake:
def locked_in_version(self): return 0
class DatabaseManager(Fake, Item, Implicit):
class DatabaseManager(Item, Implicit):
"""Database management (legacy) """
manage = manage_main = DTMLFile('dtml/dbMain', globals())
manage_main._setName('manage_main')
......@@ -87,13 +83,10 @@ class FakeConnection:
def __init__(self, db, parent_jar):
self._db = db
self.version = parent_jar.getVersion()
def db(self):
return self._db
def getVersion(self):
return self.version
class DatabaseChooser(SimpleItem):
"""Lets you choose which database to view
......@@ -146,21 +139,12 @@ class DatabaseChooser(SimpleItem):
InitializeClass(DatabaseChooser)
class VersionManager(Fake, Item, Implicit):
class VersionManager(Item, Implicit):
"""Version management"""
manage=manage_main = DTMLFile('dtml/versionManager', globals())
manage_main._setName('manage_main')
id ='Versions'
name=title='Version Management'
meta_type ='Version Management'
icon='p_/VersionManagement_icon'
manage_options=(
(
{'label':'Version', 'action':'manage_main',
'help':('OFSP','Version-Management_Version.stx')},
)
)
InitializeClass(VersionManager)
......@@ -171,7 +155,7 @@ InitializeClass(VersionManager)
_v_rcs=None
_v_rst=None
class DebugManager(Fake, Item, Implicit):
class DebugManager(Item, Implicit):
"""Debug and profiling information"""
manage=manage_main = DTMLFile('dtml/debug', globals())
manage_main._setName('manage_main')
......@@ -190,7 +174,7 @@ class DebugManager(Fake, Item, Implicit):
manage_debug = DTMLFile('dtml/debug', globals())
def refcount(self, n=None, t=(type(Fake), type(Implicit))):
def refcount(self, n=None, t=(type(Implicit), )):
# return class reference info
dict={}
for m in sys.modules.values():
......@@ -286,7 +270,6 @@ class ApplicationManager(Folder,CacheManager):
__roles__=('Manager',)
isPrincipiaFolderish=1
Database= DatabaseChooser('Database') #DatabaseManager()
Versions= VersionManager()
DebugInfo=DebugManager()
DavLocks = DavLockManager()
......@@ -305,8 +288,6 @@ class ApplicationManager(Folder,CacheManager):
_objects=(
{'id': 'Database',
'meta_type': Database.meta_type},
{'id': 'Versions',
'meta_type': Versions.meta_type},
{'id': 'DavLocks',
'meta_type': DavLocks.meta_type},
{'id': 'Products',
......@@ -339,22 +320,6 @@ class ApplicationManager(Folder,CacheManager):
def __init__(self):
self.Products=ProductFolder()
# Note by brian:
#
# This __setstate__ does not seem to work - it creates a new ProductFolder
# and adds it to the CP instance if needed, but the resulting PF does not
# seem to be persistent ;( Rather than spend much time figuring out why,
# I just added a check in Application.open_bobobase to create the PF if
# it is needed (this is where several other b/c checks are done anyway.)
#
#
# def __setstate__(self, v):
# ApplicationManager.inheritedAttribute('__setstate__')(self, v)
# if not hasattr(self, 'Products'):
# self.Products=ProductFolder()
def _canCopy(self, op=0):
return 0
......@@ -467,36 +432,6 @@ class ApplicationManager(Folder,CacheManager):
info.append(data.strip())
return info
def version_info(self):
r=[]
try: db=self._p_jar.db()
except: raise ValueError, """
Sorry, <em>Version management</em> is only supported if you use ZODB 3.
"""
for v in db.versions():
if db.versionEmpty(v): continue
r.append({'id': v})
return r
@requestmethod('POST')
def manage_saveVersions(self, versions, REQUEST=None):
"Commit some versions"
db=self._p_jar.db()
for v in versions:
db.commitVersion(v)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(REQUEST['URL1']+'/manage_main')
@requestmethod('POST')
def manage_discardVersions(self, versions, REQUEST=None):
"Discard some versions"
db=self._p_jar.db()
for v in versions:
db.abortVersion(v)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(REQUEST['URL1']+'/manage_main')
def getSOFTWARE_HOME(self):
return getConfiguration().softwarehome
......
......@@ -41,9 +41,6 @@ class CacheManager:
def _getDB(self):
return self._p_jar.db()
def _inVersion(self):
return self._p_jar.getVersion() and True or False
def cache_length(self):
return self._getDB().cacheSize()
......@@ -54,20 +51,13 @@ class CacheManager:
return self._getDB().objectCount()
def cache_age(self):
if self._inVersion():
return self._vcache_age
else:
return self._cache_age
return self._cache_age
def manage_cache_age(self,value,REQUEST):
"set cache age"
db = self._getDB()
if self._inVersion():
self._vcache_age = value
db.setVersionCacheDeactivateAfter(value)
else:
self._cache_age = value
db.setCacheDeactivateAfter(value)
self._cache_age = value
db.setCacheDeactivateAfter(value)
if REQUEST is not None:
response=REQUEST['RESPONSE']
......@@ -75,18 +65,12 @@ class CacheManager:
def cache_size(self):
db = self._getDB()
if self._inVersion():
return db.getVersionCacheSize()
else:
return db.getCacheSize()
return db.getCacheSize()
def manage_cache_size(self,value,REQUEST):
"set cache size"
db = self._getDB()
if self._inVersion():
db.setVersionCacheSize(value)
else:
db.setCacheSize(value)
db.setCacheSize(value)
if REQUEST is not None:
response=REQUEST['RESPONSE']
......
......@@ -43,8 +43,6 @@ class DavLockManager(Item, Implicit):
'help': ('OFSP', 'DavLocks-ManageLocks.stx'), },
)
def locked_in_version(self): return 0
def findLockedObjects(self, frompath=''):
app = self.getPhysicalRoot()
......
......@@ -30,45 +30,6 @@ class PersistentUtil:
t = 0
return DateTime(t)
def locked_in_version(self):
"""Was the object modified in any version?
"""
import Globals # for data
jar=self._p_jar
oid=self._p_oid
if jar is None or oid is None: return None
try: mv=jar.modifiedInVersion
except: pass
else: return mv(oid)
# BoboPOS 2 code:
oid=self._p_oid
return (oid
and Globals.VersionBase.locks.has_key(oid)
and Globals.VersionBase.verify_lock(oid)
and 'some version')
def modified_in_version(self):
"""Was the object modified in this version?
"""
jar=self._p_jar
oid=self._p_oid
if jar is None or oid is None: return None
try: mv=jar.modifiedInVersion
except: pass
else: return mv(oid)==jar.getVersion()
# BoboPOS 2 code:
jar=self._p_jar
if jar is None:
if hasattr(self,'aq_parent') and hasattr(self.aq_parent, '_p_jar'):
jar=self.aq_parent._p_jar
if jar is None: return 0
if not jar.name: return 0
try: jar.db[self._p_oid]
except: return 0
return 1
_patched = False
......
......@@ -34,10 +34,7 @@
# on restart if there is still a product directory.
import cPickle
import os
import re
import zlib
import transaction
......@@ -86,27 +83,6 @@ class Product(Folder, PermissionManager):
configurable_objects_=()
import_error_=None
def new_version(self,
_intending=re.compile(r"[0-9]+").search, #TS
):
# Return a new version number based on the existing version.
v=str(self.version)
if not v: return '1.0'
match = _intending(v)
if match is None:
return v
while 1:
# Find the last set of digits.
m = _intending(v, match.end())
if m is None:
break
else:
match = m
start = match.start()
end = match.end()
return v[:start] + str(1 + int(v[start:end])) + v[end:]
meta_types=(
PermissionManager.meta_types
)
......@@ -228,65 +204,6 @@ class Product(Folder, PermissionManager):
InitializeClass(Product)
class CompressedOutputFile:
def __init__(self, rot):
self._c=zlib.compressobj()
self._r=[]
self._rot=rot
rot.encrypt('')
def write(self, s):
self._r.append(self._rot.encryptmore(self._c.compress(s)))
def getdata(self):
self._r.append(self._rot.encryptmore(self._c.flush()))
return ''.join(self._r)
class CompressedInputFile:
_done=0
def __init__(self, f, rot):
self._c=zlib.decompressobj()
self._b=''
if isinstance(rot, str):
import rotor
rot=rotor.newrotor(rot)
self._rot=rot
rot.decrypt('')
self._f=f
def _next(self):
if self._done: return
l=self._f.read(8196)
if not l:
l=self._c.flush()
self._done=1
else:
l=self._c.decompress(self._rot.decryptmore(l))
self._b=self._b+l
def read(self, l=None):
if l is None:
while not self._done: self._next()
l=len(self._b)
else:
while l > len(self._b) and not self._done: self._next()
r=self._b[:l]
self._b=self._b[l:]
return r
def readline(self):
l=self._b.find('\n')
while l < 0 and not self._done:
self._next()
l=self._b.find('\n')
if l < 0: l=len(self._b)
else: l=l+1
r=self._b[:l]
self._b=self._b[l:]
return r
def initializeProduct(productp, name, home, app):
# Initialize a levered product
import Globals # to set data
......@@ -318,15 +235,8 @@ def initializeProduct(productp, name, home, app):
return old
except: pass
try:
f=CompressedInputFile(open(home+'/product.dat','rb'), name+' shshsh')
except:
f=fver and (" (%s)" % fver)
product=Product(name, 'Installed product %s%s' % (name,f))
else:
meta=cPickle.Unpickler(f).load()
product=app._p_jar.importFile(f)
product._objects=meta['_objects']
f = fver and (" (%s)" % fver)
product=Product(name, 'Installed product %s%s' % (name,f))
if old is not None:
app._manage_remove_product_meta_type(product)
......@@ -336,7 +246,6 @@ def initializeProduct(productp, name, home, app):
except: pass
products._setObject(name, product)
#product.__of__(products)._postCopy(products)
product.icon='p_/InstalledProduct_icon'
product.version=fver
product.home=home
......
......@@ -136,15 +136,6 @@ functions such as database and product management.
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
&dtml-title;
</a>
<dtml-if locked_in_version>
<dtml-if modified_in_version>
<img src="&dtml-BASEPATH1;/p_/locked"
alt="This item has been modified in this version" />
<dtml-else>
<img src="&dtml-BASEPATH1;/p_/lockedo"
alt="This item has been modified in another version" />
</dtml-if>
</dtml-if>
</div>
</td>
</tr>
......
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p class="form-help">
You can create a packaged version of this product that can be
distributed to other Zope users using the form below.
</p>
<form action="manage_distribute" method="post">
<table>
<tr>
<td align="left" valign="top">
<div class="form-label">
Version
</div>
</td>
<td align="left" valign="top">
<input type="text" name="version" value="&dtml-new_version;">
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Policy
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<input type="radio" name="redistributable" value="1" checked>
Allow redistribution
<br />
<input type="radio" name="redistributable" value="0"> Disallow
redistribution and allow user to configure
<br />&nbsp;&nbsp;&nbsp;&nbsp;
only the objects selected below
</div>
</td>
</tr>
<tr>
<td></td>
<td align="left" valign="top">
<select name="configurable_objects:list" size=10 multiple>
<dtml-in objectItems>
<option value="&dtml-sequence-key;" <dtml-
if "_['sequence-key'] in configurable_objects_"
>SELECTED</dtml-if>>&dtml-title_and_id;</option>
</dtml-in>
</select>
</td>
</tr>
<tr>
<td></td>
<td align="left" valign="top">
<div class="form-element">
<input type="submit" name="submit" value="Create distribution archive">
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
......@@ -9,7 +9,9 @@
<td align="right" valign="top">
<div class="std-text">
<dtml-if expr="help_topic and help_product">
<dtml-var "container.HelpSys.helpLink(help_product, help_topic)">
<dtml-if expr="container.HelpSys.helpLink(help_product, help_topic)">
<dtml-var "container.HelpSys.helpLink(help_product, help_topic)">
</dtml-if>
<dtml-else>
&nbsp;
</dtml-if>
......
......@@ -119,16 +119,6 @@
</dtml-if>
at <dtml-var expr="tabs_path_default(REQUEST)">
</strong>
<dtml-if locked_in_version>
<dtml-if modified_in_version>
<img src="&dtml-BASEPATH1;/p_/locked"
alt="This item has been modified in this version" />
<dtml-else>
<img src="&dtml-BASEPATH1;/p_/lockedo"
alt="This item has been modified in another version" />
(<em>&dtml-locked_in_version;</em>)
</dtml-if>
</dtml-if>
<dtml-if wl_isLocked>
<img src="&dtml-BASEPATH1;/p_/davlocked"
alt="This item has been locked by WebDAV"
......@@ -137,32 +127,31 @@
</div>
</td>
<dtml-if "_.has_key('help_topic') and _.has_key('help_product')">
<dtml-if "HelpSys.helpLink(help_product, help_topic)">
<td align="right" valign="top">
<div class="std-text">
<dtml-var "HelpSys.helpLink(help_product, help_topic)">
</div>
</td>
</dtml-if>
<dtml-else>
<dtml-if manage_options>
<dtml-with "_(option=manage_options[a_])">
<dtml-if "option.has_key('help')">
<dtml-if "HelpSys.helpLink(option['help'][0], option['help'][1])">
<td align="right" valign="top">
<div class="std-text">
<dtml-var "HelpSys.helpLink(option['help'][0], option['help'][1])">
</div>
</td>
</dtml-if>
</dtml-if>
</dtml-with>
</dtml-if>
</dtml-if>
</tr>
</table>
<dtml-if Zope-Version>
<div class="system-msg">
<em>You are currently working in version <a href="&dtml-SERVER_URL;&dtml-Zope-Version;/manage_main">&dtml-Zope-Version;</a></em>
</div>
</dtml-if>
</dtml-unless>
<dtml-if manage_tabs_message>
......
......@@ -19,7 +19,6 @@ height="32" width="90" border="0" alt="" />
<span class="std-text">Logged in as <strong>&dtml-AUTHENTICATED_USER;</strong></span> &nbsp;&nbsp;
<select class="form-element" name=":action" onChange="window.parent.manage_main.location.href='&dtml-BASEPATH1;/'+this.options[this.selectedIndex].value">
<option value="zope_quick_start">Zope Quick Start</option>
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
<option value="manage_zmi_prefs">Set Preferences</option>
<option value="manage_zmi_logout">Logout</option>
......
......@@ -73,7 +73,6 @@ td {
<span class="std-text">Logged in as <strong>&dtml-AUTHENTICATED_USER;</strong></span> &nbsp;&nbsp;
<br />
<select class="form-element" name=":action" onChange="window.parent.manage_main.location.href='&dtml-BASEPATH1;/'+this.options[this.selectedIndex].value">
<option value="zope_quick_start">Zope Quick Start</option>
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
<option value="manage_zmi_prefs">Set Preferences</option>
<option value="manage_zmi_logout">Logout</option>
......
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-if version_info>
<p class="form-help">
Select one or more versions below and then click on the &quot;Save&quot;
button to save the versions or click on the &quot;Discard&quot; button to
discard changes made in the versions.
</p>
<form action="&dtml-URL1;" method="post">
<table>
<dtml-in version_info mapping>
<tr>
<td align="left" valign="top">
<input type="checkbox" name="versions:list" value="&dtml-id;">
</td>
<td align="left" valign="top">
<div class="form-text">
<a href="&dtml-id;/manage_workspace">&dtml-id;</a>
</div>
</td>
</tr>
</dtml-in>
<tr>
<td></td>
<td align="left" valign="top">
<div class="form-element">
<input type="submit" name="manage_saveVersions:method" value=" Save ">
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="submit" name="manage_discardVersions:method" value="Discard">
</div>
</td>
</tr>
</table>
</form>
<dtml-else>
<p class="form-help">
There are no non-empty versions.
</p>
</dtml-if>
<dtml-var manage_page_footer>
......@@ -2,27 +2,13 @@
<html>
<head>
<title>Zope QuickStart</title>
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')"
is_nav4="ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0"
zmi_embedded_css="1">
<dtml-if is_nav4>
<style type="text/css">
<!--
<dtml-var manage_page_style.css>
-->
</style>
<dtml-else>
<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">
<dtml-var "manage_form_title(this(), _,
form_title='Zope Quick Start',
)">
)">
<dtml-if expr="not PARENTS[0].acl_users.hasUsers()">
<div class="system-msg">
......@@ -33,17 +19,10 @@ user account.
</h3>
<p>
If you're running Zope on UNIX or Linux, you can create an administrative
user account via the "zopectl adduser" 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 order to log in.</b>
</p>
<p>
If you're running Zope on Windows, you'll need to use the "zpasswd.py" utility
to create a file named <i>inituser</i> in your Zope instance home at
<i><dtml-var "Control_Panel.getINSTANCE_HOME()"></i> that contains the
initial administrative username and password.
You can create an administrative user account via the "zopectl adduser"
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
order to log in.</b>
</p>
</div>
......@@ -65,15 +44,6 @@ web applications.
</p>
</li>
<li>
<p>
<a href="manage_importObject?file=Examples.zexp&amp;set_owner:int=1">Import</a>
and then check out the <b>new</b> <a href="Examples">example Zope
applications</a>. These examples show you simple working Zope
applications that you can copy and modify.
</p>
</li>
<li>
<p>
Go to the main <a href="http://www.zope.org/Documentation/" target="_new">
......@@ -92,30 +62,11 @@ users from around the world.
</p>
</li>
<li>
<p>
Browse and search the integrated, <a href="HelpSys" target="zope_help">
Online Help System</a> which contains documentation on
the various kinds of components you'll find in Zope.
</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. <strong>NOTE: Some versions of Microsoft Internet Explorer,
(specifically IE 5.01 and early versions of IE 5.5) may have problems
displaying Zope management pages. If you cannot view the management pages,
try upgrading your IE installation to the latest release version, or use
a different browser.</strong>
</p>
</li>
<li>
<p>
Find out about <a href="http://www.zope.com/" target="_new">Zope
Corporation</a>, the publishers of Zope.
right away.
</p>
</li>
......
......@@ -51,14 +51,6 @@ class IPersistentExtra(Interface):
"""
"""
def locked_in_version():
"""Was the object modified in any version?
"""
def modified_in_version():
"""Was the object modified in this version?
"""
# XXX: might contain non-API methods and outdated comments;
# not synced with ZopeBook API Reference;
......
......@@ -19,32 +19,24 @@ import unittest
class DummyConnection:
def __init__(self, db, version=None):
def __init__(self, db):
self.__db = db
self.__version = version
def db(self):
return self.__db
def getVersion(self):
return self.__version
class DummyDB:
def __init__(self, cache_size, vcache_size):
self._set_sizes(cache_size, vcache_size)
def __init__(self, cache_size):
self._set_sizes(cache_size)
def _set_sizes(self, cache_size, vcache_size):
def _set_sizes(self, cache_size):
self.__cache_size = cache_size
self.__vcache_size = vcache_size
def getCacheSize(self):
return self.__cache_size
def getVersionCacheSize(self):
return self.__vcache_size
class CacheManagerTestCase(unittest.TestCase):
......@@ -57,27 +49,14 @@ class CacheManagerTestCase(unittest.TestCase):
self._p_jar = connection
return TestCacheManager
def _makeThem(self):
manager = self._getManagerClass()(connection)
return db, connection, manager
def test_cache_size(self):
db = DummyDB(42, 24)
db = DummyDB(42)
connection = DummyConnection(db)
manager = self._getManagerClass()(connection)
self.assertEqual(manager.cache_size(), 42)
db._set_sizes(12, 2)
db._set_sizes(12)
self.assertEqual(manager.cache_size(), 12)
def test_version_cache_size(self):
db = DummyDB(42, 24)
connection = DummyConnection(db, "my version")
manager = self._getManagerClass()(connection)
# perform test
self.assertEqual(manager.cache_size(), 24)
db._set_sizes(12, 2)
self.assertEqual(manager.cache_size(), 2)
def test_suite():
return unittest.makeSuite(CacheManagerTestCase)
......@@ -112,6 +112,9 @@ class HelpSys(Implicit, ObjectManager, Item, Persistent):
# Generate an <a href...> tag linking to a help topic. This
# is a little lighter weight than the help button approach.
basepath=self.REQUEST['BASEPATH1']
products = self.Control_Panel.Products.objectIds()
if product not in products:
return None
help_url='%s/Control_Panel/Products/%s/Help/%s' % (
basepath,
product,
......
......@@ -118,7 +118,7 @@ class ObjectRef(HelpBase):
def hs_search_mod(self, mod, dict):
# Root through a module for things that look like
# createable object classes.
hidden=('Control Panel', 'Principia Draft', 'simple item',
hidden=('Control Panel', 'simple item',
'Broken Because Product is Gone')
for k, v in mod.__dict__.items():
if is_class(v) and hasattr(v, 'meta_type') and \
......
......@@ -753,7 +753,6 @@ def install_package(app, module, init_func, raise_exc=False, log_exc=True):
def install_standards(app):
# Check to see if we've already done this before
# Don't do it twice (Casey)
if getattr(app, '_standard_objects_have_been_added', 0):
return
......@@ -763,22 +762,21 @@ def install_standards(app):
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
std_dir = os.path.join(package_home(globals()), 'standard')
wrote = 0
wrote = False
for fn in os.listdir(std_dir):
base, ext = os.path.splitext(fn)
if ext == '.dtml':
ob = DTMLFile(base, std_dir)
fn = base
if hasattr(app, fn):
if hasattr(app, base):
continue
ob = DTMLFile(base, std_dir)
app.manage_addProduct['OFSP'].manage_addDTMLMethod(
id=fn, file=open(ob.raw))
id=base, file=open(ob.raw))
elif ext in ('.pt', '.zpt'):
ob = PageTemplateFile(fn, std_dir, __name__=fn)
if hasattr(app, fn):
if hasattr(app, base):
continue
ob = PageTemplateFile(fn, std_dir, __name__=fn)
app.manage_addProduct['PageTemplates'].manage_addPageTemplate(
id=fn, title='', text=open(ob.filename))
id=base, title='', text=open(ob.filename))
elif ext in ('.ico', '.gif', '.png'):
if hasattr(app, fn):
continue
......@@ -786,10 +784,7 @@ def install_standards(app):
id=fn, title='', file=open(os.path.join(std_dir, fn)))
else:
continue
wrote = 1
# Below is icky and sneaky since it makes these impossible to delete
#ob.__replaceable__ = Globals.REPLACEABLE
#setattr(Application, fn, ob)
wrote = True
if wrote:
app._standard_objects_have_been_added = 1
transaction.get().note('Installed standard objects')
......
......@@ -154,16 +154,6 @@ function toggleSelect() {
<a href="&dtml.url_quote-sequence-key;/manage_workspace">
&dtml-sequence-key; <dtml-if title>(&dtml-title;)</dtml-if>
</a>
<dtml-if locked_in_version>
<dtml-if modified_in_version>
<img src="&dtml-BASEPATH1;/p_/locked"
alt="This item has been modified in this version" />
<dtml-else>
<img src="&dtml-BASEPATH1;/p_/lockedo"
alt="This item has been modified in another version" />
(<em>&dtml-locked_in_version;</em>)
</dtml-if>
</dtml-if>
<dtml-try>
<dtml-if "wl_isLocked()==1">
<img src="/p_/davlocked">
......
......@@ -25,12 +25,6 @@
<dtml-var manage_tabs>
</dtml-with>
<dtml-if Principia-Version>
<p>
<em>You are currently working in version &dtml-Principia-Version;</em>
</p>
</dtml-if Principia-Version>
<form action="&dtml-URL1;" method="post">
<dtml-if propertyMap>
<p class="form-help">
......
......@@ -6,12 +6,6 @@
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
<dtml-var manage_tabs>
<dtml-if Principia-Version>
<p>
<em>You are currently working in version &dtml-Principia-Version;</em>
</p>
</dtml-if Principia-Version>
<dtml-unless props>
<dtml-if ids>
<dtml-call expr="REQUEST.set('props', [])">
......
......@@ -47,7 +47,6 @@ class p_:
ControlPanel_icon=ImageFile('OFS/www/ControlPanel_icon.gif')
ApplicationManagement_icon=ImageFile('App/www/cpSystem.gif')
DatabaseManagement_icon=ImageFile('App/www/dbManage.gif')
VersionManagement_icon=ImageFile('App/www/vManage.gif')
DebugManager_icon=ImageFile('App/www/DebugManager_icon.gif')
InstalledProduct_icon=ImageFile('App/www/installedProduct.gif')
BrokenProduct_icon=ImageFile('App/www/brokenProduct.gif')
......
<tal:text tal:replace="structure context/zope_quick_start" />
<dtml-var standard_html_header>
<html>
<head><title>&dtml-title_or_id;</title></head>
<body bgcolor="#FFFFFF">
<dtml-if error_message>
<dtml-var error_message>
......@@ -44,4 +46,5 @@
</dtml-if>
<dtml-var standard_html_footer>
</body>
</html>
<html>
<head><title>&dtml-title_or_id;</title></head>
<body bgcolor="#FFFFFF">
\ No newline at end of file
<html metal:define-macro="page">
<head>
<metal:block define-slot="head">
<title tal:content="template/title">The Title</title>
</metal:block>
</head>
<body>
<div metal:define-slot="body">
This is where the page's body text goes.
</div>
</body>
</html>
......@@ -209,14 +209,10 @@ class TestInitialization( unittest.TestCase ):
self.configure(good_cfg)
i = self.getOne()
i.install_products() # required
i .install_standards()
i.install_standards()
app = i.getApp()
self.assertEqual(app.index_html.meta_type, 'DTML Method')
self.assertEqual(app.index_html.meta_type, 'Page Template')
self.assertEqual(app.standard_error_message.meta_type, 'DTML Method')
self.assertEqual(app.standard_html_header.meta_type, 'DTML Method')
self.assertEqual(app.standard_html_footer.meta_type, 'DTML Method')
self.assertEqual(getattr(app, 'standard_template.pt').meta_type,
'Page Template')
self.failUnless(hasattr(app, '_standard_objects_have_been_added'))
......
......@@ -15,11 +15,6 @@
<five:deprecatedManageAddDelete
class="OFS.Cache.CacheManager"/>
<five:deprecatedManageAddDelete
class="Products.OFSP.Draft.Draft"/>
<five:deprecatedManageAddDelete
class="Products.OFSP.Version.Version"/>
<five:deprecatedManageAddDelete
class="Products.PythonScripts.PythonScript.PythonScript"/>
......
......@@ -19,12 +19,9 @@ $Id$
"""
import os
import glob
import warnings
import logging
import App.config
from App.Product import initializeProduct
from App.ProductContext import ProductContext
import Products
import Zope2
......
......@@ -12,185 +12,21 @@
##############################################################################
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.User import UserFolder
from App.class_init import InitializeClass
from App.special_dtml import HTMLFile
from Acquisition import Implicit
from OFS.SimpleItem import Item
from Persistence import Persistent
manage_addPrincipiaDraftForm = HTMLFile('dtml/draftAdd',globals())
def manage_addPrincipiaDraft(self, id, baseid, PATH_INFO, REQUEST=None):
"Add a draft object"
self._setObject(id, Draft(id, baseid, PATH_INFO))
if REQUEST is not None:
return self.manage_main(self,REQUEST)
class Draft(Persistent, Implicit, Item):
"Daft objects"
_refid = ''
_version = '/version'
meta_type = 'Zope Draft'
class Draft(Persistent, Item):
"Draft objects"
meta_type = 'Zope Draft'
security = ClassSecurityInfo()
def __init__(self, id, baseid, PATH_INFO):
self.id = id
self._refid = baseid
version = PATH_INFO
l = version.rfind('/')
if l >= 0:
version = version[:l]
self._version = "%s/%s" % (version, id)
self.users__draft__ = uf = UserFolder()
self.__allow_groups__ = uf
def icon(self):
try:
return getattr(self.aq_parent.aq_base,self._refid).icon
except:
return 'p_/broken'
def manage_options(self):
try:
return getattr(self.aq_parent.aq_base,self._refid).manage_options
except:
return ()
def title(self):
return 'draft of '+self._refid
def title_and_id(self):
nonempty = self.nonempty()
if nonempty:
return ('draft of %s (%s)'
'</a> <a href="%s/users__draft__/manage_main">[Users]'
'</a> <a href="%s/manage_approve__draft__">[Approve]'
% (self._refid, self.id,
self.id,
self.id,
))
else:
return ('draft of %s (%s)'
'</a> <a href="%s/users__draft__/manage_main">[Users]'
% (self._refid, self.id,
self.id,
))
def _getVersionBase(self):
import Globals # for data
versionbase = getattr(Globals, 'VersionBase', {})
return versionbase.get(self._version)
def _bobo_traverse__(self, REQUEST, name):
if name[-9:] == '__draft__':
return getattr(self, name)
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vb = self._getVersionBase()
jar = vb and vb.jar
else:
# ZODB 3
jar = db.open(self._version)
cleanup = Cleanup(jar)
REQUEST[Cleanup] = cleanup
dself = getdraft(self, jar)
ref = getattr(dself.aq_parent.aq_base,dself._refid
).aq_base.__of__(dself)
if hasattr(ref, name):
return dself, ref, getattr(ref, name)
return getattr(self, name)
def nonempty(self):
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vb = self._getVersionBase()
return vb and vb.nonempty()
else:
# ZODB 3
return not db.versionEmpty(self._version)
security.declareProtected('Approve draft changes',
'manage_approve__draft__')
manage_approve__draft__ = HTMLFile('dtml/draftApprove', globals())
security.declareProtected('Approve draft changes',
'manage_Save__draft__')
def manage_Save__draft__(self, remark, REQUEST=None):
"""Make version changes permanent"""
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vb = self._getVersionBase()
vb.commit(remark)
else:
# ZODB 3
s = self._version
d = self._p_jar.getVersion()
if d == s:
d = ''
db.commitVersion(s, d)
if REQUEST:
REQUEST['RESPONSE'].redirect(REQUEST['URL2']+'/manage_main')
security.declareProtected('Approve draft changes',
'manage_Discard__draft__')
def manage_Discard__draft__(self, REQUEST=None):
'Discard changes made during the version'
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vb = self._getVersionBase()
vb.abort()
else:
# ZODB 3
db.abortVersion(self._version)
if REQUEST:
REQUEST['RESPONSE'].redirect(REQUEST['URL2']+'/manage_main')
def manage_afterClone(self, item):
self._version = ''
def manage_afterAdd(self, item, container):
if not self._version:
self._version = self.absolute_url(1)
def manage_beforeDelete(self, item, container):
if self.nonempty():
raise ValueError, (
'Attempt to %sdelete a non-empty version.<p>'
((self is not item) and 'indirectly ' or ''))
return 'p_/broken'
InitializeClass(Draft)
def getdraft(ob, jar):
if hasattr(ob,'aq_parent'):
return getdraft(ob.aq_self, jar).__of__(getdraft(ob.aq_parent, jar))
if hasattr(ob,'_p_oid'):
ob = jar[ob._p_oid]
return ob
class Cleanup:
def __init__(self, jar):
self._jar = jar
def __del__(self):
self._jar.close()
OFSP
ODFS Providers Draft Folders and Versions.
OFSP registers common OFS types and provides the general Zope help.
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
#
# 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
#
##############################################################################
"""Backward compatability!
"""
from Version import Version
Session=Version
# install __init__.py
# install Draft.py
# install draftAdd.dtml
# install draftApprove.dtml
# install Session.py
# install session.dtml
# install sessionAdd.dtml
# install sessionEdit.dtml
# install images
......@@ -14,249 +14,28 @@
__version__='$Revision: 1.55 $'[11:-2]
from cgi import escape
import time
from AccessControl.Permissions import change_versions
from AccessControl.Permissions import join_leave_versions
from AccessControl.Permissions import save_discard_version_changes
from AccessControl.Permissions import view_management_screens
from AccessControl.Role import RoleManager
from AccessControl.SecurityInfo import ClassSecurityInfo
from Acquisition import Implicit
from App.class_init import InitializeClass
from App.Dialogs import MessageDialog
from App.special_dtml import DTMLFile
from App.special_dtml import HTML
from OFS.SimpleItem import Item
from Persistence import Persistent
from OFS.ObjectManager import BeforeDeleteException
import transaction
class VersionException(BeforeDeleteException):
pass
manage_addVersionForm = DTMLFile('dtml/versionAdd', globals())
def manage_addVersion(self, id, title, REQUEST=None):
""" """
id=str(id)
title=str(title)
self=self.this()
self._setObject(id, Version(id,title,REQUEST))
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(self.absolute_url()+'/manage_main')
class Version(Persistent,Implicit,RoleManager,Item):
class Version(Persistent, Item):
""" """
meta_type='Version'
security = ClassSecurityInfo()
security.declareObjectProtected(view_management_screens)
manage_options=(
(
{'label':'Join/Leave', 'action':'manage_main',
'help':('OFSP','Version_Join-Leave.stx')},
{'label':'Save/Discard', 'action':'manage_end',
'help':('OFSP','Version_Save-Discard.stx')},
{'label':'Properties', 'action':'manage_editForm',
'help':('OFSP','Version_Properties.stx')},
)
+RoleManager.manage_options
+Item.manage_options
)
security.declareProtected(view_management_screens, 'manage')
cookie=''
index_html=None # Ugh.
def __init__(self, id, title, REQUEST):
self.id=id
self.title=title
security.declareProtected(join_leave_versions, 'manage_main')
manage_main = DTMLFile('dtml/version', globals())
security.declareProtected(save_discard_version_changes, 'manage_end')
manage_end = DTMLFile('dtml/versionEnd', globals())
security.declareProtected(view_management_screens, 'manage_editForm')
manage_editForm = DTMLFile('dtml/versionEdit', globals())
def _getVersionBaseCookie(self):
import Globals # for data
versionbase = getattr(Globals, 'VersionBase', {})
return versionbase.get(self.cookie)
def title_and_id(self):
r = Version.inheritedAttribute('title_and_id')(self)
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vbc = self._getVersionBaseCookie()
if vbc and vbc.nonempty():
return '%s *' % r
else:
# ZODB 3
if not db.versionEmpty(self.cookie):
return '%s *' % r
return r
def om_icons(self):
"""Return a list of icon URLs to be displayed by an ObjectManager"""
return ({'path': 'misc_/OFSP/version.gif',
'alt': self.meta_type, 'title': self.meta_type},
{'path': 'misc_/PageTemplates/exclamation.gif',
'alt': 'Deprecated object',
'title': 'Version objects are deprecated '
'and should not be used anyore.'},)
security.declareProtected(change_versions, 'manage_edit')
def manage_edit(self, title, REQUEST=None):
""" """
self.title=title
if REQUEST: return MessageDialog(
title ='Success!',
message='Your changes have been saved',
action ='manage_main')
security.declareProtected(join_leave_versions, 'enter')
def enter(self, REQUEST, RESPONSE):
"""Begin working in a version.
"""
import Globals # for data
RESPONSE.setCookie(
Globals.VersionNameName, self.cookie,
path=(REQUEST['BASEPATH1'] or '/'),
)
if (REQUEST.has_key('SERVER_SOFTWARE') and
REQUEST['SERVER_SOFTWARE'][:9]=='Microsoft'):
# IIS doesn't handle redirect headers correctly
return MessageDialog(
action=REQUEST['URL1']+'/manage_main',
message=('If cookies are enabled by your browser, then '
'you should have joined version %s.'
% escape(self.id))
)
return RESPONSE.redirect(REQUEST['URL1']+'/manage_main')
security.declareProtected(join_leave_versions, 'leave')
def leave(self, REQUEST, RESPONSE):
"""Temporarily stop working in a version
"""
import Globals # for data
RESPONSE.setCookie(
Globals.VersionNameName,'No longer active',
expires="Mon, 25-Jan-1999 23:59:59 GMT",
path=(REQUEST['BASEPATH1'] or '/'),
)
if (REQUEST.has_key('SERVER_SOFTWARE') and
REQUEST['SERVER_SOFTWARE'][:9]=='Microsoft'):
# IIS doesn't handle redirect headers correctly
return MessageDialog(
action=REQUEST['URL1']+'/manage_main',
message=('If cookies are enabled by your browser, then '
'you should have left version %s.'
% escape(self.id))
)
return RESPONSE.redirect(REQUEST['URL1']+'/manage_main')
security.declareProtected(join_leave_versions, 'leave_another')
def leave_another(self, REQUEST, RESPONSE):
"""Leave a version that may not be the current version"""
return self.leave(REQUEST, RESPONSE)
security.declareProtected(save_discard_version_changes, 'save')
def save(self, remark, REQUEST=None):
"""Make version changes permanent"""
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vbc = self._getVersionBaseCookie()
if vbc:
vbc.commit(remark)
else:
# ZODB 3
s=self.cookie
d=self._p_jar.getVersion()
if d==s: d=''
transaction.get().note(remark)
db.commitVersion(s, d)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(REQUEST['URL1']+'/manage_main')
security.declareProtected(save_discard_version_changes, 'discard')
def discard(self, remark='', REQUEST=None):
'Discard changes made during the version'
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vbc = self._getVersionBaseCookie()
if vbc:
vbc.abort()
else:
# ZODB 3
transaction.get().note(remark)
db.abortVersion(self.cookie)
if REQUEST is not None:
REQUEST['RESPONSE'].redirect(REQUEST['URL1']+'/manage_main')
def nonempty(self):
try:
db = self._p_jar.db()
except:
# BoboPOS 2
vbc = self._getVersionBaseCookie()
return vbc and vbc.nonempty()
else:
# ZODB 3
return not db.versionEmpty(self.cookie)
# Prevent copy/move/rename of versions. It's better that way, really.
def _canCopy(self, op=0):
return 0
def manage_afterClone(self, item):
self.cookie=''
def manage_afterAdd(self, item, container):
if not self.cookie:
# Physical path
self.cookie='/'.join(self.getPhysicalPath())
def manage_beforeDelete(self, item, container):
import Globals # for data
if self.nonempty():
raise VersionException(
'Attempt to %sdelete a non-empty version.<br />' %
((self is not item) and 'indirectly ' or ''))
try:
REQUEST=self.REQUEST
except:
pass
else:
v=self.cookie
if REQUEST.get(Globals.VersionNameName, '') == v:
raise VersionException(
'An attempt was made to delete a version, %s, or an\n'
'object containing %s while\n working in the\n'
'version %s. This would lead to a &quot;version\n'
'paradox&quot;. The object containing the deleted\n'
'object would be locked and it would be impossible\n'
'to clear the lock by saving or discarding the\n'
'version, because the version would no longer\n'
'be accessable.<p>\n'
% (v,v,v))
def icon(self):
return 'p_/broken'
InitializeClass(Version)
......@@ -14,20 +14,13 @@ __doc__='''Object system core
$Id$'''
__version__='$Revision: 1.38 $'[11:-2]
import Version, OFS.Image, OFS.Folder, AccessControl.User
import OFS.Image, OFS.Folder, AccessControl.User
import OFS.DTMLMethod, OFS.DTMLDocument, OFS.PropertySheets
import OFS.OrderedFolder
from AccessControl.Permissions import add_documents_images_and_files
from AccessControl.Permissions import add_folders
from App.ImageFile import ImageFile
misc_={
'version.gif':ImageFile('images/version.gif', globals())
}
# This is the new way to initialize products. It is hoped
# that this more direct mechanism will be more understandable.
def initialize(context):
context.registerClass(
......
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add Draft Object',
)">
<p class="form-help">
A Draft allows you to make a working copy of a Zope object.
After you change the Draft, you can commit the changes to
the original object.
</p>
<form action="manage_addPrincipiaDraft" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Base Object
</div>
</td>
<td align="left" valign="top">
<div class="form-element">
<select name="baseid" size="7">
<dtml-in objectValues sort=title_or_id>
<dtml-unless "meta_type in ('Version', 'Principia Draft', 'User Folder')">
<option value="&dtml-id;">
<dtml-if title>
<dtml-var title size="25" html_quote> (&dtml-id;)
<dtml-else>
&dtml-id;
</dtml-if>
</option>
</dtml-unless>
</dtml-in>
</select>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-if nonempty>
<form action="manage_Save__draft__" method="post">
<h3>Approve</h3>
<p class="form-text">
You can make work done in &dtml-id; (&dtml-title;) permanent by
entering a remark in the space below and then clicking on the <em>approve</em>
button.
<br />
<textarea name=remark rows=10 cols=50></textarea>
<br />
<input type=submit value="Approve">
</form>
<form action="manage_Discard__draft__" method="post">
<h3>Discard</h3>
<p class="form-text">
You can throw away work done in &dtml-id; (&dtml-title;) by
clicking on the <em>discard</em> button.
<br />
<input type=submit value="Discard">
</form>
<dtml-else>
<p class="form-text">
No changes have been made to this object.
</p>
</dtml-if>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3 style="color:red;">Version objects are deprecated and should not be used anymore!</h3>
<dtml-if Zope-Version>
<dtml-if expr="_vars['Zope-Version'] != cookie">
<h3>Another version is active!</h3>
<p class="form-text">
You cannot start working in this version while another version,
<strong>&dtml-Zope-Version;</strong> is active.
Leave <strong>&dtml-Zope-Version;</strong> first and then
you may work in this version.
</p>
<div class="form-element">
<form action="leave_another" method="post">
<input class="form-element" type="submit" name="submit"
value="Quit working in &dtml-Zope-Version;">
</form>
</div>
<dtml-else>
<h3>Active Version Operations</h3>
<p class="form-text">
You <strong>are</strong> currently working in the
&dtml-Zope-Version; version.
</p>
<div class="form-element">
<form action="leave" method="post">
<input class="form-element" type="submit" name="submit"
value="Quit working in &dtml-Zope-Version;">
</form>
</div>
</dtml-if>
<dtml-else>
<h3>Inactive Version Operations</h3>
<p class="form-text">
You <strong>are not</strong> currently working in the
&dtml-title_and_id;
version.
</p>
<div class="form-element">
<form action="enter" method="POST">
<input class="form-element" type="submit" name="submit"
value="Start working in &dtml-title_or_id;">
</form>
</div>
</dtml-if>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add Version',
help_product='OFSP',
help_topic='Version-Add.stx'
)">
<p class="form-help">
A Version allows you to make changes to Zope in a private session. After
you review the changes you can make them live.
</p>
<form action="manage_addVersion" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" value="" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<form action="manage_edit" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
&dtml-id;
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40"
value="&dtml-title;" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value="Save Changes" />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<dtml-if nonempty>
<p class="form-help">
To save work done in version
&dtml-id;<dtml-if Zope-Version><dtml-if "_vars['Zope-Version'] != cookie">
<strong>to version
<em>&dtml-Zope-Version;</em></strong></dtml-if></dtml-if>,
click on the &quot;Save&quot; button. To discard work done in
version &dtml-id;, click on the &quot;Discard&quot; button.
In either case, enter a comment to document the reason for
saving or discarding the version.
</p>
<form action="&dtml-URL1;" method="post">
<textarea name=remark rows=10 cols=50></textarea>
<br />
<table border="0">
<tr>
<td align="left">
<input class="form-element" type="submit" name="save:method"
value="Save" />
</td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td align="right">
<input class="form-element" type="submit" name="discard:method"
value="Discard" />
</td>
</tr>
</table>
</form>
<dtml-else>
<p class="form-help">
No unsaved work has been done in this version.
</p>
</dtml-if>
<dtml-var manage_page_footer>
......@@ -30,9 +30,6 @@ Control Panel - Contents: Zope system controls
'Database Management' -- Provides access to the database
management functions such as packing and cache management.
'Version Management' -- Provides access to version management
functions, including version commit and abort.
'Product Management' -- Provides access to management functions
for installed Zope Products.
......
......@@ -10,8 +10,7 @@ WebDAV Lock Management - Manage Locks
such as crashes, etc. In many cases, locks might just time out
before this becomes a problem. In cases where it's not, this
control panel object may be used to locate locked resources inside
of Zope and clear *ALL* of their WebDAV writelocks. **This does not
clear locks caused by use of Versions**.
of Zope and clear *ALL* of their WebDAV writelocks.
Controls
......
......@@ -17,17 +17,6 @@ ObjectManager - Contents: Edit contained objects.
date. To do so, click on the appropriate column heading. Clicking
a second time on any column heading will reverse the sort on that
field.
Versions
If you are currently working in a version there will be a
notice at the top of the list of objects indicating this.
If there is a red diamond following the name of an object this
indicates that the object has been modified in the version you
are currently working in. If there is a red diamond with a lock
after an object, this indicates the the object has been modified
in another version.
Controls
......
......@@ -25,17 +25,6 @@ ObjectManager with OrderSupport - Contents: Edit contained objects.
in the database and remains fixed until it is changed by another
user.
Versions
If you are currently working in a version there will be a
notice at the top of the list of objects indicating this.
If there is a red diamond following the name of an object this
indicates that the object has been modified in the version you
are currently working in. If there is a red diamond with a lock
after an object, this indicates the the object has been modified
in another version.
Controls
'[Checkbox]' -- Selects the object in order to perform operations
......
......@@ -4,8 +4,4 @@ Product Management: Contains Zope Products.
The Product Management Folder contains installed Zope Products.
There are two types of Zope products, Python Products which are
installed in the filesystem and
Products created through the web.
The notion of installed Zope products is deprecated.
......@@ -2,9 +2,6 @@ Product - Zope extension.
Description
Products allow you to extend Zope by creating new types of addable Zope
objects.
A Product contains other objects such as Factories which allows you
to make your objects available via the product add list.
Products were an old mechanism by which you could extend Zope.
The product concept is deprecated.
Product - Add: Create a Product.
Description
This view allows you to create a new Product.
Controls
'Id' -- The id of the Product.
'Title' -- The optional title of the Product.
'Generate' -- Creates a new Product.
Product - Distribution: Create a Product distribution.
Description
This view allows you to create a distribution from a Product.
A Product Distribution is a packaged version of a Product which is
meant to be shipped to users. A Distribution provides limited
access to the internals of a Product.
Distribution files are installed by unpacking them in the Zope
directory.
Controls
'Version' -- The version of the Product distribution.
'Configurable objects' -- The objects that will be exposed by the
distribution. These will be the objects that will appear when the
distribution is installed as a Zope product.
'Create a distribution archive' -- Creates a distribution file and
downloads it to your local computer.
Version Management - Control Zope versions.
Description
Version Management allows you to control all Zope Versions.
\ No newline at end of file
Version Management - Version: Manage versions.
Description
This view allows you to manage versions.
Controls
Non-empty versions are listed one per line. Click on a version to
edit it.
'[Checkbox]' -- Selects versions.
'Save' -- Commits the selected versions.
'Discard' -- Aborts the selected versions.
Version - Private session.
Description
A Version allows you to make changes to Zope in a private session.
No one else can see changes you make in a Version. Later you can
make your changes public or discard them.
Objects changed in a Version are locked.
Version - Add: Create a new Version
Description
This view allows you to create a new Version.
Controls
'Id' -- The id of the Version.
'Title' -- The optional title of the Version.
'Add' -- Creates a new Version.
Version - Join/Leave: Start/Stop working in a Version.
Description
This view allows you to start and stop working in a private
Version.
When you are working in a version all changes you make will be
hidden from other users. You may join and leave a Version as many
times as necessary until you are ready to commit the Version or
discard it.
Controls
'Start Working in' -- Join the Version.
'Quit Working in' -- Leave the Version.
Version - Properties: Edit Version Properties.
Description
This view allows you to edit the title of a Version.
Controls
'Title' -- The title of the Version.
'Edit' -- Changes the title of the Version.
Version - Save/Discard: Commit/abort Version changes.
Description
This view allows you to commit or discard changes made in a
Version.
Controls
When committing or discarding a Version you can enter comments in
the comments text area.
'Save' -- Commit the changes in the Version and make them public.
'Discard' -- Discard the changes made in the Version.
OFSP-1-0-0
\ No newline at end of file
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