do not show version number for unversioned objects in listings, suppress versioning portlet accordingly
This commit is contained in:
parent
a51e8e3f19
commit
b1a408bb9c
3 changed files with 4 additions and 4 deletions
|
@ -239,7 +239,7 @@
|
||||||
<tal:version tal:condition="view/useVersioning">
|
<tal:version tal:condition="view/useVersioning">
|
||||||
<td class="center"
|
<td class="center"
|
||||||
tal:define="versionId related/versionId">
|
tal:define="versionId related/versionId">
|
||||||
<a href="#"
|
<a tal:condition="not:related/versionable/notVersioned|nothing"
|
||||||
tal:content="versionId"
|
tal:content="versionId"
|
||||||
tal:omit-tag="python: versionId=='1.1'"
|
tal:omit-tag="python: versionId=='1.1'"
|
||||||
tal:define="url python: view.getUrlForTarget(related)"
|
tal:define="url python: view.getUrlForTarget(related)"
|
||||||
|
|
|
@ -146,9 +146,9 @@ class ResourceView(BaseView):
|
||||||
subMacro=self.template.macros['related'],
|
subMacro=self.template.macros['related'],
|
||||||
priority=20, info=self)
|
priority=20, info=self)
|
||||||
versionable = IVersionable(self.context, None)
|
versionable = IVersionable(self.context, None)
|
||||||
if versionable is not None and len(versionable.versions) > 1:
|
if (versionable is not None and
|
||||||
|
not versionable.notVersioned and len(versionable.versions) > 1):
|
||||||
cont.macros.register('portlet_right', 'versions',
|
cont.macros.register('portlet_right', 'versions',
|
||||||
#title=' '. join((_('Version'), versionable.versionId)),
|
|
||||||
title=_(u'Version ${versionId}',
|
title=_(u'Version ${versionId}',
|
||||||
mapping=dict(versionId=versionable.versionId)),
|
mapping=dict(versionId=versionable.versionId)),
|
||||||
subMacro=version_macros.macros['portlet_versions'],
|
subMacro=version_macros.macros['portlet_versions'],
|
||||||
|
|
|
@ -129,7 +129,7 @@
|
||||||
<tal:version condition="view/useVersioning">
|
<tal:version condition="view/useVersioning">
|
||||||
<td class="center"
|
<td class="center"
|
||||||
tal:define="versionId row/versionId|string:">
|
tal:define="versionId row/versionId|string:">
|
||||||
<a href="#"
|
<a tal:condition="not:row/versionable/notVersioned|nothing"
|
||||||
tal:content="versionId"
|
tal:content="versionId"
|
||||||
tal:omit-tag="python: versionId and versionId=='1.1'"
|
tal:omit-tag="python: versionId and versionId=='1.1'"
|
||||||
tal:attributes="href
|
tal:attributes="href
|
||||||
|
|
Loading…
Add table
Reference in a new issue