@presentation.render_for(Asset, model='edit')
def render_Asset_thumb(self, h, comp, model, *args):
    with h.div(class_='asset'):
        action = h.a.action(lambda: comp.answer(('delete', self))).get('onclick')
        onclick = _(u'Are you sure you want to delete this file?')
        onclick = u'if (confirm("%s")) { %s }' % (onclick, action)
        with h.a(class_='delete', title=_(u'Delete'), href='#', onclick=onclick):
            h << h.i(class_='icon-cancel')
        if self.is_image():
            with h.a(class_='cover', title=_(u'Configure cover')).action(lambda: comp.answer(('configure_cover', self))):
                if self.is_cover:
                    h << {'style': 'visibility: visible'}
                h << h.i(class_='icon-checkmark')
        with h.a(href=self.assets_manager.get_image_url(self.filename), target='_blank'):
            h << comp.render(h, 'thumb')
    return h.root
dataset/ETHPy150Open Net-ng/kansha/kansha/card_addons/gallery/view.py/render_Asset_thumb/original