no version number when object is not versioned

This commit is contained in:
Helmut Merz 2015-06-15 12:49:00 +02:00
parent 70e53daadf
commit 5fd52269af
2 changed files with 4 additions and 2 deletions

View file

@ -79,7 +79,7 @@
<tal:version tal:condition="view/useVersioning">
<td class="center"
tal:define="version object/version">
<a tal:omit-tag="python: version == '1.1'"
<a tal:omit-tag="python: version in ('1.1', '1', '')"
tal:attributes="href string:$url?loops.viewName=listversions"
tal:content="version">1.1</a>
</td>

View file

@ -275,7 +275,9 @@ class TrackDetails(BaseView):
else:
title = view.listingTitle
versionable = IVersionable(self.object, None)
version = versionable is not None and versionable.versionId or ''
version = ((versionable is not None and
not (versionable.notVersioned) and
versionable.versionId) or '')
return dict(object=obj, title=title,
type=self.longTypeTitle, url=url, version=version,
canAccess=canAccessObject(obj))