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:
parent
e05ee9942b
commit
fb073e7779
2 changed files with 10 additions and 6 deletions
|
@ -3,14 +3,17 @@
|
|||
|
||||
<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">
|
||||
<div tal:attributes="class cell/cssClass;
|
||||
style cell/style">
|
||||
<a tal:attributes="href cell/url">
|
||||
<a tal:attributes="href cell/url;
|
||||
title cell/object/description">
|
||||
<img tal:condition="cell/img"
|
||||
tal:attributes="src cell/img/src"/>
|
||||
<span tal:content="cell/text" />
|
||||
<b tal:content="cell/text" /><br />
|
||||
<i tal:content="cell/object/description" />
|
||||
</a>
|
||||
</div>
|
||||
</tal:cell>
|
||||
|
|
|
@ -52,13 +52,14 @@ class Basic3Columns(ConceptView):
|
|||
cssClass = 'span-2'
|
||||
if idx % 3 == 2:
|
||||
cssClass += ' last'
|
||||
style = 'height: 200px'
|
||||
style = 'height: 260px'
|
||||
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
|
||||
|
||||
def getImageData(self, concept):
|
||||
for r in concept.getResources([self.defaultPredicate]):
|
||||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue