def content(self, items): return HTML.ul(*[ HTML.li( HTML.a(eid, href=self.dt.req.route_url('ecoregion', id=eid))) for eid in items ], class_='unstyled')
def format(self, item): taxon = self.get_obj(item) thumbnail = taxon.image_url('thumbnail', tag='thumbnail1') \ or taxon.image_url('thumbnail', index=0) if thumbnail: return HTML.img(src=thumbnail) return ''
def format(self, item): lis = [] if item.source: s = item.source if s.startswith('http://'): label = s for t in 'wikimedia wikipedia plantzafrica'.split(): if t in s: label = t break lis.append(external_link(s, label)) lis.append(linked_references(self.dt.req, item)) return HTML.ul(*lis, class_='unstyled')
def format(self, item): if hasattr(item, 'valueset'): item = item.valueset.language return HTML.span(map_marker_img(self.dt.req, item), item.lineage.name)
def format(self, item): res = NameCol.format(self, item) if item.editor: return HTML.span(res, HTML.span(' [ed.]')) return res
def format(self, item): return HTML.ul( *[HTML.li(o.name + ',') for o in getattr(item, self.__rel_name__)], class_="unstyled")
def content(self, items): return HTML.ul(*[ HTML.li(HTML.a(eid, href=self.dt.req.route_url('ecoregion', id=eid))) for eid in items], class_='unstyled')
def format(self, item): return HTML.ul( *[HTML.li(HTML.span(t, class_="label label-info")) for t in split_ids(item.name)], class_='unstyled')
def format(self, item): names = [ o.name for o in item.valueset.parameter.categories if o.language_pk == item.valueset.language_pk] return HTML.ul(*[HTML.li(name) for name in names], class_="unstyled")
def format(self, item): return HTML.ul(*[ HTML.li(HTML.span(t, class_="label label-info")) for t in split_ids(item.name) ], class_='unstyled')
def format(self, item): return HTML.img(src=item.jsondata['thumbnail'])
def format(self, item): return HTML.span(LinkCol.format(self, item), style="font-family: monospace;")
def format(self, item): obj = self.get_obj(item) names = [ self._cat(o) for o in obj.categories if o.language_pk in self.lang_dict] return HTML.ul(*[HTML.li(name) for name in names], class_="unstyled")
def format(self, item): item = self.get_obj(item) if item.thumbnail: return HTML.img(src=self.dt.req.file_url(item.thumbnail)) return ''