liquid_feedback_frontend

view app/main/lf2/_initiative_support.lua @ 219:217653875fbb

Fix registration process for units
author bsw
date Sun Mar 13 16:59:16 2011 +0100 (2011-03-13)
parents 7ea52c710503
children
line source
1 local initiative = param.get("initiative", "table")
2 local supporter = Supporter:by_pk(initiative.id, app.session.member.id)
4 local routing = {
5 default = {
6 mode = "redirect",
7 module = "lf2",
8 view = "initiative",
9 id = initiative.id
10 }
11 }
13 if not initiative.issue.fully_frozen and not initiative.issue.closed then
14 ui.box_row{ content = function()
15 if supporter then
16 ui.box_col{ class = "left", content = function()
17 if not supporter:has_critical_opinion() then
18 ui.image{ static = "lf2/icon_star.png" }
19 slot.put(" ")
20 ui.tag{ content = _"Your are supporter" }
21 else
22 ui.image{ static = "lf2/icon_star.png" }
23 slot.put(" ")
24 ui.tag{ content = _"Your are potential supporter" }
25 end
26 slot.put(" · ")
27 ui.link{
28 text = _"revoke",
29 module = "initiative",
30 action = "remove_support",
31 id = initiative.id,
32 routing = routing,
33 }
34 end }
35 elseif not initiative.revoked then
36 ui.box_col{ content = function()
37 ui.image{ static = "lf2/icon_star_grey.png" }
38 slot.put(" ")
39 ui.link{
40 text = _"Support this initiative",
41 module = "initiative",
42 action = "add_support",
43 id = initiative.id,
44 routing = routing
45 }
46 end }
47 end
48 end }
49 end

Impressum / About Us