liquid_feedback_frontend
diff app/main/suggestion/_list.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
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 diff
1.1 --- a/app/main/suggestion/_list.lua Mon Nov 23 12:00:00 2009 +0100 1.2 +++ b/app/main/suggestion/_list.lua Mon Nov 30 12:00:00 2009 +0100 1.3 @@ -8,7 +8,7 @@ 1.4 records = suggestions_selector:exec(), 1.5 columns = { 1.6 { 1.7 - label = _"Name", 1.8 + label = _"Suggestion", 1.9 content = function(record) 1.10 ui.link{ 1.11 text = record.name, 1.12 @@ -19,7 +19,8 @@ 1.13 end 1.14 }, 1.15 { 1.16 - label = _"Support", 1.17 + label = _"Collective opinion", 1.18 + label_attr = { style = "width: 101px;" }, 1.19 content = function(record) 1.20 if record.minus2_unfulfilled_count then 1.21 local max_value = record.initiative.issue.population 1.22 @@ -39,6 +40,7 @@ 1.23 end 1.24 }, 1.25 { 1.26 + label = _"My opinion", 1.27 content = function(record) 1.28 local degree 1.29 local opinion = Opinion:by_pk(app.session.member.id, record.id) 1.30 @@ -103,6 +105,14 @@ 1.31 end 1.32 }, 1.33 { 1.34 + content = function(record) 1.35 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 1.36 + if opinion and not opinion.fulfilled then 1.37 + ui.image{ static = "icons/16/cross.png" } 1.38 + end 1.39 + end 1.40 + }, 1.41 + { 1.42 label = _"Suggestion currently not implemented", 1.43 label_attr = { style = "width: 101px;" }, 1.44 content = function(record) 1.45 @@ -124,6 +134,14 @@ 1.46 end 1.47 }, 1.48 { 1.49 + content = function(record) 1.50 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 1.51 + if opinion and opinion.fulfilled then 1.52 + ui.image{ static = "icons/16/tick.png" } 1.53 + end 1.54 + end 1.55 + }, 1.56 + { 1.57 label = _"Suggestion currently implemented", 1.58 label_attr = { style = "width: 101px;" }, 1.59 content = function(record) 1.60 @@ -145,6 +163,7 @@ 1.61 end 1.62 }, 1.63 { 1.64 + label_attr = { style = "width: 200px;" }, 1.65 content = function(record) 1.66 local degree 1.67 local opinion = Opinion:by_pk(app.session.member.id, record.id) 1.68 @@ -153,10 +172,15 @@ 1.69 end 1.70 if opinion then 1.71 if not opinion.fulfilled then 1.72 - ui.image{ static = "icons/16/cross.png" } 1.73 + local text = "" 1.74 + if opinion.degree > 0 then 1.75 + text = _"Mark suggestion as implemented and express satisfaction" 1.76 + else 1.77 + text = _"Mark suggestion as implemented and express dissatisfaction" 1.78 + end 1.79 ui.link{ 1.80 attr = { class = "action" }, 1.81 - text = _"set implented", 1.82 + text = text, 1.83 module = "opinion", 1.84 action = "update", 1.85 routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } }, 1.86 @@ -166,10 +190,14 @@ 1.87 } 1.88 } 1.89 else 1.90 - ui.image{ static = "icons/16/tick.png" } 1.91 + if opinion.degree > 0 then 1.92 + text = _"Mark suggestion as not implemented and express dissatisfaction" 1.93 + else 1.94 + text = _"Mark suggestion as not implemented and express satisfaction" 1.95 + end 1.96 ui.link{ 1.97 attr = { class = "action" }, 1.98 - text = _"remove implemented", 1.99 + text = text, 1.100 module = "opinion", 1.101 action = "update", 1.102 routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = param.get_id_cgi(), params = param.get_all_cgi() } }, 1.103 @@ -182,6 +210,18 @@ 1.104 end 1.105 end 1.106 }, 1.107 + { 1.108 + content = function(record) 1.109 + local opinion = Opinion:by_pk(app.session.member.id, record.id) 1.110 + if opinion then 1.111 + if (opinion.fulfilled and opinion.degree > 0) or (not opinion.fulfilled and opinion.degree < 0) then 1.112 + ui.image{ static = "icons/16/thumb_up_green.png" } 1.113 + else 1.114 + ui.image{ static = "icons/16/thumb_down_red.png" } 1.115 + end 1.116 + end 1.117 + end 1.118 + }, 1.119 } 1.120 } 1.121 end