bsw@641: ui.tag{ tag = "ul", content = function() bsw@641: bsw@641: if app.session.member_id then bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: text = _"Show profile", bsw@641: module = "member", bsw@641: view = "show", bsw@641: id = app.session.member_id bsw@641: } bsw@641: bsw@641: end } bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: content = function() bsw@641: slot.put(_"Edit profile") bsw@641: end, bsw@641: module = "member", bsw@641: view = "edit" bsw@641: } bsw@641: bsw@641: end } bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: content = function() bsw@641: slot.put(_"Upload avatar/photo") bsw@641: end, bsw@641: module = "member", bsw@641: view = "edit_images" bsw@641: } bsw@641: bsw@641: end } bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: content = _"Contacts", bsw@641: module = 'contact', bsw@641: view = 'list' bsw@641: } bsw@641: bsw@641: end } bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: text = _"Settings", bsw@641: module = "member", bsw@641: view = "settings" bsw@641: } bsw@641: bsw@641: end } bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: bsw@641: ui.link{ bsw@641: text = _"Logout", bsw@641: module = 'index', bsw@641: action = 'logout', bsw@641: routing = { bsw@641: default = { bsw@641: mode = "redirect", bsw@641: module = "index", bsw@641: view = "index" bsw@641: } bsw@641: } bsw@641: } bsw@641: end } bsw@641: end bsw@641: bsw@729: for i, lang in ipairs(config.enabled_languages) do bsw@641: bsw@641: local langcode bsw@641: bsw@641: locale.do_with({ lang = lang }, function() bsw@641: langcode = _("[Name of Language]") bsw@641: end) bsw@641: bsw@641: ui.tag{ tag = "li", content = function() bsw@641: ui.link{ bsw@641: content = _('Select language "#{langcode}"', { langcode = langcode }), bsw@641: module = "index", bsw@641: action = "set_lang", bsw@641: params = { lang = lang }, bsw@641: routing = { bsw@641: default = { bsw@641: mode = "redirect", bsw@641: module = request.get_module(), bsw@641: view = request.get_view(), bsw@641: id = param.get_id_cgi(), bsw@641: params = param.get_all_cgi() bsw@641: } bsw@641: } bsw@641: } bsw@641: end } bsw@641: end bsw@641: bsw@641: end } bsw@641: