liquid_feedback_frontend

view app/main/lf2/_initiative_support.lua @ 217:73dbc9e2bfd4

Cummulative patch for enhancements at next generation frontend
author bsw
date Sat Mar 12 19:22:50 2011 +0100 (2011-03-12)
parents 1dab81353eb1
children 7ea52c710503
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 end }
27 ui.box_col{ class = "right", content = function()
28 ui.link{
29 text = _"Remove support",
30 module = "initiative",
31 action = "remove_support",
32 id = initiative.id,
33 routing = routing,
34 }
35 end }
36 elseif not initiative.revoked then
37 ui.box_col{ content = function()
38 ui.image{ static = "lf2/icon_star_grey.png" }
39 slot.put(" ")
40 ui.link{
41 text = _"Support this initiative",
42 module = "initiative",
43 action = "add_support",
44 id = initiative.id,
45 routing = routing
46 }
47 end }
48 end
49 end }
50 end

Impressum / About Us