def render(self, request, **kwargs): items = Actions.render(self, request, **kwargs) self.rcontext.update(items=literal(items)) return actions.Action.render(self, request)
def __init__(self, *args, **kwargs): Actions.__init__(self, *args, **kwargs) actions.Action.__init__(self, **kwargs)
def render(self, request, **kwargs): items = Actions.render(self, request, **kwargs) self.rcontext.update(items=items) return actions.Action.render(self, request)
back = UIButton( id='back', content=_('Back'), _class='btn', attrs=dict(href="request.fa_url(request.model_name)"), ) delete = UIButton( id='delete', content=_('Delete'), permission='delete', _class='btn danger', attrs=dict(onclick=("var f = jQuery(this).parents('form');" "f.attr('action', window.location.href.replace('/edit', '/delete'));" "f.submit();")), ) cancel = UIButton( id='cancel', content=_('Cancel'), permission='view', _class='btn', attrs=dict(href="request.fa_url(request.model_name)"), ) defaults_actions = actions.defaults_actions.copy() defaults_actions['listing_buttons'] = Actions(new) defaults_actions['new_buttons'] = Actions(save, save_and_add_another, cancel) defaults_actions['edit_buttons'] = Actions(save, delete, cancel) defaults_actions['show_buttons'] = Actions(edit, back)
def __init__(self, *args, **kwargs): Actions.__init__(self) SidebarAction.__init__(self, *args, **kwargs)