use image description (if present) instead of title for display
This commit is contained in:
parent
df7b0b7bba
commit
56bc752702
2 changed files with 8 additions and 5 deletions
|
@ -83,7 +83,8 @@
|
||||||
style cell/style">
|
style cell/style">
|
||||||
<metal:image use-macro="item/macros/image" />
|
<metal:image use-macro="item/macros/image" />
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<a tal:attributes="href cell/targetUrl"><b tal:content="cell/title" /></a>
|
<a tal:attributes="href cell/targetUrl">
|
||||||
|
<b tal:content="python: cell.description or cell.title" /></a>
|
||||||
<span tal:condition="cell/img/showInfo|nothing">
|
<span tal:condition="cell/img/showInfo|nothing">
|
||||||
<a tal:define="url string:${cell/img/url}/meta_info.html"
|
<a tal:define="url string:${cell/img/url}/meta_info.html"
|
||||||
tal:attributes="href url;
|
tal:attributes="href url;
|
||||||
|
@ -93,7 +94,7 @@
|
||||||
string:${controller/resourceBase}/cybertools.icons/info.png" />
|
string:${controller/resourceBase}/cybertools.icons/info.png" />
|
||||||
</a></span>
|
</a></span>
|
||||||
<br />
|
<br />
|
||||||
<i tal:content="cell/description" />
|
<!--<i tal:content="cell/description" />-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</tal:cell>
|
</tal:cell>
|
||||||
|
@ -104,11 +105,10 @@
|
||||||
|
|
||||||
<metal:image define-macro="image">
|
<metal:image define-macro="image">
|
||||||
<tal:img condition="cell/img">
|
<tal:img condition="cell/img">
|
||||||
<a title="Information about this object."
|
<a dojoType="dojox.image.Lightbox" group="mediasset"
|
||||||
dojoType="dojox.image.Lightbox" group="mediasset"
|
|
||||||
i18n:attributes="title"
|
i18n:attributes="title"
|
||||||
tal:attributes="href cell/img/fullImageUrl;
|
tal:attributes="href cell/img/fullImageUrl;
|
||||||
title cell/img/title">
|
title python: cell.img['description'] or cell.img['title']">
|
||||||
<img tal:condition="showImageLink|python:False"
|
<img tal:condition="showImageLink|python:False"
|
||||||
tal:attributes="src cell/img/src;
|
tal:attributes="src cell/img/src;
|
||||||
class cell/img/cssClass;
|
class cell/img/cssClass;
|
||||||
|
|
|
@ -144,6 +144,7 @@ class ConceptView(BaseConceptView):
|
||||||
adImg = adapted(r)
|
adImg = adapted(r)
|
||||||
showInfo = adImg.showInfo and adImg.metaInfo
|
showInfo = adImg.showInfo and adImg.metaInfo
|
||||||
return dict(src=src, fullImageUrl=fullSrc, title=r.title,
|
return dict(src=src, fullImageUrl=fullSrc, title=r.title,
|
||||||
|
description=r.description,
|
||||||
url=url, cssClass=self.parentView.imageCssClass,
|
url=url, cssClass=self.parentView.imageCssClass,
|
||||||
showInfo=showInfo)
|
showInfo=showInfo)
|
||||||
|
|
||||||
|
@ -313,6 +314,7 @@ class ConceptRelationView(BaseConceptRelationView, ConceptView):
|
||||||
adImg = adapted(r)
|
adImg = adapted(r)
|
||||||
showInfo = adImg.showInfo and adImg.metaInfo
|
showInfo = adImg.showInfo and adImg.metaInfo
|
||||||
return dict(src=src, fullImageUrl=fullSrc, title=r.title,
|
return dict(src=src, fullImageUrl=fullSrc, title=r.title,
|
||||||
|
description=r.description,
|
||||||
url=url, cssClass=self.parentView.imageCssClass,
|
url=url, cssClass=self.parentView.imageCssClass,
|
||||||
showInfo=showInfo)
|
showInfo=showInfo)
|
||||||
|
|
||||||
|
@ -347,6 +349,7 @@ class ResourceView(BaseResourceView):
|
||||||
adImg = adapted(self.context)
|
adImg = adapted(self.context)
|
||||||
showInfo = adImg.showInfo and adImg.metaInfo
|
showInfo = adImg.showInfo and adImg.metaInfo
|
||||||
return dict(src=src, fullImageUrl=fullSrc, title=self.context.title,
|
return dict(src=src, fullImageUrl=fullSrc, title=self.context.title,
|
||||||
|
description=self.context.description,
|
||||||
url=url, cssClass=self.parentView.imageCssClass,
|
url=url, cssClass=self.parentView.imageCssClass,
|
||||||
showInfo=showInfo)
|
showInfo=showInfo)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue