liquid_feedback_frontend

view app/main/supporter/_show_box.lua @ 3:768faea1096d

Version alpha4

Members interested in an issue or supporting an initiative have a weight information attached. Browsing the members causing that weight is possible.

Initiatives may provide a link to an external discussion platform

Direct link on every initiative page to create an alternative initiative

Bugfix: No error when clicking "neutral", when "neutral" is currently selected
author bsw
date Mon Nov 30 12:00:00 2009 +0100 (2009-11-30)
parents 5c601807d397
children 80c215dbf076
line source
3 slot.select("support", function()
5 local initiative = param.get("initiative", "table")
7 if not initiative.issue.frozen and not initiative.issue.closed then
9 local supported = Supporter:by_pk(initiative.id, app.session.member.id) and true or false
11 local text
12 if supported then
13 text = _"Direct supporter [change]"
14 else
15 text = _"No supporter [change]"
16 end
17 ui.container{
18 attr = {
19 class = "head",
20 style = "cursor: pointer;",
21 onclick = "document.getElementById('support_content').style.display = 'block';"
22 },
23 content = text
24 }
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 = _"X"
37 }
38 if supported then
39 ui.link{
40 content = function()
41 ui.image{ static = "icons/16/thumb_down_red.png" }
42 slot.put(_"Remove my support from this initiative")
43 end,
44 module = "initiative",
45 action = "remove_support",
46 id = initiative.id
47 }
48 else
49 ui.link{
50 content = function()
51 ui.image{ static = "icons/16/thumb_up_green.png" }
52 slot.put(_"Support this initiative")
53 end,
54 module = "initiative",
55 action = "add_support",
56 id = initiative.id
57 }
58 end
59 end
60 }
61 end
63 end)

Impressum / About Us