liquid_feedback_frontend

view app/main/supporter/_show_box.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 5c601807d397
children afd9f769c7ae
line source
2 slot.select("support", function()
3 local initiative = param.get("initiative", "table")
4 local supported = Supporter:by_pk(initiative.id, app.session.member.id) and true or false
6 ui.container{
7 attr = { class = "actions" },
8 content = function()
9 if not initiative.issue.frozen and not initiative.issue.closed then
10 if supported then
11 ui.container{
12 attr = {
13 class = "head head_active",
14 style = "cursor: pointer;",
15 onclick = "document.getElementById('support_content').style.display = 'block';"
16 },
17 content = function()
18 ui.image{
19 static = "icons/16/thumb_up_green.png"
20 }
21 slot.put(_"Your are supporter")
22 ui.image{
23 static = "icons/16/dropdown.png"
24 }
25 end
26 }
27 ui.container{
28 attr = { class = "content", id = "support_content" },
29 content = function()
30 ui.container{
31 attr = {
32 class = "close",
33 style = "cursor: pointer;",
34 onclick = "document.getElementById('support_content').style.display = 'none';"
35 },
36 content = function()
37 ui.image{ static = "icons/16/cross.png" }
38 end
39 }
40 if supported then
41 ui.link{
42 content = function()
43 ui.image{ static = "icons/16/thumb_down_red.png" }
44 slot.put(_"Remove my support from this initiative")
45 end,
46 module = "initiative",
47 action = "remove_support",
48 id = initiative.id,
49 routing = {
50 default = {
51 mode = "redirect",
52 module = request.get_module(),
53 view = request.get_view(),
54 id = param.get_id_cgi(),
55 params = param.get_all_cgi()
56 }
57 }
58 }
59 else
60 end
61 end
62 }
63 else
64 ui.link{
65 content = function()
66 ui.image{ static = "icons/16/thumb_up_green.png" }
67 slot.put(_"Support this initiative")
68 end,
69 module = "initiative",
70 action = "add_support",
71 id = initiative.id,
72 routing = {
73 default = {
74 mode = "redirect",
75 module = request.get_module(),
76 view = request.get_view(),
77 id = param.get_id_cgi(),
78 params = param.get_all_cgi()
79 }
80 }
81 }
82 end
83 end
84 end
85 }
86 end)

Impressum / About Us