liquid_feedback_frontend

view app/main/member/_menu.lua @ 579:a06634d17718

Make available languages configurable
author bsw
date Wed Jun 20 11:31:59 2012 +0200 (2012-06-20)
parents 63d6549cc00b
children 95f214d91956
line source
1 ui.tag{ tag = "ul", content = function()
3 ui.tag{ tag = "li", content = function()
5 ui.link{
6 text = _"Show profile",
7 module = "member",
8 view = "show",
9 id = app.session.member_id
10 }
12 end }
14 ui.tag{ tag = "li", content = function()
16 ui.link{
17 content = function()
18 slot.put(_"Edit profile")
19 end,
20 module = "member",
21 view = "edit"
22 }
24 end }
26 ui.tag{ tag = "li", content = function()
28 ui.link{
29 content = function()
30 slot.put(_"Upload avatar/photo")
31 end,
32 module = "member",
33 view = "edit_images"
34 }
36 end }
38 ui.tag{ tag = "li", content = function()
40 ui.link{
41 content = _"Contacts",
42 module = 'contact',
43 view = 'list'
44 }
46 end }
48 ui.tag{ tag = "li", content = function()
50 ui.link{
51 text = _"Settings",
52 module = "member",
53 view = "settings"
54 }
56 end }
58 ui.tag{ tag = "li", content = function()
60 ui.link{
61 text = _"Logout",
62 module = 'index',
63 action = 'logout',
64 routing = {
65 default = {
66 mode = "redirect",
67 module = "index",
68 view = "index"
69 }
70 }
71 }
72 end }
74 ui.tag{ tag = "li", content = function()
75 ui.tag{ tag = "span", content = _"Select language" }
76 end }
78 for i, lang in ipairs(config.available_languages) do
79 ui.tag{ tag = "li", content = function()
80 ui.link{
81 content = _('Select language "#{langcode}"', { langcode = lang }),
82 module = "index",
83 action = "set_lang",
84 params = { lang = lang },
85 routing = {
86 default = {
87 mode = "redirect",
88 module = request.get_module(),
89 view = request.get_view(),
90 id = param.get_id_cgi(),
91 params = param.get_all_cgi()
92 }
93 }
94 }
95 end }
96 end
98 end }

Impressum / About Us