def embed(self, asset, width="100%", height=500): path = asset.path + '/view:download/' + asset.filename + "?inline=True" download = path = asset.path + '/view:download/' + asset.filename return tag.embed ( src = path, width = width, height = height, type = "application/pdf" ) [ tag.p [ "If you are unable to view this PDF inline, feel free to ", tag.a ( href = download ) [ "download it" ], "." ] ]
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 []) ] ]
def template(self): return tag.a ( id = self.name + "-link", **self.args ) [ self.title ]