liquid_feedback_frontend

view app/main/index/index.lua @ 4:80c215dbf076

Version alpha5

Many optical changes and improved usability

Support for different wiki-formatting-engines

Help system
author bsw/jbe
date Thu Dec 10 12:00:00 2009 +0100 (2009-12-10)
parents 3bfb2fcf7ab9
children afd9f769c7ae
line source
1 slot.select("title", function()
2 execute.view{
3 module = "member_image",
4 view = "_show",
5 params = {
6 member = app.session.member,
7 image_type = "avatar"
8 }
9 }
10 end)
12 slot.select("title", function()
13 ui.container{
14 attr = { class = "lang_chooser" },
15 content = function()
16 for i, lang in ipairs{"en", "de"} do
17 ui.link{
18 content = function()
19 ui.image{
20 static = "lang/" .. lang .. ".png",
21 attr = { style = "margin-left: 0.5em;", alt = lang }
22 }
23 end,
24 module = "index",
25 action = "set_lang",
26 params = { lang = lang },
27 routing = {
28 default = {
29 mode = "redirect",
30 module = request.get_module(),
31 view = request.get_view(),
32 id = param.get_id_cgi(),
33 params = param.get_all_cgi()
34 }
35 }
36 }
37 end
38 end
39 }
40 end)
42 slot.put_into("title", encode.html(config.app_title))
44 slot.select("actions", function()
46 ui.link{
47 content = function()
48 ui.image{ static = "icons/16/application_form.png" }
49 slot.put(_"Edit my profile")
50 end,
51 module = "member",
52 view = "edit"
53 }
55 ui.link{
56 content = function()
57 ui.image{ static = "icons/16/user_gray.png" }
58 slot.put(_"Upload images")
59 end,
60 module = "member",
61 view = "edit_images"
62 }
64 execute.view{
65 module = "delegation",
66 view = "_show_box"
67 }
69 ui.link{
70 content = function()
71 ui.image{ static = "icons/16/key.png" }
72 slot.put(_"Change password")
73 end,
74 module = "index",
75 view = "change_password"
76 }
78 end)
80 local lang = locale.get("lang")
81 local basepath = request.get_app_basepath()
82 local file_name = basepath .. "/locale/motd/" .. lang .. ".txt"
83 local file = io.open(file_name)
84 if file ~= nil then
85 local help_text = file:read("*a")
86 if #help_text > 0 then
87 ui.container{
88 attr = { class = "motd wiki" },
89 content = function()
90 slot.put(format.wiki_text(help_text))
91 end
92 }
93 end
94 end
97 util.help("index.index", _"Home")
99 execute.view{
100 module = "member",
101 view = "_show",
102 params = { member = app.session.member }
103 }

Impressum / About Us