liquid_feedback_frontend
view app/main/index/index.lua @ 159:5d797c6706d5
implement quorum display
show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Sat Oct 09 03:42:48 2010 +0200 (2010-10-09) |
parents | 7d0f4721d2f3 |
children | e3613831cd1e 79710861a3c3 |
line source
1 slot.select("title", function()
2 if app.session.member then
3 execute.view{
4 module = "member_image",
5 view = "_show",
6 params = {
7 member = app.session.member,
8 image_type = "avatar"
9 }
10 }
11 end
12 end)
14 slot.select("title", function()
15 ui.container{
16 attr = { class = "lang_chooser" },
17 content = function()
18 for i, lang in ipairs{"en", "de", "eo"} do
19 ui.link{
20 content = function()
21 ui.image{
22 static = "lang/" .. lang .. ".png",
23 attr = { style = "margin-left: 0.5em;", alt = lang }
24 }
25 end,
26 text = _('Select language "#{langcode}"', { langcode = lang }),
27 module = "index",
28 action = "set_lang",
29 params = { lang = lang },
30 routing = {
31 default = {
32 mode = "redirect",
33 module = request.get_module(),
34 view = request.get_view(),
35 id = param.get_id_cgi(),
36 params = param.get_all_cgi()
37 }
38 }
39 }
40 end
41 end
42 }
43 end)
45 slot.put_into("title", encode.html(config.app_title))
47 if app.session.member then
48 app.html_title.title = app.session.member.name
49 end
52 slot.select("actions", function()
54 if app.session.member then
55 ui.link{
56 content = function()
57 ui.image{ static = "icons/16/application_form.png" }
58 slot.put(_"Edit my profile")
59 end,
60 module = "member",
61 view = "edit"
62 }
63 ui.link{
64 content = function()
65 ui.image{ static = "icons/16/user_gray.png" }
66 slot.put(_"Upload images")
67 end,
68 module = "member",
69 view = "edit_images"
70 }
71 execute.view{
72 module = "delegation",
73 view = "_show_box"
74 }
75 ui.link{
76 content = function()
77 ui.image{ static = "icons/16/wrench.png" }
78 slot.put(_"Settings")
79 end,
80 module = "member",
81 view = "settings"
82 }
83 if config.download_dir then
84 ui.link{
85 content = function()
86 ui.image{ static = "icons/16/database_save.png" }
87 slot.put(_"Download")
88 end,
89 module = "index",
90 view = "download"
91 }
92 end
93 end
94 end)
96 util.help("index.index", _"Home")
98 execute.view{
99 module = "member",
100 view = "_show",
101 params = {
102 member = app.session.member,
103 show_as_homepage = true
104 }
105 }