| rev | line source | 
| bsw@641 | 1 ui.tag{ tag = "ul", content = function() | 
| bsw@641 | 2 | 
| bsw@641 | 3   if app.session.member_id then | 
| bsw@641 | 4     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 5 | 
| bsw@641 | 6       ui.link{ | 
| bsw@641 | 7         text = _"Show profile", | 
| bsw@641 | 8         module = "member", | 
| bsw@641 | 9         view = "show", | 
| bsw@641 | 10         id = app.session.member_id | 
| bsw@641 | 11       } | 
| bsw@641 | 12 | 
| bsw@641 | 13     end } | 
| bsw@641 | 14 | 
| bsw@641 | 15     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 16 | 
| bsw@641 | 17       ui.link{ | 
| bsw@641 | 18         content = function() | 
| bsw@641 | 19             slot.put(_"Edit profile") | 
| bsw@641 | 20         end, | 
| bsw@641 | 21         module = "member", | 
| bsw@641 | 22         view = "edit" | 
| bsw@641 | 23       } | 
| bsw@641 | 24 | 
| bsw@641 | 25     end } | 
| bsw@641 | 26 | 
| bsw@641 | 27     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 28 | 
| bsw@641 | 29       ui.link{ | 
| bsw@641 | 30         content = function() | 
| bsw@641 | 31             slot.put(_"Upload avatar/photo") | 
| bsw@641 | 32         end, | 
| bsw@641 | 33         module = "member", | 
| bsw@641 | 34         view = "edit_images" | 
| bsw@641 | 35       } | 
| bsw@641 | 36 | 
| bsw@641 | 37     end } | 
| bsw@641 | 38 | 
| bsw@641 | 39     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 40 | 
| bsw@641 | 41       ui.link{ | 
| bsw@641 | 42         content = _"Contacts", | 
| bsw@641 | 43         module = 'contact', | 
| bsw@641 | 44         view   = 'list' | 
| bsw@641 | 45       } | 
| bsw@641 | 46 | 
| bsw@641 | 47     end } | 
| bsw@641 | 48 | 
| bsw@641 | 49     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 50 | 
| bsw@641 | 51       ui.link{ | 
| bsw@641 | 52         text   = _"Settings", | 
| bsw@641 | 53         module = "member", | 
| bsw@641 | 54         view = "settings" | 
| bsw@641 | 55       } | 
| bsw@641 | 56 | 
| bsw@641 | 57     end } | 
| bsw@641 | 58 | 
| bsw@641 | 59     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 60 | 
| bsw@641 | 61       ui.link{ | 
| bsw@641 | 62         text   = _"Logout", | 
| bsw@641 | 63         module = 'index', | 
| bsw@641 | 64         action = 'logout', | 
| bsw@641 | 65         routing = { | 
| bsw@641 | 66           default = { | 
| bsw@641 | 67             mode = "redirect", | 
| bsw@641 | 68             module = "index", | 
| bsw@641 | 69             view = "index" | 
| bsw@641 | 70           } | 
| bsw@641 | 71         } | 
| bsw@641 | 72       } | 
| bsw@641 | 73     end } | 
| bsw@641 | 74   end | 
| bsw@641 | 75 | 
| bsw@729 | 76   for i, lang in ipairs(config.enabled_languages) do | 
| bsw@641 | 77 | 
| bsw@641 | 78     local langcode | 
| bsw@641 | 79 | 
| bsw@641 | 80     locale.do_with({ lang = lang }, function() | 
| bsw@641 | 81       langcode = _("[Name of Language]") | 
| bsw@641 | 82     end) | 
| bsw@641 | 83 | 
| bsw@641 | 84     ui.tag{ tag = "li", content = function() | 
| bsw@641 | 85       ui.link{ | 
| bsw@641 | 86         content = _('Select language "#{langcode}"', { langcode = langcode }), | 
| bsw@641 | 87         module = "index", | 
| bsw@641 | 88         action = "set_lang", | 
| bsw@641 | 89         params = { lang = lang }, | 
| bsw@641 | 90         routing = { | 
| bsw@641 | 91           default = { | 
| bsw@641 | 92             mode = "redirect", | 
| bsw@641 | 93             module = request.get_module(), | 
| bsw@641 | 94             view = request.get_view(), | 
| bsw@641 | 95             id = param.get_id_cgi(), | 
| bsw@641 | 96             params = param.get_all_cgi() | 
| bsw@641 | 97           } | 
| bsw@641 | 98         } | 
| bsw@641 | 99       } | 
| bsw@641 | 100     end } | 
| bsw@641 | 101   end | 
| bsw@641 | 102 | 
| bsw@641 | 103 end } | 
| bsw@641 | 104 |