liquid_feedback_frontend
diff app/main/initiative/new.lua @ 1091:20680a81c3e1
Fixed view for creating new initiatives in polling mode
author | bsw |
---|---|
date | Fri Oct 17 11:30:09 2014 +0200 (2014-10-17) |
parents | 701a5cf6b067 |
children | 5b65ea5c24f5 |
line diff
1.1 --- a/app/main/initiative/new.lua Fri Aug 15 18:55:19 2014 +0200 1.2 +++ b/app/main/initiative/new.lua Fri Oct 17 11:30:09 2014 +0200 1.3 @@ -58,32 +58,6 @@ 1.4 } 1.5 end 1.6 1.7 - 1.8 - 1.9 - 1.10 - 1.11 -if not preview and not issue_id and app.session.member:has_polling_right_for_unit_id(area.unit_id) then 1.12 - ui.actions(function() 1.13 - ui.link{ 1.14 - text = _"Standard policies", 1.15 - module = "initiative", view = "new", params = { 1.16 - area_id = area.id 1.17 - } 1.18 - } 1.19 - for i, policy in ipairs(area.allowed_policies) do 1.20 - if policy.polling then 1.21 - slot.put(" · ") 1.22 - ui.link{ 1.23 - text = policy.name, 1.24 - module = "initiative", view = "new", params = { 1.25 - area_id = area.id, policy_id = policy.id 1.26 - } 1.27 - } 1.28 - end 1.29 - end 1.30 - end) 1.31 -end 1.32 - 1.33 ui.form{ 1.34 module = "initiative", 1.35 action = "create", 1.36 @@ -178,7 +152,7 @@ 1.37 if not issue_id then 1.38 tmp = { { id = -1, name = "" } } 1.39 for i, allowed_policy in ipairs(area.allowed_policies) do 1.40 - if not allowed_policy.polling then 1.41 + if not allowed_policy.polling or app.session.member:has_polling_right_for_unit_id(area.unit_id) then 1.42 tmp[#tmp+1] = allowed_policy 1.43 end 1.44 end