@presentation.render_for(Board, model="menu")
def render_Board_menu(self, h, comp, *args):
    with h.div(class_='nav-menu'):
        with h.ul(class_='actions'):
            h << h.li(h.a(self.icons['preferences']).action(self.show_preferences))
            if security.has_permissions('edit', self):
                h << h.li(h.a(self.icons['add_list']).action(self.add_list))
                h << h.li(h.a(self.icons['edit_desc']).action(self.edit_description))
            if security.has_permissions('manage', self):
                h << h.li(h.a(self.icons['save_template']).action(self.save_template, comp))

            h << h.li(h.a(self.icons['export']).action(self.export))
            h << h.li(h.a(self.icons['history']).action(self.show_actionlog))

            if security.has_permissions('manage', self):
                h << h.li(h.a(
                    self.icons['archive'],
                    onclick=(
                        'return confirm(%s)' %
                        ajax.py2js(
                            _("This board will be archived. Are you sure?")
                        ).decode('UTF-8')
                    )
                ).action(self.archive, comp))
            else:
                h << h.li(h.a(
                    self.icons['leave'],
                    onclick=(
                        "return confirm(%s)" +
                        ajax.py2js(
                            _("You won't be able to access this board anymore. Are you sure you want to leave it anyway?")
                        ).decode('UTF-8')
                    )
                ).action(self.leave, comp))

        h << h.span(_(u'Board'), class_="title", id='board-nav-menu')
    return h.root
dataset/ETHPy150Open Net-ng/kansha/kansha/board/view.py/render_Board_menu/operator `%` -> `+`