Commit af2297bd authored by Nicolas Chauvat's avatar Nicolas Chauvat
Browse files

[views] max height for classified ads images in primary view

parent d2b6cae9c16c
......@@ -50,7 +50,7 @@ class ClassifiedAdPrimaryView(primary.PrimaryView):
def render_entity_relations(self, entity, siderelations=None):
super(ClassifiedAdPrimaryView, self).render_entity_relations(entity, siderelations)
if entity.has_image:
self.w(u'<div><img src="%s" /></div>' % entity.has_image[0].uri)
self.w(u'<div><img style="max-height: 100px" src="%s" /></div>' % entity.has_image[0].uri)
class ClassifiedAdInContextView(baseviews.SameETypeListItemView):
__select__ = implements('ClassifiedAd')
......@@ -115,7 +115,7 @@ class ClosestAdsBox(box.EntityBoxTemplate):
scores = entity.closest_ads()
if scores:
self.w(u'<div class="sideBox">')
self.w(u'<div class="sideBoxTitle"><span>%s</span></div>' % 'Similar ads')
self.w(u'<div class="sideBoxTitle"><span>%s</span></div>' % _('Similar ads'))
self.w(u'<div class="%s"><div class="sideBoxBody">' % 'sideBox')
for score, eid in scores[:5]:
self.w(u'<span>%s - %s</span><br />' % (score, self._cw.entity_from_eid(eid).view('outofcontext')))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment