def groups_list(): title = 'Groups' prompt = 'Choose' groups = app.groups_pages.keys() items = [(group, ext_url_for('.groups', group=group)) for group in groups] items.sort(key=lambda (group, ext_url): group) content = util.format_menu(title, prompt, items) return make_xml_response(content)
def menu(): title = 'Menu' prompt = 'Choose' groups = app.groups_pages.keys() search_url = '%s' % ext_url_for('.users') sample_search_url = '%s?phrase=%s' % (search_url, 'a') groups_url = ext_url_for('.groups_list') items = [(SEARCH_ITEM_TITLE, search_url), (GROUPS_ITEM_TITLE, groups_url)] content = util.format_menu(title, prompt, items) return make_xml_response(content)