liquid_feedback_frontend

diff app/main/initiative/new.lua @ 898:ae9ab3edff89

Added polling support
author bsw
date Mon Aug 20 03:54:20 2012 +0200 (2012-08-20)
parents 54dc90658990
children f3d6d08b0125
line diff
     1.1 --- a/app/main/initiative/new.lua	Mon Aug 20 03:53:55 2012 +0200
     1.2 +++ b/app/main/initiative/new.lua	Mon Aug 20 03:54:20 2012 +0200
     1.3 @@ -34,7 +34,9 @@
     1.4      else
     1.5        tmp = { { id = -1, name = _"Please choose a policy" } }
     1.6        for i, allowed_policy in ipairs(area.allowed_policies) do
     1.7 -        tmp[#tmp+1] = allowed_policy
     1.8 +        if not allowed_policy.polling or app.session.member:has_polling_right_for_unit_id(area.unit_id) then
     1.9 +          tmp[#tmp+1] = allowed_policy
    1.10 +        end
    1.11        end
    1.12        ui.field.select{
    1.13          label = _"Policy",
    1.14 @@ -72,6 +74,10 @@
    1.15        }
    1.16      end
    1.17      
    1.18 +    if issue and issue.policy.polling and app.session.member:has_polling_right_for_unit_id(area.unit_id) then
    1.19 +      ui.field.boolean{ name = "polling", label = _"Poll" }
    1.20 +    end
    1.21 +    
    1.22      if param.get("preview") then
    1.23        ui.heading{ level = 1, content = encode.html(param.get("name")) }
    1.24        local discussion_url = param.get("discussion_url")

Impressum / About Us