示例#1
0
 def template(self):
     return tag.div ( **self.args ) [
             tag.input ( type = 'submit', name = self.name, value = self.title )
         ]
示例#2
0
 def template(self):
     return tag.footer [ tag.menu ( id = self.name + '-footer', class_ = "buttons footer" ) [
             [ tag.li ( class_ = "current" ) [ tag.input ( type = 'submit', value = self.title ) ] ] +
             ([ tag.li [ tag.a ( href = self.referrer ) [ "Cancel" ] ] ] if self.referrer else []) +
             ([ tag.div ( class_ = "fr" ) [ tag.li [ [ child(self.data) for child in self.children ] ] ] ] if self.children else [])
         ] ]
示例#3
0
    def embed(self, asset, width=None, height=None, caption=None, align=None):
        path = asset.path + "/view:download/" + asset.filename + "?inline=True"

        img = tag.img(src=path, width=width, height=height)

        return img if not caption else tag.div(strip=True)[img, tag.br, caption]