minor improvement of standard lobo 3-column layout

git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3976 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2010-08-25 14:14:03 +00:00
parent e05ee9942b
commit fb073e7779
2 changed files with 10 additions and 6 deletions

View file

@ -3,14 +3,17 @@
<metal:block define-macro="basic-image"> <metal:block define-macro="basic-image">
<h1 tal:content="item/title" /> <h1 tal:attributes="ondblclick item/openEditWindow"
tal:content="item/title" />
<tal:cell repeat="cell item/content"> <tal:cell repeat="cell item/content">
<div tal:attributes="class cell/cssClass; <div tal:attributes="class cell/cssClass;
style cell/style"> style cell/style">
<a tal:attributes="href cell/url"> <a tal:attributes="href cell/url;
title cell/object/description">
<img tal:condition="cell/img" <img tal:condition="cell/img"
tal:attributes="src cell/img/src"/> tal:attributes="src cell/img/src"/>
<span tal:content="cell/text" /> <b tal:content="cell/text" /><br />
<i tal:content="cell/object/description" />
</a> </a>
</div> </div>
</tal:cell> </tal:cell>

View file

@ -52,13 +52,14 @@ class Basic3Columns(ConceptView):
cssClass = 'span-2' cssClass = 'span-2'
if idx % 3 == 2: if idx % 3 == 2:
cssClass += ' last' cssClass += ' last'
style = 'height: 200px' style = 'height: 260px'
result.append(dict(text=text, url=url, cssClass=cssClass, result.append(dict(text=text, url=url, cssClass=cssClass,
style=style, img=self.getImageData(c))) style=style, img=self.getImageData(c),
object=adapted(c)))
return result return result
def getImageData(self, concept): def getImageData(self, concept):
for r in concept.getResources([self.defaultPredicate]): for r in concept.getResources([self.defaultPredicate]):
if r.contentType.startswith('image/'): if r.contentType.startswith('image/'):
src = '%s/mediaasset.html?v=medium' % self.nodeView.getUrlForTarget(r) src = '%s/mediaasset.html?v=small' % self.nodeView.getUrlForTarget(r)
return dict(src=src) return dict(src=src)