diff --git a/.gitignore b/.gitignore index f7cb6f57b4..bec5382a9b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ .coverage.* .installed*.cfg .mr.developer.cfg +.project +.pydevproject .tox /bin/ /build/ diff --git a/buildout.cfg b/buildout.cfg index f165596598..f633905bec 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,6 +1,5 @@ [buildout] extensions = mr.developer - allow-picked-versions = false develop = . extends = @@ -20,6 +19,17 @@ parts = requirements sources-dir = develop auto-checkout = + zmi.styles + Persistence + AccessControl + Products.BTreeFolder2 + Products.ZCatalog + RestrictedPython + Products.MailHost + Products.PythonScripts + Products.Sessions + Products.TemporaryFolder + Products.SiteErrorLog [testenv] PYTHONHASHSEED = random diff --git a/docs/WHATSNEW.rst b/docs/WHATSNEW.rst index abeb7a261e..44fa1242e3 100644 --- a/docs/WHATSNEW.rst +++ b/docs/WHATSNEW.rst @@ -143,3 +143,11 @@ Zope 4 depends on a new DateTime release. The new release has been optimized for better memory use. Applications using a lot of DateTime values like the Plone CMS have seen total memory usage to decrease by 10% to 20% for medium to large deployments. + + +ZMI overhaul +------------ + +The ZMI (Zope Management Interface) is now styled with Bootstrap. +See :ref:`ZMI-label` for details how to adapt Zope add-on packages to the new +styling. diff --git a/docs/ZMI.rst b/docs/ZMI.rst new file mode 100644 index 0000000000..63d9e605c4 --- /dev/null +++ b/docs/ZMI.rst @@ -0,0 +1,100 @@ +.. _ZMI-label: + +ZMI +=== + +ZMI is an abbreviation for `Zope Management Interface`. This is the user +interface rendered when accessing Zope`s management screens using a web +browser. + +Bootstrap ZMI +------------- + +Since Zope 4.0b6 the ZMI is styled using Bootstrap. The previously used +GIF icons were replaced by font glyphs which are stored in the package +`zmi.styles`_ together with the CSS and JavaScript needed by Bootstrap. + +The free Font Awesome glyphs are used as icons, see the table of +`available icons`_. + +Update packages ++++++++++++++++ + +If you have a Product or package which contains types, which can be added via +the ZMI, the default icon will be shown. + +To use one of the new icons add an attribute named ``zmi_icon`` to the class. +As value use a name listed on `available icons`_ prefixed by ``fas fa-``. +Example to use the info icon (i in a circle):: + + zmi_icon = 'fas fa-info-circle' + +.. _`zmi.styles` : https://github.com/zopefoundation/zmi.styles +.. _`available icons` : https://fontawesome.com/icons?d=gallery&m=free + +Use custom icons and resources +++++++++++++++++++++++++++++++ + +To use custom icons (which are not part of `zmi.styles`) or load custom CSS resp. JavaScript, you have to: + +1. create a directory and fill it with your assets +2. register this directory as resource directory +3. register a subscription adapter for :class:`App.interfaces.ICSSPaths` resp. + :class:`App.interfaces.IJSPaths`. This adapter has to return an iterable of + paths resp. URLs which should be loaded when rendering the ZMI. + +Example taken from `zmi.styles`_: + +* Register the resource directory via ZCML: + + .. code-block:: XML + + + +* Create a subscription adapter returning the path to the CSS file + (`zmi.styles`_ has this code in `subscriber.py`.): + + + .. code-block:: Python + + import zope.component + import zope.interface + + + @zope.component.adapter(zope.interface.Interface) + def css_paths(context): + """Return paths to CSS files needed for the Zope 4 ZMI.""" + return ( + '/++resource++zmi/bootstrap-4.1.1/bootstrap.min.css', + '/++resource++zmi/fontawesome-free-5.1.0/css/all.css', + '/++resource++zmi/zmi_base.css', + ) + +* Register the subscriber via ZCML: + + .. code-block:: XML + + + + +Use custom resources via ZMI +++++++++++++++++++++++++++++ + +To add custom CSS or JavaScript resources via ZMI you have to add a property: + +* ``zmi_additional_css_paths`` for additional CSS +* ``zmi_additional_js_paths`` for additional JavaScript + +The properties can have one of the following types: + +* ``string`` +* ``ustring`` +* ``ulines`` + +The value of the property has to be one or more paths/URLs to CSS resp. +JavaScript which will be included in the HTML of the ZMI. (Paths have to be +resolvable by the browser aka not simple file system paths.) diff --git a/docs/index.rst b/docs/index.rst index b541ec3c9a..9d1ca2af5e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,6 +11,7 @@ Contents: INSTALL-virtualenv operation USERS + ZMI SECURITY maintenance changes diff --git a/docs/zdgbook/Products.rst b/docs/zdgbook/Products.rst index b551314e94..46eb2f6be1 100644 --- a/docs/zdgbook/Products.rst +++ b/docs/zdgbook/Products.rst @@ -833,31 +833,8 @@ When creating management views you should include the DTML variables ``manage_page_footer`` at the bottom. These variables are acquired by your product and draw a standard management view header, tabs widgets, and footer. The management header also includes CSS -information which you can take advantage of if you wish to add CSS -style information to your management views. The management CSS -information is defined in the -`lib/python/App/dtml/manage_page_style.css.dtml`` file. Here are the -CSS classes defined in this file and conventions for their use. - -- 'form-help' -- Explanatory text related to forms. In the future, - users may have the option to hide this text. - -- 'std-text' -- Declarative text unrelated to forms. You should - rarely use this class. - -- 'form-title' -- Form titles. - -- 'form-label' -- Form labels for required form elements. - -- 'form-optional' -- Form labels for optional form elements. - -- 'form-element' -- Form elements. Note, because of a Netscape bug, - you should not use this class on 'textarea' elements. - -- 'form-text' -- Declarative text in forms. - -- 'form-mono' -- Fixed width text in forms. You should rarely use - this class. +information which you can take advantage of. You can use any of the styles +Bootstrap 4 provides. (See http://getbootstrap.com/docs/4.1/) Here's an example management view for your poll class. It allows you to edit the poll question and responses (see ``editPollForm.dtml``):: diff --git a/requirements-full.txt b/requirements-full.txt index fd99349ddd..bdaa4a3856 100644 --- a/requirements-full.txt +++ b/requirements-full.txt @@ -3,7 +3,7 @@ AccessControl==4.0b4 Acquisition==4.4.4 AuthEncoding==4.0.0 BTrees==4.5.0 -Chameleon==3.2 +Chameleon==3.4 DateTime==4.2 DocumentTemplate==3.0b3 ExtensionClass==4.3.0 @@ -32,6 +32,7 @@ mock==2.0.0 pbr==4.0.3 persistent==4.2.4.2 pytz==2018.4 +shutilwhich==1.1.0 six==1.11.0 transaction==2.2.1 waitress==1.1.0 diff --git a/setup.py b/setup.py index 2a5d957266..6ca7cb57c6 100644 --- a/setup.py +++ b/setup.py @@ -77,6 +77,7 @@ def _read_file(filename): 'waitress', 'zExceptions >= 3.4', 'z3c.pt', + 'zmi.styles', 'zope.browser', 'zope.browsermenu', 'zope.browserpage >= 4.0', diff --git a/sources.cfg b/sources.cfg index c7b9d89f6b..951f6d00a7 100644 --- a/sources.cfg +++ b/sources.cfg @@ -4,7 +4,7 @@ github_push = git@github.com:zopefoundation [sources] # Zope-specific -AccessControl = git ${remotes:github}/AccessControl pushurl=${remotes:github_push}/AccessControl branch=master +AccessControl = git ${remotes:github}/AccessControl pushurl=${remotes:github_push}/AccessControl Acquisition = git ${remotes:github}/Acquisition pushurl=${remotes:github_push}/Acquisition AuthEncoding = git ${remotes:github}/AuthEncoding pushurl=${remotes:github_push}/AuthEncoding DateTime = git ${remotes:github}/DateTime pushurl=${remotes:github_push}/DateTime @@ -15,14 +15,19 @@ Persistence = git ${remotes:github}/Persistence pushurl=${remotes:github_push}/P RestrictedPython = git ${remotes:github}/RestrictedPython pushurl=${remotes:github_push}/RestrictedPython zExceptions = git ${remotes:github}/zExceptions pushurl=${remotes:github_push}/zExceptions zope.globalrequest = git ${remotes:github}/zope.globalrequest pushurl=${remotes:github_push}/zope.globalrequest +zmi.styles = git ${remotes:github}/zmi.styles pushurl=${remotes:github_push}/zmi.styles # Optional dependencies five.localsitemanager = git ${remotes:github}/five.localsitemanager pushurl=${remotes:github_push}/five.localsitemanager Missing = git ${remotes:github}/Missing pushurl=${remotes:github_push}/Missing Products.BTreeFolder2 = git ${remotes:github}/Products.BTreeFolder2 pushurl=${remotes:github_push}/Products.BTreeFolder2 Products.MailHost = git ${remotes:github}/Products.MailHost pushurl=${remotes:github_push}/Products.MailHost +Products.PythonScripts = git ${remotes:github}/Products.PythonScripts pushurl=${remotes:github_push}/Products.PythonScripts Products.ZCatalog = git ${remotes:github}/Products.ZCatalog pushurl=${remotes:github_push}/Products.ZCatalog Products.ZCTextIndex = git ${remotes:github}/Products.ZCTextIndex pushurl=${remotes:github_push}/Products.ZCTextIndex +Products.Sessions = git ${remotes:github}/Products.Sessions pushurl=${remotes:github_push}/Products.Sessions +Products.TemporaryFolder = git ${remotes:github}/Products.TemporaryFolder pushurl=${remotes:github_push}/Products.TemporaryFolder +Products.SiteErrorLog = git ${remotes:github}/Products.SiteErrorLog pushurl=${remotes:github_push}/Products.SiteErrorLog Record = git ${remotes:github}/Record pushurl=${remotes:github_push}/Record ZServer = git ${remotes:github}/ZServer pushurl=${remotes:github_push}/ZServer diff --git a/src/App/Management.py b/src/App/Management.py index 4cfb4aa5de..10ef4d72ec 100644 --- a/src/App/Management.py +++ b/src/App/Management.py @@ -18,11 +18,16 @@ from AccessControl.class_init import InitializeClass from AccessControl.Permissions import view_management_screens from App.interfaces import INavigation +from App.interfaces import ICSSPaths +from App.interfaces import IJSPaths from App.special_dtml import DTMLFile from ExtensionClass import Base from six.moves.urllib.parse import quote, unquote from zExceptions import Redirect from zope.interface import implementer +import itertools +import six +import zope.event try: from html import escape @@ -87,20 +92,22 @@ def manage_workspace(self, REQUEST): def tabs_path_default(self, REQUEST): steps = REQUEST._steps[:-1] script = REQUEST['BASEPATH1'] - linkpat = '%s' - out = [] - url = linkpat % (escape(script, True), ' /') + linkpat = '{}/manage_workspace' + yield {'url': linkpat.format(escape(script, True)), + 'title': 'Root', + 'last': not bool(steps)} if not steps: - return url + return last = steps.pop() for step in steps: script = '%s/%s' % (script, step) - out.append(linkpat % (escape(script, True), escape(unquote(step)))) + yield {'url': linkpat.format(escape(script, True)), + 'title': escape(unquote(step)), + 'last': False} script = '%s/%s' % (script, last) - out.append( - '%s' % - (escape(script, True), escape(unquote(last), False))) - return '%s%s' % (url, '/'.join(out)) + yield {'url': linkpat.format(escape(script, True)), + 'title': escape(unquote(last)), + 'last': True} def tabs_path_info(self, script, path): out = [] @@ -141,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_page_header') - manage_page_header = DTMLFile('dtml/manage_page_header', globals()) - security.declareProtected(view_management_screens, 'manage_page_footer') manage_page_footer = DTMLFile('dtml/manage_page_footer', globals()) @@ -155,6 +159,21 @@ class Navigation(Base): manage_form_title._setFuncSignature( varnames=('form_title', 'help_product', 'help_topic')) + _manage_page_header = DTMLFile('dtml/manage_page_header', globals()) + security.declareProtected(view_management_screens, 'manage_page_header') + def manage_page_header(self, *args, **kw): + """manage_page_header.""" + kw['css_urls'] = itertools.chain( + itertools.chain(*zope.component.subscribers((self,), ICSSPaths)), + self._get_zmi_additionals('zmi_additional_css_paths')) + kw['js_urls'] = itertools.chain( + itertools.chain(*zope.component.subscribers((self,), IJSPaths)), + self._get_zmi_additionals('zmi_additional_js_paths')) + return self._manage_page_header(*args, **kw) + + security.declareProtected(view_management_screens, 'manage_navbar') + manage_navbar = DTMLFile('dtml/manage_navbar', globals()) + security.declarePublic('manage_zmi_logout') def manage_zmi_logout(self, REQUEST, RESPONSE): """Logout current user""" @@ -175,11 +194,14 @@ def manage_zmi_logout(self, REQUEST, RESPONSE): """) return + def _get_zmi_additionals(self, attrib): + # Get additional assets for styling ZMI defined on properties in ZMI. + additionals = getattr(self, attrib, ()) or () + if isinstance(additionals, six.string_types): + additionals = (additionals, ) + return additionals + # Navigation doesn't have an inherited __class_init__ so doesn't get # initialized automatically. -file = DTMLFile('dtml/manage_page_style.css', globals()) -Navigation.security.declarePublic('manage_page_style.css') -setattr(Navigation, 'manage_page_style.css', file) - InitializeClass(Navigation) diff --git a/src/App/dtml/cpContents.dtml b/src/App/dtml/cpContents.dtml index 308bc3adb9..ddb3539229 100644 --- a/src/App/dtml/cpContents.dtml +++ b/src/App/dtml/cpContents.dtml @@ -1,96 +1,44 @@ + -

-The Control Panel provides access to system information. -

+
+ +

+ The Control Panel provides access to system information. +

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
-
- Zope Version -
-
-
- &dtml-version_txt; -
-
-
- Python Version -
-
-
- &dtml-sys_version; -
-
-
- System Platform -
-
-
- &dtml-sys_platform; -
-
-
- INSTANCE_HOME -
-
-
- &dtml-getINSTANCE_HOME; -
-
-
- CLIENT_HOME -
-
-
- &dtml-getCLIENT_HOME; -
-
-
- Debug mode -
-
-
- &dtml-debug_mode; -
-
-
- Process Id -
-
-
- &dtml-process_id; -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Zope Version&dtml-version_txt;
Python Version&dtml-sys_version;
System Platform&dtml-sys_platform;
INSTANCE_HOME&dtml-getINSTANCE_HOME;
CLIENT_HOME&dtml-getCLIENT_HOME; +
Debug mode&dtml-debug_mode;
Process Id&dtml-process_id;
- +
diff --git a/src/App/dtml/dbMain.dtml b/src/App/dtml/dbMain.dtml index 9ec20b08da..06026125cf 100644 --- a/src/App/dtml/dbMain.dtml +++ b/src/App/dtml/dbMain.dtml @@ -1,141 +1,90 @@ + -

-The Database Manager allows you to view database status information. -

+
+ +

+ The Database Manager allows you to view database status information. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Database information &dtml-id;
Database Location&dtml-db_name;
Database Size&dtml-db_size;
Total number of objects in the database&dtml-database_size;
Total number of objects in memory from all caches&dtml-cache_length;
Target number of objects in memory per cache&dtml-cache_size;
Target memory size per cache in bytes&dtml-cache_length_bytes;
- - - - - - - - - -
-
- Database Location -
-
-
- &dtml-db_name; -
-
-
- Database Size -
-
-
- &dtml-db_size; -
-
-
- - - - - - - - - - - - - - - - - -
-
- Total number of objects in the database -
-
-
- &dtml-database_size; -
-
-
- Total number of objects in memory from all caches -
-
-
- &dtml-cache_length; -
-
-
- Target number of objects in memory per cache -
-
-
- &dtml-cache_size; -
-
-
- Target memory size per cache in bytes -
-
-
- &dtml-cache_length_bytes; -
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Total number of objects in each cache
+ Cache Name + Number of active objects + Active + + Total active and non-active objects + Total +
&dtml-connection;&dtml-ngsize;&dtml-size;
Total&dtml-cache_length; 
- - - - - - - - - - - - - - - - - - - - - - -
-
- Total number of objects in each cache: -
-
Cache Name
Number of active objects
Total active and non-active objects
&dtml-connection;
&dtml-ngsize;
&dtml-size;
Total
&dtml-cache_length;
-
+
+
+ + Minimize: Remove all objects from all ZODB in-memory caches. +
+
- - - - - - - - -
-
- Minimize -
-
-
- Remove all objects from all ZODB in-memory caches. -
-
-
- -
-
-
+
diff --git a/src/App/dtml/manage_form_title.dtml b/src/App/dtml/manage_form_title.dtml index 9f8b98e2ca..e7174c993b 100644 --- a/src/App/dtml/manage_form_title.dtml +++ b/src/App/dtml/manage_form_title.dtml @@ -1,16 +1 @@ - - - - - - -
-
- &dtml-form_title; -
-
-
-   -
-
-
+

&dtml-form_title;

diff --git a/src/App/dtml/manage_navbar.dtml b/src/App/dtml/manage_navbar.dtml new file mode 100644 index 0000000000..5ccd430612 --- /dev/null +++ b/src/App/dtml/manage_navbar.dtml @@ -0,0 +1,79 @@ + + + + + + + + diff --git a/src/App/dtml/manage_page_footer.dtml b/src/App/dtml/manage_page_footer.dtml index 308b1d01b6..17d6286daf 100644 --- a/src/App/dtml/manage_page_footer.dtml +++ b/src/App/dtml/manage_page_footer.dtml @@ -1,2 +1,4 @@ + + \ No newline at end of file diff --git a/src/App/dtml/manage_page_header.dtml b/src/App/dtml/manage_page_header.dtml index 1487706d83..11bdb85f3e 100644 --- a/src/App/dtml/manage_page_header.dtml +++ b/src/App/dtml/manage_page_header.dtml @@ -1,13 +1,34 @@ - - + + + - - - + + zmi-"> + diff --git a/src/App/dtml/manage_page_style.css.dtml b/src/App/dtml/manage_page_style.css.dtml deleted file mode 100644 index c275a8e061..0000000000 --- a/src/App/dtml/manage_page_style.css.dtml +++ /dev/null @@ -1,176 +0,0 @@ - - -h1 { - font-family: Verdana, Helvetica, sans-serif; - font-size: 24pt; - font-weight: bold; -} - -h2 { - font-family: Verdana, Helvetica, sans-serif; - font-size: 18pt; - font-weight: bold; -} - -h3 { - font-family: Verdana, Helvetica, sans-serif; - font-size: 14pt; - font-weight: bold; -} - -a:hover { - font-family: Verdana, Helvetica, sans-serif; - text-decoration: underline; - color: #333333; -} - -a:link { - font-family: Verdana, Helvetica, sans-serif; - text-decoration: none; - color: #000099; -} - -a { - font-family: Verdana, Helvetica, sans-serif; - text-decoration: none; - color: #000099; -} - -a.strong-link { - font-family: Verdana, Helvetica, sans-serif; - text-decoration: underline; - color: #000099; -} - -a img { - border: 0; -} - -p { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - color: #333333; -} - -th { - font-family: Verdana, Helvetica, sans-serif; - font-weight: bold; - font-size: 10pt; - color: #333333; -} - -form { - margin-bottom: 1em; -} - -.form-help { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - color: #333333; -} - -.std-text { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - color: #333333; -} - -.tab-small { - font-family: Verdana, Helvetica, sans-serif; - font-size: 8pt; - color: #333333; -} - -.location-bar { - background-color: #efefef; - border: none; -} - -.strong-header { - font-family: Verdana, Helvetica, sans-serif; - font-size: 12pt; - font-weight: bold; - background-color: #000000; - color: #ffffff; -} - -.list-header { - background-color: #c0c0c0; - border: none; -} - -.list-item { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; -} - -.list-nav { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - font-weight: bold; -} - -.row-normal { - background-color: #ffffff; - border: none; -} - -.row-hilite { - background-color: #efefef; - border: none; -} - -.section-bar { - background-color: #c0c0c0; - border: none; -} - -.system-msg { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - background-color: #ffffff; - border: 1px solid #000000; - margin-bottom: 6px; - margin-top: 6px; - padding: 4px; - color: #660033; -} - -.form-title { - font-family: Verdana, Helvetica, sans-serif; - font-weight: bold; - font-size: 12pt; - color: #333333; -} - -.form-label { - font-family: Verdana, Helvetica, sans-serif; - font-weight: bold; - font-size: 10pt; - color: #333333; -} - -.form-optional { - font-family: Verdana, Helvetica, sans-serif; - font-weight: bold; - font-style: italic; - font-size: 10pt; - color: #333333; -} - -.form-element { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; -} - -.form-text { - font-family: Verdana, Helvetica, sans-serif; - font-size: 10pt; - color: #333333; -} - -.form-mono { - font-family: monospace; - font-size: 12px; - text-decoration: none; -} diff --git a/src/App/dtml/manage_tabs.dtml b/src/App/dtml/manage_tabs.dtml index bb1600591c..7e6cd1a4c2 100644 --- a/src/App/dtml/manage_tabs.dtml +++ b/src/App/dtml/manage_tabs.dtml @@ -1,105 +1,89 @@ - - - - - - - - - - - - + + - + + - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   
 href="&dtml-action;"href="" target="&dtml-target;">  href="&dtml-action;"href="" target="&dtml-target;"> 
  
-
+ - -
- - - - -
-
- - - &dtml-meta_type; - - Object - - at - - - Locked - -
-
-
- - -
- -() -
-
+ +
diff --git a/src/App/dtml/menu.dtml b/src/App/dtml/menu.dtml index 7c87addc33..dab3551cbe 100644 --- a/src/App/dtml/menu.dtml +++ b/src/App/dtml/menu.dtml @@ -1,57 +1,58 @@ - - - - -
- - Control Panel - -
-
- - - - - -
- - - Root Folder - - &dtml-id; - - -
+
+
+ diff --git a/src/App/dtml/undo.dtml b/src/App/dtml/undo.dtml index 3dfe128037..6de82e5396 100644 --- a/src/App/dtml/undo.dtml +++ b/src/App/dtml/undo.dtml @@ -1,98 +1,76 @@ + - +
-
+ -

-This application's transactional feature allows you to easily undo changes -made to the application's settings or data. You can revert the application -to a "snapshot" of its state at a previous point in time. -

+ -

-Select one or more transactions below and then click on the "Undo" -button to undo those transactions. Note that even though a transaction -is shown below, you may not be able to undo it if later transactions -modified objects that were modified by a selected transaction. -

+

+ This application's transactional feature allows you to easily undo changes + made to the application's settings or data. You can revert the application + to a snapshot of its state at a previous point in time. +

- - - + + - - - + - - -
- - - -
+ + + + + + + + + + +
+
+
+ + by &dtml-user_name;Zope + + +
- - - - - - - - - - - - - - - - -
- - -
- by &dtml-user_name;Zope -
-
-
- -
-
-
- -
-
- +
+ +
- -

-There are no transactions that can be undone. -

+ + + + +
There are no transactions that can be undone.
+
+ diff --git a/src/App/interfaces.py b/src/App/interfaces.py index 06d09ddb2e..ddfc81c79e 100644 --- a/src/App/interfaces.py +++ b/src/App/interfaces.py @@ -29,4 +29,10 @@ class INavigation(Interface): def manage_zmi_logout(REQUEST, RESPONSE): """Logout current user""" -INavigation.setTaggedValue('manage_page_style.css', Attribute(""" """)) + +class ICSSPaths(Interface): + """Paths to CSS resources needed for the ZMI.""" + + +class IJSPaths(Interface): + """Paths to JAvaScript resources needed for the ZMI.""" diff --git a/src/App/tests/testManagement.py b/src/App/tests/testManagement.py index ee1ae90496..6d81c35c1f 100644 --- a/src/App/tests/testManagement.py +++ b/src/App/tests/testManagement.py @@ -1,7 +1,7 @@ -import unittest +import Testing.ZopeTestCase -class TestNavigation(unittest.TestCase): +class TestNavigation(Testing.ZopeTestCase.ZopeTestCase): def test_interfaces(self): from App.interfaces import INavigation @@ -9,3 +9,35 @@ def test_interfaces(self): from zope.interface.verify import verifyClass verifyClass(INavigation, Navigation) + + def test_Management__Navigation__manage_page_header__1(self): + """It respects `zmi_additional_css_paths` string property.""" + self.folder.manage_addProperty( + 'zmi_additional_css_paths', '/foo/bar.css', 'string') + self.assertIn('href="/foo/bar.css"', self.folder.manage_page_header()) + + def test_Management__Navigation__manage_page_header__2(self): + """It respects `zmi_additional_css_paths` ustring property.""" + self.folder.manage_addProperty( + 'zmi_additional_css_paths', '/foo/bar.css', 'ustring') + self.assertIn('href="/foo/bar.css"', self.folder.manage_page_header()) + + def test_Management__Navigation__manage_page_header__3(self): + """It respects `zmi_additional_css_paths` lines property.""" + self.folder.manage_addProperty( + 'zmi_additional_css_paths', ['/foo/bar.css', '/baz.css'], 'ulines') + self.assertIn('href="/foo/bar.css"', self.folder.manage_page_header()) + self.assertIn('href="/baz.css"', self.folder.manage_page_header()) + + def test_Management__Navigation__manage_page_header__4(self): + """It respects `zmi_additional_css_paths` ulines property.""" + self.folder.manage_addProperty( + 'zmi_additional_css_paths', ['/foo/bar.css', '/baz.css'], 'ulines') + self.assertIn('href="/foo/bar.css"', self.folder.manage_page_header()) + self.assertIn('href="/baz.css"', self.folder.manage_page_header()) + + def test_Management__Navigation__manage_page_header__5(self): + """It ignores an empty `zmi_additional_css_paths` property.""" + self.folder.manage_addProperty( + 'zmi_additional_css_paths', '', 'string') + self.assertNotIn('href=""', self.folder.manage_page_header()) diff --git a/src/App/www/chooseDatabase.pt b/src/App/www/chooseDatabase.pt index 1b150cb352..8da2f5f4f9 100644 --- a/src/App/www/chooseDatabase.pt +++ b/src/App/www/chooseDatabase.pt @@ -1,16 +1,25 @@

-

Databases

+
- - - - -
-Main -
+

+ Mounted Zope Object Databases (ZODB): Please select a database name + to get into it's Database Manager. +

+ +
    +
  1. + + + Main + +
  2. +
+ +

diff --git a/src/OFS/DTMLDocument.py b/src/OFS/DTMLDocument.py index 02c6f0526a..e34a74c1b6 100644 --- a/src/OFS/DTMLDocument.py +++ b/src/OFS/DTMLDocument.py @@ -42,6 +42,7 @@ class DTMLDocument(PropertyManager, DTMLMethod): """ DocumentTemplate.HTML objects whose 'self' is the DTML object. """ meta_type = 'DTML Document' + zmi_icon = 'far far fa-file-alt' manage_options = DTMLMethod.manage_options @@ -170,7 +171,7 @@ def addDTMLDocument(self, id, title='', file='', REQUEST=None, submit=None): u = self.DestinationURL() except Exception: u = REQUEST['URL1'] - if submit == " Add and Edit ": + if submit == "Add and Edit": u = "%s/%s" % (u, quote(id)) REQUEST.RESPONSE.redirect(u + '/manage_main') return '' diff --git a/src/OFS/DTMLMethod.py b/src/OFS/DTMLMethod.py index 6e84248e45..67cc70fc2a 100644 --- a/src/OFS/DTMLMethod.py +++ b/src/OFS/DTMLMethod.py @@ -62,6 +62,7 @@ class DTMLMethod(RestrictedDTML, """ DocumentTemplate.HTML objects that act as methods of their containers. """ meta_type = 'DTML Method' + zmi_icon = 'far fa-file-alt' _proxy_roles = () index_html = None # Prevent accidental acquisition _cache_namespace_keys = () @@ -432,7 +433,7 @@ def addDTMLMethod(self, id, title='', file='', REQUEST=None, submit=None): u = self.DestinationURL() except Exception: u = REQUEST['URL1'] - if submit == " Add and Edit ": + if submit == "Add and Edit": u = "%s/%s" % (u, quote(id)) REQUEST.RESPONSE.redirect(u + '/manage_main') return '' diff --git a/src/OFS/FindSupport.py b/src/OFS/FindSupport.py index 47d58409c7..1e5ba92d55 100644 --- a/src/OFS/FindSupport.py +++ b/src/OFS/FindSupport.py @@ -40,14 +40,6 @@ class FindSupport(Base): manage_findForm = DTMLFile('dtml/findForm', globals(), management_view='Find') - security.declareProtected(view_management_screens, 'manage_findAdv') - manage_findAdv = DTMLFile('dtml/findAdv', globals(), - management_view='Find') - - security.declareProtected(view_management_screens, 'manage_findResult') - manage_findResult = DTMLFile('dtml/findResult', globals(), - management_view='Find') - manage_options = ( {'label': 'Find', 'action': 'manage_findForm'}, ) diff --git a/src/OFS/Folder.py b/src/OFS/Folder.py index 4bcd52dd69..68d509da26 100644 --- a/src/OFS/Folder.py +++ b/src/OFS/Folder.py @@ -66,6 +66,7 @@ class Folder( a management interface and can have arbitrary properties. """ meta_type = 'Folder' + zmi_icon = 'far fa-folder' _properties = ( {'id': 'title', 'type': 'string', 'mode': 'wd'}, diff --git a/src/OFS/Image.py b/src/OFS/Image.py index a5aff74c59..a9b76a72b6 100644 --- a/src/OFS/Image.py +++ b/src/OFS/Image.py @@ -97,6 +97,7 @@ class File(Persistent, Implicit, PropertyManager, """A File object is a content object for arbitrary files.""" meta_type = 'File' + zmi_icon = 'far fa-file-archive' security = ClassSecurityInfo() security.declareObjectProtected(View) @@ -797,6 +798,7 @@ class Image(File): renders an HTML 'IMG' tag. """ meta_type = 'Image' + zmi_icon = 'far fa-file-image' security = ClassSecurityInfo() security.declareObjectProtected(View) diff --git a/src/OFS/ObjectManager.py b/src/OFS/ObjectManager.py index 64bf036aa7..1952968003 100644 --- a/src/OFS/ObjectManager.py +++ b/src/OFS/ObjectManager.py @@ -37,6 +37,7 @@ from Acquisition import aq_base, aq_acquire, aq_parent from Acquisition import Implicit from DateTime import DateTime +from DateTime.interfaces import DateTimeError from Persistence import Persistent from six import string_types from six import text_type @@ -62,6 +63,7 @@ from OFS.event import ObjectWillBeRemovedEvent from OFS.Lockable import LockableItem from OFS.subscribers import compatibilityCall +from Products.PageTemplates.PageTemplateFile import PageTemplateFile try: from html import escape @@ -177,7 +179,7 @@ class ObjectManager(CopyContainer, _objects = () security.declareProtected(view_management_screens, 'manage_main') - manage_main = DTMLFile('dtml/main', globals()) + manage_main = PageTemplateFile('zpt/main', globals()) manage_index_main = DTMLFile('dtml/index_main', globals()) @@ -539,9 +541,12 @@ def manage_delObjects(self, ids=[], REQUEST=None): id = ids[-1] v = self._getOb(id, self) - if v.wl_isLocked(): - raise ResourceLockedError( - 'Object "%s" is locked.' % v.getId()) + try: + if v.wl_isLocked(): + raise ResourceLockedError( + 'Object "%s" is locked.' % v.getId()) + except AttributeError: + pass if v is self: raise BadRequest('%s does not exist' % escape(ids[-1], True)) @@ -838,6 +843,29 @@ def items(self): def values(self): return self.objectValues() + security.declareProtected(access_contents_information, 'compute_size') + def compute_size(self, ob): + #try: + if hasattr(ob, 'get_size'): + ob_size = ob.get_size() + if ob_size < 1024: + return '1 KiB' + elif ob_size > 1048576: + return "{:0.02f} MiB".format(ob_size / 1048576.0) + else: + return "{:0.0f} KiB".format(ob_size / 1024.0) + #except: + # pass + #return '' + + security.declareProtected(access_contents_information, 'last_modified') + def last_modified(self, ob): + try: + return DateTime(ob._p_mtime).strftime("%Y-%m-%d %H:%M") + except (DateTimeError, AttributeError): + return '' + + # Don't InitializeClass, there is a specific __class_init__ on ObjectManager # InitializeClass(ObjectManager) diff --git a/src/OFS/OrderedFolder.py b/src/OFS/OrderedFolder.py index efe3d4ae52..d0ef791b39 100644 --- a/src/OFS/OrderedFolder.py +++ b/src/OFS/OrderedFolder.py @@ -41,6 +41,7 @@ class OrderedFolder(OrderSupport, Folder): """ Extends the default Folder by order support. """ meta_type = 'Folder (Ordered)' + zmi_icon = 'far fa-folder zmi-icon-folder-ordered' manage_options = ( OrderSupport.manage_options + diff --git a/src/OFS/SimpleItem.py b/src/OFS/SimpleItem.py index c370e32f26..44a63f8d48 100644 --- a/src/OFS/SimpleItem.py +++ b/src/OFS/SimpleItem.py @@ -52,6 +52,7 @@ from zExceptions.ExceptionFormatter import format_exception from zope.interface import implementer +from App.Management import Navigation from OFS import bbb from OFS.interfaces import IItem from OFS.interfaces import IItemWithName @@ -72,6 +73,7 @@ @implementer(IItem) class Item(Base, + Navigation, Resource, LockableItem, CopySource, @@ -80,6 +82,8 @@ class Item(Base, Owned): """A common base class for simple, non-container objects.""" + zmi_icon = 'far fa-file' + security = ClassSecurityInfo() isPrincipiaFolderish = 0 diff --git a/src/OFS/dtml/access.dtml b/src/OFS/dtml/access.dtml index 93610af763..89e8fc8ff7 100644 --- a/src/OFS/dtml/access.dtml +++ b/src/OFS/dtml/access.dtml @@ -1,166 +1,135 @@ - - - -

-The listing below shows the current security settings for this item. -Permissions are rows and roles are columns. Checkboxes are used to -indicate where roles are assigned permissions. You can also assign -local roles to -users, which give users extra roles in the context of this object and -its subobjects. -

-

-When a role is assigned to a permission, users with the given role -will be able to perform tasks associated with the permission on this -item. When the Acquire permission settings checkbox is selected -then the containing objects's permission settings are used. Note: the -acquired permission settings may be augmented by selecting Roles for -a permission in addition to selecting to acquire permissions. -

+ +
-
-
- Username: - - -
-
+

+ The listing below shows the current security settings for this item. + Permissions are rows and roles are columns. Checkboxes are used to + indicate where roles are assigned permissions. You can also assign + local roles to + users, which give users extra roles in the context of this object and + its subobjects.
+ When a role is assigned to a permission, users with the given role + will be able to perform tasks associated with the permission on this + item. When the Acquire permission settings checkbox is selected + then the containing objects's permission settings are used. Note: the + acquired permission settings may be augmented by selecting Roles for + a permission in addition to selecting to acquire permissions. +

- -
+ +
+ +
+ + + +
+
+
- - - - - - - - + +
+
  -
- Permission -
-
"> -
- Roles -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Permissions" class="zmi-table-head-roles">Roles 
+ + Acquire + permission settings + + +
&dtml-sequence-item;
 
+   + + + &dtml-name; + " + onclick="$(this).children('input').trigger('click')"> + + +  
+
+ +
+ +
- - - - - - - - - - - - - - - - + - - - - - +

+ You can define new roles by entering a role name and clicking the + "Add Role" button. +

- - - - - - - - - - - - - - -
- - - -" align="left"> - -" align="left"> - -
- -
- - - - - - - -

-You can define new roles by entering a role name and clicking the -"Add Role" button. -

- -
- - - - - - - - - - - - - - - -
-
- User defined roles -
-   -
- - -
- -
-
-
- -
-
-
- -
-
-
-
+
+
+ +
+ + +
+
+ +
+
+ + +
+
+
+
+ +
diff --git a/src/OFS/dtml/acquiredEdit.dtml b/src/OFS/dtml/acquiredEdit.dtml index 2c45be0125..14ad2d2f49 100644 --- a/src/OFS/dtml/acquiredEdit.dtml +++ b/src/OFS/dtml/acquiredEdit.dtml @@ -1,22 +1,31 @@ - - - -

-Select permissions that acquire permission settings: -

- -
- -

-

- -
-

-
+ + + > + +
+ +

+ Select permissions that acquire permission settings: +

+ +
+ + + +
+ +
+ +
+ +
diff --git a/src/OFS/dtml/addOrderedFolder.dtml b/src/OFS/dtml/addOrderedFolder.dtml index ab1ccda3a0..f443d4bf0d 100644 --- a/src/OFS/dtml/addOrderedFolder.dtml +++ b/src/OFS/dtml/addOrderedFolder.dtml @@ -1,53 +1,40 @@ - -

-An ordered Folder contains other objects. Use Folders to organize your -web objects in to logical groups. The create public interface -option creates an index document inside the Folder to give the -Folder a default HTML representation. The create user folder -option creates a User Folder inside the Folder to hold authorization -information for the Folder. -

- -
- - - - - - - - - - - - - - - - -
-
- Id -
-
- -
-
- Title -
-
- -
- -
- -
-
+
+ + + +

+ An ordered Folder contains other objects. Use Folders to organize your + web objects in to logical groups. The create public interface + option creates an index document inside the Folder to give the + Folder a default HTML representation. The create user folder + option creates a User Folder inside the Folder to hold authorization + information for the Folder. +

+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ diff --git a/src/OFS/dtml/addUser.dtml b/src/OFS/dtml/addUser.dtml index 830f998eb7..d475fd2489 100644 --- a/src/OFS/dtml/addUser.dtml +++ b/src/OFS/dtml/addUser.dtml @@ -1,89 +1,74 @@ - +
-

-To add a new user, enter the name -,password, confirmation and roles for the new user and -click "Add". Domains is an optional list of domains -from which the user is allowed to login. -

+ -
- - - - - +

+ To add a new user, enter the name + ,password, confirmation and roles for the new user and + click "Add". Domains is an optional list of domains + from which the user is allowed to login. +

- - - - - - - - - - - - - + - - - - +
+ +
+ +
+
- - - - -
-
- Name -
-
- -
-
- Password -
-
- -
-
- (Confirm) -
-
- -
-
-Domains -
-
- -
-
- Roles -
-
-
- -
- -
-
-
+ + + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + + +
diff --git a/src/OFS/dtml/brokenEdit.dtml b/src/OFS/dtml/brokenEdit.dtml index 62b2ac38fa..40237cd8ef 100644 --- a/src/OFS/dtml/brokenEdit.dtml +++ b/src/OFS/dtml/brokenEdit.dtml @@ -1,21 +1,21 @@ -

-This object is broken because the -&dtml-product_name; product that created it -is no longer installed or is installed incorrectly. Please contact -the product maintainer for assistance. -

+
-

-Note that the data associated with this product has not been lost, -and will be accessible again if the product is reinstalled. -

+

+ This object is broken because the + &dtml-product_name; product that created it + is no longer installed or is installed incorrectly. Please contact + the product maintainer for assistance. +
+ Note that the data associated with this product has not been lost, + and will be accessible again if the product is reinstalled. +

- - +
+ diff --git a/src/OFS/dtml/cacheNamespaceKeys.dtml b/src/OFS/dtml/cacheNamespaceKeys.dtml index e8b3fadf46..15f3b1b307 100644 --- a/src/OFS/dtml/cacheNamespaceKeys.dtml +++ b/src/OFS/dtml/cacheNamespaceKeys.dtml @@ -1,11 +1,13 @@ -

-Names from the DTML namespace to use as cache keys: -

- -
-
- -
+
+ +
+ + +
+ +
+ +
+
+ diff --git a/src/OFS/dtml/cacheable.dtml b/src/OFS/dtml/cacheable.dtml index 6088cd37db..7bf720d884 100644 --- a/src/OFS/dtml/cacheable.dtml +++ b/src/OFS/dtml/cacheable.dtml @@ -1,40 +1,44 @@ -
- -
- -Cache this object using: - - - -
- -
- - -

-Cache Settings -

- -
- -
-
- - - - +
+ +
+ +
+
+
+ New Cache this object using +
+ +
+ +
+
+
+ + + +
+
+ Cache Settings ... +
+ +
+
+
+
+ +
+ +
+ +
diff --git a/src/OFS/dtml/cmassoc.dtml b/src/OFS/dtml/cmassoc.dtml index 9f6e303819..8a3dac8a6f 100644 --- a/src/OFS/dtml/cmassoc.dtml +++ b/src/OFS/dtml/cmassoc.dtml @@ -1,112 +1,83 @@ + -
+
+ + + + +

+ Select which objects should be cached using this cache manager. Only + those objects for which you have the "Change cache settings" permission + are shown. +

+ + + + + + + + + +
checked="checked" /> + + +
+ &dtml-path;(&dtml-title;) +
+
+ +
+ +
+ + + + + +
No objects matched your query.
+ +
+
+ +
+ +
+ +
+ +
+
- - -

-Select which objects should be cached using this cache manager. Only -those objects for which you have the "Change cache settings" permission -are shown. -

+
+ +
+ +
+
- - - - - - - - - - - - - - - -
- checked="checked"> - - -
- &dtml-path;(&dtml-title;) -
-
-
- -
-
- +
+ +
+ + + +
+
-

-No objects matched your query. -

-
-
-
+ -
- - - - - - - - - - - - - - - - - -
-
- Locate cacheable objects: -
-
-
- All - - Associated with this cache manager -
-
-
- Of the type(s): -
-
-
- -
-
- -
- - -Search subfolders -
-
- -
-
- -
-
-
+
diff --git a/src/OFS/dtml/documentAdd.dtml b/src/OFS/dtml/documentAdd.dtml index ac6c96fbd8..f12406c844 100644 --- a/src/OFS/dtml/documentAdd.dtml +++ b/src/OFS/dtml/documentAdd.dtml @@ -1,68 +1,51 @@ - +
-

-A DTML Document is used to hold text content. It can contain -HTML, XML, plain text, structured-text, etcetera. -A DTML document can contain DTML scripting tags. -A DTML Document differs from a DTML Method in that it has properties -and does not call methods on its container object. -

+ -

-You may create a new DTML Document using the form below. -You may also choose to upload an existing html file from your -local computer by clicking the Browse button. -

+

+ A DTML Document is used to hold text content. It can contain + HTML, XML, plain text, structured-text, etcetera. + A DTML document can contain DTML scripting tags. + A DTML Document differs from a DTML Method in that it has properties + and does not call methods on its container object. +
+ You may create a new DTML Document using the form below. + You may also choose to upload an existing html file from your + local computer by clicking the Browse button. +

-
- - - - - - - - - - - - - - - - - -
-
- Id -
-
- -
-
- Title -
-
- -
-
- File -
-
- -
- -
- - -
-
-
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ + +
+ +
+ +
diff --git a/src/OFS/dtml/documentEdit.dtml b/src/OFS/dtml/documentEdit.dtml index e14a07986d..85d8397da2 100644 --- a/src/OFS/dtml/documentEdit.dtml +++ b/src/OFS/dtml/documentEdit.dtml @@ -1,82 +1,58 @@ - - -

-You may edit the source for this document using the form below. You -may also upload the source for this document from a local file. Click -the browse button to select a local file to upload. -

- -
- - - - - - - - - - - - - - - -
-
- Title -
-
- -
- -
-
- - Locked - - - -
-
-
+ -
- - - - - - - - - -
-
- File   -
-
- -
-
- - Locked - - - -
-
-
+
+ +

+ You may edit the source for this document using the form below. You + may also upload the source for this document from a local file. Click + the browse button to select a local file to upload. +

+ +
+ + +
+ +
+ +
+
+
+ +
+
+ +
+ + + + + + +
+ +
+ + +
+
+
+ + +
+
+ +
+
+
+
+ +
- - - - - - - diff --git a/src/OFS/dtml/documentProxy.dtml b/src/OFS/dtml/documentProxy.dtml index a4f443c654..ab3fb32662 100644 --- a/src/OFS/dtml/documentProxy.dtml +++ b/src/OFS/dtml/documentProxy.dtml @@ -1,49 +1,40 @@ - - - - -

-Proxy roles allow you to control the access that a DTML document or -method has. Proxy roles replace the roles of the user who is viewing -the document or method. This can be used to both expand and limit -access to resources. Select the proxy roles for this object from -the list below. -

- -
- - - - - - - - - -
-
- Proxy Roles -
-
-
- -
-
-
- -
-
- -
+ + + +
+ +

+ Proxy roles allow you to control the access that a DTML document or + method has. Proxy roles replace the roles of the user who is viewing + the document or method. This can be used to both expand and limit + access to resources. Select the proxy roles for this object from + the list below. +

+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
diff --git a/src/OFS/dtml/editLocalRoles.dtml b/src/OFS/dtml/editLocalRoles.dtml index 043347df6e..a6d10b17d4 100644 --- a/src/OFS/dtml/editLocalRoles.dtml +++ b/src/OFS/dtml/editLocalRoles.dtml @@ -1,56 +1,52 @@ - - - -

-Local roles allow you to give particular users extra roles in the -context of this object, in addition to the roles they already have. -

-

-To change the local roles for this user, select the extra roles this -user should have in the context of this object and click the -Save Changes button. -

+ -
- - - - - - - - - - - - -
-
User
-
-
Roles
-
-
&dtml-userid;
-
-
- - - - -
-
-
- -
-
-
+
+

+ Local roles allow you to give particular users extra roles in the + context of this object, in addition to the roles they already have. +
+ To change the local roles for this user, select the extra roles this + user should have in the context of this object and click the + Save Changes button. +

+ +
+ + + + + + + + + + + + +
UserRoles
+ &dtml-userid; + + + + + +
+ +
+ +
+ +
+ +
diff --git a/src/OFS/dtml/editUser.dtml b/src/OFS/dtml/editUser.dtml index 54c2931571..75c8b6face 100644 --- a/src/OFS/dtml/editUser.dtml +++ b/src/OFS/dtml/editUser.dtml @@ -1,90 +1,77 @@ +
+ -
- - - - - - - - - - - - - - - - - - - - - - - + + +
+ +
+ " /> +
+ " /> +
+ + + + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+ &dtml-sequence-item; " /> +
+
+ +
+ +
+ +
+
+ +
+ +
- - - - -
-
-Name -
-
-
- -
-
 
-
-New Password -
-
- -
-
-(Confirm) -
-
- -
-
-Domains -
-
-&dtml-sequence-item; " /> -
-
-Roles -
-
-
- + -" /> -

- -
-
- +
diff --git a/src/OFS/dtml/editedDialog.dtml b/src/OFS/dtml/editedDialog.dtml index 27d74a4510..eb7fd9dd65 100644 --- a/src/OFS/dtml/editedDialog.dtml +++ b/src/OFS/dtml/editedDialog.dtml @@ -1,33 +1,15 @@ -
- - - - - - - - - -
-
-
-
!
-
-
-
-

-
- &dtml-title_and_id; has been successfully edited. -
-
-
- -
- -
-
-
+
+ +
&dtml-title_and_id; has been successfully edited.
+ +
+
+ +
+ +
diff --git a/src/OFS/dtml/fileEdit.dtml b/src/OFS/dtml/fileEdit.dtml index 7b4748f753..c266c83ee7 100644 --- a/src/OFS/dtml/fileEdit.dtml +++ b/src/OFS/dtml/fileEdit.dtml @@ -1,123 +1,87 @@ +
-

-You can update the data for this file object using the form below. -Select a data file from your local computer by clicking the browse -button and click upload to update the contents of the -file. You may also edit the file content directly if the content is a -text type and small enough to be edited in a text area. -

+

+ You can update the data for this file object using the form below. + Select a data file from your local computer by clicking the browse + button and click upload to update the contents of the + file. You may also edit the file content directly if the content is a + text type and small enough to be edited in a text area. +

-" method="post" enctype="multipart/form-data"> - - - - - + " method="post" + enctype="multipart/form-data" class="zmi-file zmi-edit"> - - - - +
+ +
+ +
+
- - - - +
+ +
+ +
+
- - - - - - - - - - - - +
+ +
+ +
+
- - - - + + +
+ +
-
- - - + +
+ +
+ bytes +
+
+ + -
- - - +
+ + + + + + +
-
-
- Title -
-
- -
-
- Content Type -
-
- -
-
- Precondition -
-
- -
-
- -
-
-
- File Size -
-
-
- bytes -
-
-
- - Locked - - - -
-
-
-
- File Data -
-
-
- -
-
- - Locked - - - -
-
- + +
" action="manage_upload" method="post" enctype="multipart/form-data" class="zmi-upload mt-4"> +
+
+ + +
+
+ +
+
+
+
+ +
+ diff --git a/src/OFS/dtml/findAdv.dtml b/src/OFS/dtml/findAdv.dtml deleted file mode 100644 index c52b5447e7..0000000000 --- a/src/OFS/dtml/findAdv.dtml +++ /dev/null @@ -1,161 +0,0 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Find objects of type: -
-
-
- -
-
-
- with ids: -
-
- -
-
- containing: -
-
- -
-
- expr: -
-
- -
-
- modified: -
-
-
- -
- -
-
- where the roles: -
-
-
- -
-
-
- have permission: -
-
-
- -
-
-
- Sort results by: -
-
-
- - - Reverse? -
-
- -
- - Search only in this folder -
- - Search all subfolders -
-
- - -
-
- - - - - - diff --git a/src/OFS/dtml/findForm.dtml b/src/OFS/dtml/findForm.dtml index 3866659c95..4a2b729cc7 100644 --- a/src/OFS/dtml/findForm.dtml +++ b/src/OFS/dtml/findForm.dtml @@ -1,105 +1,257 @@ + -

-Find allows you to locate Zope objects based on different -criteria. For more find choices choose the Advanced -find option. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Find objects of type: -
-
-
- -
-
-
- with ids: -
-
- -
-
- containing: -
-
- -
-
- modified: -
-
-
- -
- -
- -
- - Search only in this folder -
- - Search all subfolders -
-
- - -
-
+
+ + + + + + + + + + +
+ Displaying items + &dtml-sequence-number;-&dtml-sequence-number; of + + items matching your query. You can revise + your search terms below. +
+ +
+ No items were found matching your query. You can + revise your search terms below. +
+
+ + + + + + + + int(batch_size)"> + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + +style="display:none;""> + + + + +style="display:none;""> + + + + +style="display:none;""> + + + + +style="display:none;""> + + + + + + + + + + + + + + + + + + +
+ + + +
+ + +
+ +
+
+ + +
+ +
+ +
+ + +
+ +
+ + +
+
+
+
diff --git a/src/OFS/dtml/findResult.dtml b/src/OFS/dtml/findResult.dtml deleted file mode 100644 index d5c07ecfe8..0000000000 --- a/src/OFS/dtml/findResult.dtml +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - - - - - - - - - -

-Displaying items - -&dtml-sequence-number;-&dtml-sequence-number; of items matching your query. You can -revise your search terms below. -

- -

-No items were found matching your query. You can revise -your search terms below. -

-
- - - - - - - - - - - - - - - - - - - - - -
- - - -
- - - - - - - - - - - -
- -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Find objects of type: -
-
-
- -
-
-
- with ids: -
-
- "> -
-
- containing: -
-
- "> -
-
- expr: -
-
- -
-
- modified: -
-
-
- -
- -
-
- where the roles: -
-
-
- -
-
-
- have permission: -
-
-
- -
-
-
- Sort results by: -
-
-
- - - Reverse? - -
-
- -
- CHECKED> - Search only in this folder -
- CHECKED> - Search all subfolders -
-
- - -
-
- - diff --git a/src/OFS/dtml/folderAdd.dtml b/src/OFS/dtml/folderAdd.dtml index 5b35a97a8c..82299a2f23 100644 --- a/src/OFS/dtml/folderAdd.dtml +++ b/src/OFS/dtml/folderAdd.dtml @@ -1,53 +1,40 @@ - -

-A Folder contains other objects. Use Folders to organize your -web objects in to logical groups. The create public interface -option creates an index document inside the Folder to give the -Folder a default HTML representation. The create user folder -option creates a User Folder inside the Folder to hold authorization -information for the Folder. -

- -
- - - - - - - - - - - - - - - - -
-
- Id -
-
- -
-
- Title -
-
- -
- -
- -
-
-
+
+ + + +

+ A Folder contains other objects. Use Folders to organize your + web objects in to logical groups. The create public interface + option creates an index document inside the Folder to give the + Folder a default HTML representation. The create user folder + option creates a User Folder inside the Folder to hold authorization + information for the Folder. +

+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
diff --git a/src/OFS/dtml/historyCompare.dtml b/src/OFS/dtml/historyCompare.dtml index c79ad552b7..e8d5d109e8 100644 --- a/src/OFS/dtml/historyCompare.dtml +++ b/src/OFS/dtml/historyCompare.dtml @@ -1,42 +1,30 @@ + - - - - - - - - - - -
-
-Changes to &dtml-id; as of -
-
-
- -
-
-
- to get to &dtml-id; as of -
-
-
- -
-
- -
- - - - -

-This object does not provide comparison support. -

-
+
+ + + + + + + + + + + + +
Changes to &dtml-id; as of
to get to &dtml-id; as of
+ + + + + +
This object does not provide comparison support.
+ +
+ +
diff --git a/src/OFS/dtml/imageAdd.dtml b/src/OFS/dtml/imageAdd.dtml index 4cbaf33935..2315cc6136 100644 --- a/src/OFS/dtml/imageAdd.dtml +++ b/src/OFS/dtml/imageAdd.dtml @@ -1,59 +1,41 @@ - - -

-Select a file to upload from your local computer by clicking the -Browse button. -

- -
- - - - - - - - - - - - - - - - - -
-
- Id -
-
- -
-
- Title -
-
- -
-
- File -
-
- -
- -
- -
-
-
+
- + + +

+ Select a file to upload from your local computer by clicking the Browse button. +

+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ +
+ +
+ +
+ + diff --git a/src/OFS/dtml/imageEdit.dtml b/src/OFS/dtml/imageEdit.dtml index 4745d55ada..db86eb456d 100644 --- a/src/OFS/dtml/imageEdit.dtml +++ b/src/OFS/dtml/imageEdit.dtml @@ -1,118 +1,80 @@ + +
-

-You can update the data for this &dtml-kind; using the form below. -Select a data file from your local computer by clicking the browse -button and click upload to update the contents of the &dtml-kind;. -

+

+ You can update the data for this &dtml-kind; using the form below. + Select a data file from your local computer by clicking the browse + button and click upload to update the contents of the &dtml-kind;. +

-
- - - - - + - - - - +
+ +
+ +
+
- - - - +
+ +
+ +
+
- - - - +
+ +
')" + style="cursor:zoom-in" title="Click to View Generic File" + > 250"> + + 250"> + + + + +
File Size: bytes
+
+
- - - - +
+ +
+ +
+
-
-
- Title -
-
- -
-
- Content Type -
-
- -
-
- Preview -
-
- 250"> - - 250"> - - - - -
-
- File Size -
-
-
- bytes -
-
-
- - Locked - - - -
-
-
+
+ + + + + + +
+ -
- - - - - - - - - + + +
+
+ + +
+
+ +
+
+ +
-
-
-
- File Data -
-
-
- -
-
- - Locked - - - -
-
- +
diff --git a/src/OFS/dtml/imageView.dtml b/src/OFS/dtml/imageView.dtml index 5ec12d3982..787f1f6de1 100644 --- a/src/OFS/dtml/imageView.dtml +++ b/src/OFS/dtml/imageView.dtml @@ -1,9 +1,11 @@ - -

- -

+ +
+
+ +
+
diff --git a/src/OFS/dtml/importExport.dtml b/src/OFS/dtml/importExport.dtml index dc3d623627..9f21c087ee 100644 --- a/src/OFS/dtml/importExport.dtml +++ b/src/OFS/dtml/importExport.dtml @@ -1,127 +1,100 @@ + -

-You can export Zope objects to a file in order to transfer -them to a different Zope installation. You can either choose -to download the export file to your local machine, or save it -in the "var" directory of your Zope installation -on the server. -
-
-Note: -Zope can export/import objects in a binary format (called -ZEXP). The ZEXP format is the officially supported export/import -format for moving data between identical Zope installations (it is not a migration tool). -

- -
- - - - - - - - - - - - - -
-
- Export object id -
-
- " class="form-element"/> -
-
- Export to -
-
-
- -
- -
-
-
- -
-
-
- -
- -

-You may import Zope objects which have been previously -exported to a file, by placing the file in the "import" -directory of your Zope installation on the server. You should create -the "import" directory in the root of your Zope installation -if it does not yet exist. -

- -

-Note that by default, you will become the owner of the objects -that you are importing. If you wish the imported objects to retain -their existing ownership information, select "retain existing -ownership information". -

- -
- - - - - - - - - - - - - - -
-
- Import file name -
-
- -
-
- Ownership -
-
-
- -
- -
-
-
- -
-
-
+
+ +

+ You can export Zope objects to a file in order to transfer + them to a different Zope installation. You can either choose + to download the export file to your local machine, or save it + in the var directory of your Zope installation + on the server. + Note: + Zope can export/import objects in a binary format (called + ZEXP). The ZEXP format is the officially supported export/import + format for moving data between identical Zope installations. + It is not a migration tool. +

+ +
+ +
+ +
+ "/> +
+
+ +
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+ +
+ +
+ +

+ You may import Zope objects which have been previously + exported to a file, by placing the file in the "import" + directory of your Zope installation on the server. You should create + the "import" directory in the root of your Zope installation + if it does not yet exist. +
+ Note that by default, you will become the owner of the objects + that you are importing. If you wish the imported objects to retain + their existing ownership information, select "retain existing + ownership information". +

+ +
+ + +
+ +
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+
+ +
+ +
+ +
+
diff --git a/src/OFS/dtml/listLocalRoles.dtml b/src/OFS/dtml/listLocalRoles.dtml index 15909719e2..a4f5b4f2da 100644 --- a/src/OFS/dtml/listLocalRoles.dtml +++ b/src/OFS/dtml/listLocalRoles.dtml @@ -1,111 +1,99 @@ - - - - -
-&dtml-stat; -
-
-

-Local roles allow you to give particular users extra roles in the context -of this object, in addition to the roles they already have. -

+ + +
+ +
&dtml-stat;
+ +

+ Local roles allow you to give particular users extra roles in the context + of this object, in addition to the roles they already have. + +
The following users have been given local roles. To modify the local roles + given to a particular user, click on the name of the user. To remove all + local roles from a user, select the checkbox next to the name of the user + and click the Remove button. +
+

- -

-The following users have been given local roles. To modify the local roles -given to a particular user, click on the name of the user. To remove all -local roles from a user, select the checkbox next to the name of the user -and click the Remove button. -

-
- - - - - - - - - - - -
- - -
- &dtml-sequence-key; (&dtml-sequence-item;, ) -
-
- -
- -
-
-
-
-

-To give a user extra roles when accessing this object (and its children), -select a user from the User list below, select the extra -roles that should be given to that user from the Roles list. -

-
- - - - - - - - - - - - - -
-
- User -
-
-
- Roles -
-
-
- - - + + + +
+ + +
+
+
+ +
+ + +
+ +
+

+ To give a user extra roles when accessing this object (and its children), + select a user from the User list below, select the extra + roles that should be given to that user from the Roles list. +

+ + + + + + + + + + + + + +
UserRoles
+ + " + required="required" /> + + + + + + +
+ +
+ +
- - - -
-
-
- -
-
-
- -
-
+
+ diff --git a/src/OFS/dtml/main.dtml b/src/OFS/dtml/main.dtml deleted file mode 100644 index b0b6b7131a..0000000000 --- a/src/OFS/dtml/main.dtml +++ /dev/null @@ -1,166 +0,0 @@ - - - - -
- - - - - - -
  -
-
/" method="get"> - 1"> - - - - - - - - -
-
-
-
- -
/" name="objectItems" method="post"> - - - - - - - - - - - - - - - - - - - - - - - - - -
-
Type
-
-
Name
-
-
Size
-
- - - &dtml-meta_type; - - - -
- - - - - 1 Kb - 1048576"> - Mb - - Kb - - - -   - - -   - -
-
- - - - - - -
-
- - - - - - - - - - - - - - - - -
-
- - - - - - -
-
-There are currently no items in &dtml-title_or_id; -

-
- - -
- -
-
-
- - - -
-
-
- - diff --git a/src/OFS/dtml/mainUser.dtml b/src/OFS/dtml/mainUser.dtml index 31710b1c7a..474947e847 100644 --- a/src/OFS/dtml/mainUser.dtml +++ b/src/OFS/dtml/mainUser.dtml @@ -1,53 +1,42 @@ + -
- -

-The following users have been defined. Click on the name of a -user to edit that user. -

- - - - - - - - - - - - - - - - -
- - - -
  - -
- - -
-
- -

-There are no users defined. -

- -

-

- -
-

-
-
+
- +
+ +

+ The following users have been defined. Click on the name of a + user to edit that user. +

+
+ +
+ + +
+ + + +
There are no users defined.
+ +
+ +
+ + + + +
+ + diff --git a/src/OFS/dtml/methodAdd.dtml b/src/OFS/dtml/methodAdd.dtml index 84aad23ee8..ba1bf167d4 100644 --- a/src/OFS/dtml/methodAdd.dtml +++ b/src/OFS/dtml/methodAdd.dtml @@ -1,71 +1,52 @@ - +
-

-A DTML Method is used to hold scripting tags and text content. -It can contain HTML, XML, plain text, structured-text, etcetera. -A DTML Method can contain DTML scripting tags which operate -in the context of the DTML Method's containing object. -A DTML Method differs from a DTML Document in that it does not -have properties and calls methods on its container object. -

+ -

-You may create a new DTML Method object using the form below. - You may also choose to upload an existing html file from your - local computer by clicking the Browse button. -

+

+ A DTML Method is used to hold scripting tags and text content. + It can contain HTML, XML, plain text, structured-text, etcetera. + A DTML Method can contain DTML scripting tags which operate + in the context of the DTML Method's containing object. + A DTML Method differs from a DTML Document in that it does not + have properties and calls methods on its container object. +
+ You may create a new DTML Method object using the form below. + You may also choose to upload an existing html file from your + local computer by clicking the Browse button. +

-
- - - - - - - - - - - - - - - - - -
-
- Id -
-
- -
-
- Title -
-
- -
-
- File -
-
- -
- -
- - -
-
-
+
- +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+
+ + +
+ + +
+ + diff --git a/src/OFS/dtml/owner.dtml b/src/OFS/dtml/owner.dtml index 8c4ec51bae..eadc1568d1 100644 --- a/src/OFS/dtml/owner.dtml +++ b/src/OFS/dtml/owner.dtml @@ -1,44 +1,48 @@ -

-Almost all Zope objects can be owned. When you create an object you -become its owner. Ownership matters for method objects since -it determines what roles they have when they are executed. See the -Proxy Roles view of method objects for more information. -

- -

- -This object is owned by &dtml-id; (&dtml-path;).unowned. - -

- - - -
-

-If you have the Take Ownership permission you can take ownership -of an object. Usually when taking ownership you should also take -ownership of sub-objects as well. -

- -
-

-

- -
-

-

-

- -Also take ownership of all sub-objects -
-

-
-
+
+ +

+ Almost all Zope objects can be owned. When you create an object you + become its owner. Ownership matters for method objects since + it determines what roles they have when they are executed. See the + Proxy Roles view of method objects for more information. +

+ +
+ This object is + + + owned by &dtml-id; (&dtml-path;). + + unowned. + +
+ + + +

+ If you have the Take Ownership permission you can take ownership + of an object. Usually when taking ownership you should also take + ownership of sub-objects as well. +

+ +
+ +
+ +
+ + +
+
+ +
+ +
+ +
diff --git a/src/OFS/dtml/permissionEdit.dtml b/src/OFS/dtml/permissionEdit.dtml index f5775c2a12..f331c9fe33 100644 --- a/src/OFS/dtml/permissionEdit.dtml +++ b/src/OFS/dtml/permissionEdit.dtml @@ -2,35 +2,34 @@ -

-Roles assigned to the permission &dtml-permission_to_manage; -

- -
-

- -

- -
-

- - -

-

-> -Also use roles acquired from folders containing this object -

- - -

-

- -
-

- + +
+ +

+ Roles assigned to the permission &dtml-permission_to_manage; +

+ +
+ + + + +
+ /> + +
+
+ +
+ +
+ +
+ +
diff --git a/src/OFS/dtml/properties.dtml b/src/OFS/dtml/properties.dtml index f677ed295d..b3f8799373 100644 --- a/src/OFS/dtml/properties.dtml +++ b/src/OFS/dtml/properties.dtml @@ -1,303 +1,224 @@ - - A site-global encoding specification in a property. - Note that this feature only works if there are no unicode objects - around. This means that this feature is not likely to be supported - in all future versions of zope. - - - + + A site-global encoding specification in a property. + Note that this feature only works if there are no unicode objects + around. This means that this feature is not likely to be supported + in all future versions of zope. + + + - - Thankfully no site-global encoding specification in a property. - We can set UTF-8, and unicode properties will work. - - - + + Thankfully no site-global encoding specification in a property. + We can set UTF-8, and unicode properties will work. + + + - - - - - - - - -
" method="post"> - -

-Properties allow you to assign simple values to Zope objects. To change -property values, edit the values and click "Save Changes". -

+ - - - - - - - + - - - - - - + + + + + + + +
-   - -
- Name -
-
-
- Value -
-
-
- Type -
-
- - - - - -
- - - -
-
- - - " /> - - " /> - - " /> - - " /> - - checked="checked" /> - - &dtml-sequence-item; " /> - - - - + - +
- -
- -
- -
- -
- -
- No value for &dtml-select_variable;. -
-
+ " method="post"> + +

+ Properties allow you to assign simple values to Zope objects. To change + property values, edit the values and click Save Changes. +

- + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - -
 NameValueType
+ + + +   + + + + + + + + " /> + " /> + " /> + " /> +
checked="checked" />
+ &dtml-sequence-item; " /> + + + We need to avoid any whitespaces in between these tags. + This unfortunately results in a very long line. + + + + + No value for &dtml-select_variable;. + + + + + + No value for &dtml-select_variable;. + + + Unknown property type + + + + + + Warning: + be aware that removing title without re-adding it might be dangerous. + + - -
- -
- -
- -
- -
- No value for &dtml-select_variable;. -
-
- - Unknown property type - - - - -
- -
-
- &dtml-type; -
-
-
Warning: be aware that removing 'title' - without re-adding it might be dangerous.
-
  -
- - - -
-
- - This needs some community review before exposing it officially. - - -  
+
&dtml-type;
- -

-Properties allow you to assign simple values to Zope objects. There are -currently no properties defined for this item. To add a property, enter a name, type -and value and click the "Add" button. - -

+
+ + + + This needs some community review before exposing it officially. + + + +
-
-
+ - +

+ Properties allow you to assign simple values to Zope objects. There are + currently no properties defined for this item. + + To add a property, enter a name, type and value and click the + Add button. + +

-
/manage_addProperty" - method="post"> + +
-

-To add a new property, enter a name, type and value for the new -property and click the "Add" button. -

+ +
/manage_addProperty" method="post" class="form-inline"> +

+ To add a new property, enter a name, type and value for the new + property and click the Add-button. +

+
+ string" value="" /> + + name="value:UTF-8:ustring" + name="value:string" + /> + +
+
+
- - - - - - - - - - - - -
-
- Name -
-
- string" - size="30" value="" /> - - Type - -
- -
-
-
- Value -
-
- - - - - - -
- -
-
- -
+
diff --git a/src/OFS/dtml/propertyType.dtml b/src/OFS/dtml/propertyType.dtml index ba809c6205..5cf298292f 100644 --- a/src/OFS/dtml/propertyType.dtml +++ b/src/OFS/dtml/propertyType.dtml @@ -1,135 +1,127 @@ - - - -Change Property Types - - + + - - - - - - - - - - - - -
" method="POST"> - -

-To change property names and values, edit them and click -"Save Changes". To edit properties using their new type, -select the new types and click "Edit with new Types" -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Property NameValueNew Type
- - - - - value="&dtml-sequence-item; " - - value="" - - value="&dtml-new_value;" - > - - CHECKED> - - - - - - - No value for &dtml-select_variable;. - - - - - - No value for &dtml-select_variable;. - - - Unknown property type - - - - -
- - - -
- - -

-No properties were selected for this item. -

- -
-
- - - +
+ + + + + + +
" method="post"> + + + +

+ To change property names and values, edit them and click + Save Changes. To edit properties using their new type, + select the new types and click Edit with new Types. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Property NameValueNew Type
+ + + value="&dtml-sequence-item; " + value="" + value="&dtml-new_value;" + > +
checked="checked" + />
+ + + No value for &dtml-select_variable;. + + + No value for &dtml-select_variable;. + + + Unknown property type + +
+ +
+ +
+ + +
+ + + +
No properties were selected for this item.
+ +
+ +
+ +
+ + \ No newline at end of file diff --git a/src/OFS/dtml/propertysheets.dtml b/src/OFS/dtml/propertysheets.dtml index 2396469a11..62d0c3ca3f 100644 --- a/src/OFS/dtml/propertysheets.dtml +++ b/src/OFS/dtml/propertysheets.dtml @@ -1,49 +1,53 @@ + -
" method="post"> - - - - - - - - - - - - - - - - -
- - - &dtml-id; () - - - This item has been modified in this session - - This item has been modified in another session - - -
- -
- - - - - - - -
Name: Namespace: - -
-
+
+ +
" method="post"> + + + + + + +
+ + + &dtml-id; () + This item has been modified in this session + This item has been modified in another session +
+ +
+ +
+ + +

+ To add a new property, enter a name, it's namespace and click the Add-button. +

+ +
+ + + +
+ +
+ +
diff --git a/src/OFS/dtml/renameForm.dtml b/src/OFS/dtml/renameForm.dtml index 6505c1befe..489c6f7400 100644 --- a/src/OFS/dtml/renameForm.dtml +++ b/src/OFS/dtml/renameForm.dtml @@ -1,62 +1,44 @@ - - - -
" method="post"> - - - - - - - - - - - - - -
-
- &dtml-getId; -
-
- - to: - - " value="&dtml-getId;" /> - - - may not be renamed. - - -
-
- - - -
-
-
- - -
-

-

- -You must select an item to rename. - -

- -

-
- -
+
+ +

Rename Items

+ + + +
" method="post" class="zmi-rename"> + + +
+ + + +
+ +
+ + +
+
+
+
+ + + +
+ +
+ + + + + +
+ Ok +
+ +
+ +
diff --git a/src/OFS/dtml/reportUserPermissions.dtml b/src/OFS/dtml/reportUserPermissions.dtml index 5b206dfcb5..2b650dc7d8 100644 --- a/src/OFS/dtml/reportUserPermissions.dtml +++ b/src/OFS/dtml/reportUserPermissions.dtml @@ -1,79 +1,76 @@ - - - -

-This listing shows the permissions and roles for particular user -in the context of the current object. -

+ - +
-User account : &dtml-user; -
-User account defined in: -
-
+

+ This listing shows the permissions and roles for particular user + in the context of the current object. +

- - - - - - - - - - - - - -
RolesRoles in context
-
    - -
  • &dtml-sequence-item; - -
-
-
    - -
  • &dtml-sequence-item; - -
-
+ +

+ User account : &dtml-user;
+ User account defined in: +

-
+ + + + + + + + + + + + + +
RolesRoles in context
+
    + +
  • &dtml-sequence-item; + +
+
+
    + +
  • &dtml-sequence-item; + +
+
+ + + + + + + + + + + + + + +
Allowed permissionsDisallowed permissions
+
    + +
  • &dtml-sequence-item; + +
+
+
    + +
  • &dtml-sequence-item; + +
+
- - - - - - - - - - - - - -
Allowed permissionsDisallowed permissions
-
    - -
  • &dtml-sequence-item; - -
-
-
    - -
  • &dtml-sequence-item; - -
-
+
- - +
- diff --git a/src/OFS/dtml/roleEdit.dtml b/src/OFS/dtml/roleEdit.dtml index abf555215d..b83963d249 100644 --- a/src/OFS/dtml/roleEdit.dtml +++ b/src/OFS/dtml/roleEdit.dtml @@ -1,32 +1,28 @@ + -

-Permissions assigned to the role &dtml-role_to_manage; -

- -
-

- -

- -
-

- -

-

- -
-

-
+
- +

+ Permissions assigned to the role &dtml-role_to_manage; +

+
+ + +
+ +
+
+
+ + diff --git a/src/OFS/dtml/userFolderProps.dtml b/src/OFS/dtml/userFolderProps.dtml index a410803298..1c397cf79d 100644 --- a/src/OFS/dtml/userFolderProps.dtml +++ b/src/OFS/dtml/userFolderProps.dtml @@ -1,40 +1,30 @@ - - -
- - - - - - - - - - - -
- Encrypt user passwords - - - -     - - -
- Role assignment presents search dialog when more users than N (-1 is always, 0 is never). - - -
- -

-

- -
-

+ - +
+ +
+
+ + + + +
+
+ + +
+
+ + + -1 is always, 0 is never +
+
+ +
+
+ +
- diff --git a/src/OFS/interfaces.py b/src/OFS/interfaces.py index ab08cdd151..9361ee4b81 100644 --- a/src/OFS/interfaces.py +++ b/src/OFS/interfaces.py @@ -752,8 +752,6 @@ class IFindSupport(Interface): """Find support for Zope Folders""" manage_findForm = Attribute(""" """) - manage_findAdv = Attribute(""" """) - manage_findResult = Attribute(""" """) def ZopeFind(obj, obj_ids=None, obj_metatypes=None, obj_searchterm=None, obj_expr=None, diff --git a/src/OFS/zpt/main.zpt b/src/OFS/zpt/main.zpt new file mode 100644 index 0000000000..1b91616cb7 --- /dev/null +++ b/src/OFS/zpt/main.zpt @@ -0,0 +1,262 @@ + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + Name + + +
+ + + + Broken object + + + + Id + + + + + +
+ +
+ + + + + + + + +
+
+ + +
+ There are currently no items in . +
+
+ + + + +
+
+
+
+ + + + + diff --git a/src/Products/PageTemplates/ZopePageTemplate.py b/src/Products/PageTemplates/ZopePageTemplate.py index 579ec94068..a2a888f174 100644 --- a/src/Products/PageTemplates/ZopePageTemplate.py +++ b/src/Products/PageTemplates/ZopePageTemplate.py @@ -75,6 +75,7 @@ class ZopePageTemplate(Script, PageTemplate, Cacheable, "Zope wrapper for Page Template using TAL, TALES, and METAL" meta_type = 'Page Template' + zmi_icon = 'far fa-file-code' output_encoding = 'utf-8' # provide default for old instances __code__ = FuncCode((), 0) @@ -407,7 +408,7 @@ def manage_addPageTemplate(self, id, title='', text='', encoding='utf-8', zpt = getattr(self, id) if RESPONSE: - if submit == " Add and Edit ": + if submit == "Add and Edit": RESPONSE.redirect(zpt.absolute_url() + '/pt_editForm') else: RESPONSE.redirect(self.absolute_url() + '/manage_main') diff --git a/src/Products/PageTemplates/www/ptAdd.zpt b/src/Products/PageTemplates/www/ptAdd.zpt index 3be06d03d9..b7b31c1e1f 100644 --- a/src/Products/PageTemplates/www/ptAdd.zpt +++ b/src/Products/PageTemplates/www/ptAdd.zpt @@ -1,52 +1,52 @@

Header

+ +
+

Form Title

- -

Page Templates allow you to use simple HTML or -XML attributes to create dynamic templates. You may choose to upload -the template text from a local file by typing the file name or using -the browse button.

- -
- - - - - - - - - - - - - - - - - -
-
Id
-
- -
-
File
-
- -
-
Encoding
-
- - (only used for non-XML and non-HTML content) -
-
- - -
-
+ tal:replace="structure here/manage_form_title">Form Title

+ +

+ Page Templates allow you to use simple HTML or + XML attributes to create dynamic templates. You may choose to upload + the template text from a local file by typing the file name or using + the browse button. +

+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ + Only used for non-XML and non-HTML content +
+
+ + +
+ + +
+ + +

Footer

diff --git a/src/Products/PageTemplates/www/ptEdit.zpt b/src/Products/PageTemplates/www/ptEdit.zpt index 7dc17aaca2..3c35411359 100644 --- a/src/Products/PageTemplates/www/ptEdit.zpt +++ b/src/Products/PageTemplates/www/ptEdit.zpt @@ -1,108 +1,122 @@ -

Header

+

manage_page_header

Tabs

- - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
-
Title
-
- - -
Content-Type
-
- -
- Browse HTML source - Browse XML source -
- - - Expand macros when editing -
Errors -
errors
-
- -
-
- Locked - -    -
-
+ tal:replace="structure context/manage_tabs">manage_tabs + + +
+ + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ 2018-01-01 00:00 +
+ + +
+ + + + + +
+ +
+ + + +
+ +
+
+ + + +
+
+ +
+ -

You can upload the text for - using the following form. -Choose an existing HTML or XML file from your local computer by -clicking browse. You can also click -context to view or download the current text.

- -
- - - - - - - - - - - - - - -
-
File  
-
- -
-
Encoding  
-
- - - (only used for non-XML and non-XHTML content) -
-
- Locked - -
-
+ + + + +

+ You can upload the text for + using the following form. + Choose an existing HTML or XML file from your local computer by + clicking browse. For non-XML and non-HTML content please set the + Encoding attribute. To view or download the current text click + here. +

+ +
+
+ + +
+
+ +
+
+ +
+
+ + Encoding only used for non-XML and non-HTML content + +
+

Footer

diff --git a/src/Products/SiteAccess/VirtualHostMonster.py b/src/Products/SiteAccess/VirtualHostMonster.py index 21ab52ddb5..e5b7c6b938 100644 --- a/src/Products/SiteAccess/VirtualHostMonster.py +++ b/src/Products/SiteAccess/VirtualHostMonster.py @@ -22,6 +22,7 @@ class VirtualHostMonster(Persistent, Item, Implicit): """ meta_type = 'Virtual Host Monster' + zmi_icon = 'fa fa-code-branch' priority = 25 id = 'virtual_hosting' diff --git a/src/Products/SiteAccess/www/VirtualHostMonster.dtml b/src/Products/SiteAccess/www/VirtualHostMonster.dtml index 7400646691..7972867df9 100644 --- a/src/Products/SiteAccess/www/VirtualHostMonster.dtml +++ b/src/Products/SiteAccess/www/VirtualHostMonster.dtml @@ -1,20 +1,20 @@ -

The Virtual Host Monster supports virtual hosting

+
+

The Virtual Host Monster supports virtual hosting

It changes the protocol, host, and/or path of URLs generated by Zope. Values affected include REQUEST variables starting with URL or BASE (such as URL1, BASE2, URLPATH0), and the absolute_url() methods of objects. By changing these, the Virtual Host Monster allows you to host several different domains in a single Zope. -

-

+
The most common sort of virtual hosting setup is one in which you create a Folder in your Zope root for each domain that you want to serve. For instance http://www.buystuff.com is -served from Folder /buystuff.com while -http://www.mycause.org is served from /mycause.org. +served from Folder /buystuff.com while http://www.mycause.org +is served from /mycause.org.

One is enough

@@ -34,15 +34,12 @@ of the following special path elements in a URL:

If the URL path of a request begins with "/VirtualHostBase/http/www.buystuff.com", for instance, then -URLs generated by Zope will start with -http://www.buystuff.com. +URLs generated by Zope will start with http://www.buystuff.com. Since the port number was not specified, it is left unchanged. If your Zope is running on port 8080, and you want generated URLs not to include this port number, you must use "/VirtualHostBase/http/www.buystuff.com:80". -

- -

+
If the URL contains VirtualHostRoot, then all path elements up to that point are removed from generated URLs. For instance, a request with path "/a/b/c/VirtualHostRoot/d" @@ -71,33 +68,27 @@ You could get the same effect in a standalone Zope by adding the line tab. In either case, requests for http://www.buystuff.com/anything will look for Zope object /buystuff.com/anything. -

- -

+
You should only use the "Mappings" tab for simple virtual hosting, in a Zope that is serving requests directly. Each mapping line is a host name followed by a path to a Folder. The VHM checks the host specified in each incoming request to see if it is in the list. If it is, then the corresponding path is inserted at the start of the path, followed by "VirtualHostRoot". -

-

-You can match -multiple subdomains by putting "*." in front of the host +
+You can match multiple subdomains by putting "*." in front of the host name, as in "*.buystuff.com". If an exact match exists, it is used instead of a wildcard match.

Inside-out hosting

-

Another use for virtual hosting is to make Zope appear to be part of a site controlled by another server. For example, Zope might only serve the contents of http://www.mycause.org/dynamic_stuff. To accomplish this, you want to add "dynamic_stuff" to the start of all Zope-generated URLs. -

-

+
If you insert VirtualHostRoot, followed by one or more path elements that start with '_vh_', then these elements will be ignored during traversal and then added (without the '_vh_') to the @@ -105,11 +96,12 @@ start of generated URLs. For instance, a request for "/a/VirtualHostRoot/_vh_z/" will traverse "a" and then generate URLs that start with /z. -

-

+
In our example, you would have the main server send requests for http://www.mycause.org/dynamic_stuff/anything to Zope, rewritten as /VirtualHostRoot/_vh_dynamic_stuff/anything.

+
+ diff --git a/src/Products/SiteAccess/www/manage_edit.dtml b/src/Products/SiteAccess/www/manage_edit.dtml index 1c2504025a..22d77d7efb 100644 --- a/src/Products/SiteAccess/www/manage_edit.dtml +++ b/src/Products/SiteAccess/www/manage_edit.dtml @@ -1,6 +1,7 @@ +

You may edit the mappings for this Virtual Host Monster using the form below. You don't need to use this tab if you are using @@ -12,35 +13,28 @@ probably need to manage Zope using its raw IP address to fix things.

- - - - - - - - -
+ Each line represents a path mapping for a single host (host/path), or a set of hosts (*.host/path). -
+ + -
-
-
+
- Locked + + - + -
-
+ +
+
diff --git a/src/Shared/DC/Scripts/dtml/scriptBindings.dtml b/src/Shared/DC/Scripts/dtml/scriptBindings.dtml index df19601f8b..29372be19a 100644 --- a/src/Shared/DC/Scripts/dtml/scriptBindings.dtml +++ b/src/Shared/DC/Scripts/dtml/scriptBindings.dtml @@ -1,136 +1,104 @@ + -

-Each of the following items describes a piece of information about -this script's calling environment. If you supply a variable name for -an item, or accept the recommended name, the information will -automatically be provided under that name when the script is called. -

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- Context -
-
-
- This is the object on which the script is being called, also known as the - "acquisition parent" of the script. This may be the - container, but varies according to the path through which the script is - accessed. -

- Recommended value: context -
-
- "> -
-
- Container -
-
-
- This is the &dtml-meta_type; - "&dtml.missing.html_quote-title_or_id;", in which this - script is located. This doesn't change unless you move the script. -

- Recommended value: container -
-
- "> -
-
- Script -
-
-
- This is the script object "&dtml-title_or_id;" itself. -

- Recommended value: script -
-
- "> -
-
- Namespace -
-
-
- When the script is called from DTML, this is the caller's DTML namespace, - otherwise it is an empty namespace. -

- Recommended value: _ (underscore character) -
-
- "> -
-
- Subpath -
-
-
- When the script is published directly from a URL, this is the - portion of the URL path after the script's name, split at slash separators - into a list of strings. Otherwise, it is an empty list. -

- Recommended value: traverse_subpath -
-
- "> -
-
-
- -
-
- -
+
+ +

+ Each of the following items describes a piece of information about + this script's calling environment. If you supply a variable name for + an item, or accept the recommended name, the information will + automatically be provided under that name when the script is called. +

+ +
+ + + +
+ +
+ "/> + Recommended value: context
+ + This is the object on which the script is being called, also known as the + "acquisition parent" of the script. This may be the + container, but varies according to the path through which the script is + accessed. + +
+
+
+ +
+ +
+ "/> + Recommended value: container
+ + This is the &dtml-meta_type; + "&dtml.missing.html_quote-title_or_id;", in which this + script is located. This doesn't change unless you move the script. + +
+
+
+ +
+ +
+ "/> + Recommended value: script
+ + This is the script object "&dtml-title_or_id;" itself. + +
+
+
+ +
+ +
+ "/> + Recommended value: _ (underscore character)
+ + When the script is called from DTML, this is the caller's + DTML namespace, otherwise it is an empty namespace. + +
+
+
+ + + +
+ +
+ "/> + Recommended value: traverse_subpath
+ + When the script is published directly from a URL, this is the + portion of the URL path after the script's name, split at slash separators + into a list of strings. Otherwise, it is an empty list. + +
+
+
+ + +
+ +
+ + + +
+ +
diff --git a/src/Shared/DC/Scripts/dtml/scriptTry.dtml b/src/Shared/DC/Scripts/dtml/scriptTry.dtml index 2303e267a7..0f98a746dd 100644 --- a/src/Shared/DC/Scripts/dtml/scriptTry.dtml +++ b/src/Shared/DC/Scripts/dtml/scriptTry.dtml @@ -1,49 +1,44 @@ + -

-Enter variable values to pass to the script in the form below and -click run script to view the result of the call. -

- -
- - - - - - - - - - - - - - - - - - -
-
- Parameter -
-
-
- Value -
-
- - - -
-
- -
-
-
+
+ +

+ Enter variable values to pass to the script in the form below and + click run script to view the result of the call. +

+ +
+ + + + + + + + + + + + + + + + + +
ParameterValue
+ + + +
+ +
+ +
+ +
+ +
diff --git a/src/Zope2/App/configure.zcml b/src/Zope2/App/configure.zcml index e99c1debfb..9ba1a437a6 100644 --- a/src/Zope2/App/configure.zcml +++ b/src/Zope2/App/configure.zcml @@ -17,4 +17,6 @@ + + diff --git a/versions-prod.cfg b/versions-prod.cfg index 59c7e3cce1..2684e5bdbd 100644 --- a/versions-prod.cfg +++ b/versions-prod.cfg @@ -15,9 +15,10 @@ ExtensionClass = 4.3.0 five.globalrequest = 99.1 five.localsitemanager = 3.1 funcsigs = 1.0.2 +future = 0.16.0 ipaddress = 1.0.22 -mock = 2.0.0 Missing = 4.0.1 +mock = 2.0.0 MultiMapping = 4.0 PasteDeploy = 1.5.2 pbr = 4.0.3 @@ -29,6 +30,7 @@ Products.ZCTextIndex = 4.0.2 pytz = 2018.4 Record = 3.4 RestrictedPython = 4.0b4 +shutilwhich = 1.1.0 six = 1.11.0 transaction = 2.2.1 waitress = 1.1.0