[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/service -
__init__.py:1.18 services.pt:1.7
Richard Jones
richard at commonground.com.au
Mon Feb 9 00:45:34 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/browser/services/service
In directory cvs.zope.org:/tmp/cvs-serv26351/app/browser/services/service
Modified Files:
__init__.py services.pt
Log Message:
make the "inherited" services accessible
=== Zope3/src/zope/app/browser/services/service/__init__.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/browser/services/service/__init__.py:1.17 Mon Feb 9 00:35:20 2004
+++ Zope3/src/zope/app/browser/services/service/__init__.py Mon Feb 9 00:45:33 2004
@@ -322,11 +322,12 @@
"""
if items is None:
items = {}
- manageable = True # is manageable from this View (easily)
# make sure no-one tries to use this starting at the global service
# manager
assert ISiteManager.isImplementedBy(sm)
+ manageable = True
else:
+ # don't want the "change registration" link for parent services
manageable = False
if IGlobalServiceManager.isImplementedBy(sm):
@@ -339,7 +340,7 @@
if sm.queryService(type_name) is not None:
names.append(type_name)
items[type_name] = {'name': type_name, 'url': '',
- 'manageable': False, 'parent': 'global'}
+ 'parent': 'global', 'disabled': False, 'manageable': False}
return
for name in sm.listRegistrationNames():
@@ -357,8 +358,8 @@
zapi.getView(component, 'absolute_url', request))
else:
url = ""
- items[name] = {'name': name, 'url': url, 'manageable': manageable,
- 'parent': 'parent'}
+ items[name] = {'name': name, 'url': url, 'parent': 'parent',
+ 'disabled': not url, 'manageable': manageable}
# look for more
gatherConfiguredServices(getNextServiceManager(sm), request, items)
=== Zope3/src/zope/app/browser/services/service/services.pt 1.6 => 1.7 ===
--- Zope3/src/zope/app/browser/services/service/services.pt:1.6 Mon Feb 9 00:11:36 2004
+++ Zope3/src/zope/app/browser/services/service/services.pt Mon Feb 9 00:45:33 2004
@@ -21,8 +21,8 @@
<div tal:condition="registries">
<p i18n:translate="">
- Unless a service is disabled or is provided by a parent site manager,
- the service name links to the active service.
+ Unless a service is disabled the service name links to the
+ active service.
The (change registration)
link allows activating a different implementation or
disabling the service altogether.
@@ -36,17 +36,18 @@
name="selected:list" tal:attributes="value reg/name" />
</td>
<td>
- <tal:block condition="reg/manageable">
- <a href="(link to the active service)"
- tal:condition="reg/url"
- tal:attributes= "href reg/url"
- tal:content="reg/name">
- Foobar (the service type)
- </a>
- <span tal:condition="not:reg/url"
+ <a href="(link to the active service)"
+ tal:condition="reg/url"
+ tal:attributes= "href reg/url"
+ tal:content="reg/name">
+ Foobar (the service type)
+ </a>
+
+ <span tal:condition="reg/disabled"
tal:replace="string:${reg/name} (disabled)" />
- </tal:block>
- <span tal:condition="not:reg/manageable" tal:replace="reg/name" />
+
+ <span tal:condition="python:not reg['url'] and not reg['disabled']"
+ tal:replace="reg/name" />
</td>
<td>
<tal:block condition="reg/manageable">
More information about the Zope3-Checkins
mailing list