# HG changeset patch # User bsw # Date 1413538209 -7200 # Node ID 20680a81c3e1657a25c848159dda790f3d1b1280 # Parent 5b6082e9bd5c14ba33d7079e90f656e2a3ea17ac Fixed view for creating new initiatives in polling mode diff -r 5b6082e9bd5c -r 20680a81c3e1 app/main/initiative/new.lua --- a/app/main/initiative/new.lua Fri Aug 15 18:55:19 2014 +0200 +++ b/app/main/initiative/new.lua Fri Oct 17 11:30:09 2014 +0200 @@ -58,32 +58,6 @@ } end - - - - -if not preview and not issue_id and app.session.member:has_polling_right_for_unit_id(area.unit_id) then - ui.actions(function() - ui.link{ - text = _"Standard policies", - module = "initiative", view = "new", params = { - area_id = area.id - } - } - for i, policy in ipairs(area.allowed_policies) do - if policy.polling then - slot.put(" · ") - ui.link{ - text = policy.name, - module = "initiative", view = "new", params = { - area_id = area.id, policy_id = policy.id - } - } - end - end - end) -end - ui.form{ module = "initiative", action = "create", @@ -178,7 +152,7 @@ if not issue_id then tmp = { { id = -1, name = "" } } for i, allowed_policy in ipairs(area.allowed_policies) do - if not allowed_policy.polling then + if not allowed_policy.polling or app.session.member:has_polling_right_for_unit_id(area.unit_id) then tmp[#tmp+1] = allowed_policy end end