liquid_feedback_frontend

view app/main/supporter/_show_box.lua @ 8:374bbc2ff102

Version beta4

Bug fixed, which made it impossible to explicitly become interested in a topic

Fixed positioning of dialog for entering a new suggestion

Display of 404 pages
author bsw
date Sat Jan 02 12:00:00 2010 +0100 (2010-01-02)
parents afd9f769c7ae
children 72c5e0ee7c98
line source
2 slot.select("support", function()
3 local initiative = param.get("initiative", "table")
4 local supporter = Supporter:by_pk(initiative.id, app.session.member.id)
6 ui.container{
7 attr = { class = "actions" },
8 content = function()
9 if not initiative.issue.fully_frozen and not initiative.issue.closed then
10 if supporter then
11 if not supporter:has_critical_opinion() then
12 ui.container{
13 attr = {
14 class = "head head_supporter",
15 style = "cursor: pointer;",
16 onclick = "document.getElementById('support_content').style.display = 'block';"
17 },
18 content = function()
19 ui.image{
20 static = "icons/16/thumb_up_green.png"
21 }
22 slot.put(_"Your are supporter")
23 ui.image{
24 static = "icons/16/dropdown.png"
25 }
26 end
27 }
28 else
29 ui.container{
30 attr = {
31 class = "head head_potential_supporter",
32 style = "cursor: pointer;",
33 onclick = "document.getElementById('support_content').style.display = 'block';"
34 },
35 content = function()
36 ui.image{
37 static = "icons/16/thumb_up.png"
38 }
39 slot.put(_"Your are potential supporter")
40 ui.image{
41 static = "icons/16/dropdown.png"
42 }
43 end
44 }
45 end
46 ui.container{
47 attr = { class = "content", id = "support_content" },
48 content = function()
49 ui.container{
50 attr = {
51 class = "close",
52 style = "cursor: pointer;",
53 onclick = "document.getElementById('support_content').style.display = 'none';"
54 },
55 content = function()
56 ui.image{ static = "icons/16/cross.png" }
57 end
58 }
59 if supporter then
60 ui.link{
61 content = function()
62 ui.image{ static = "icons/16/thumb_down_red.png" }
63 slot.put(_"Remove my support from this initiative")
64 end,
65 module = "initiative",
66 action = "remove_support",
67 id = initiative.id,
68 routing = {
69 default = {
70 mode = "redirect",
71 module = request.get_module(),
72 view = request.get_view(),
73 id = param.get_id_cgi(),
74 params = param.get_all_cgi()
75 }
76 }
77 }
78 else
79 end
80 end
81 }
82 else
83 ui.link{
84 content = function()
85 ui.image{ static = "icons/16/thumb_up_green.png" }
86 slot.put(_"Support this initiative")
87 end,
88 module = "initiative",
89 action = "add_support",
90 id = initiative.id,
91 routing = {
92 default = {
93 mode = "redirect",
94 module = request.get_module(),
95 view = request.get_view(),
96 id = param.get_id_cgi(),
97 params = param.get_all_cgi()
98 }
99 }
100 }
101 end
102 end
103 end
104 }
105 end)

Impressum / About Us