liquid_feedback_frontend
diff app/main/delegation/new.lua @ 297:c4dd225578d4
Show only member with voting rights in unit for delegation
author | bsw |
---|---|
date | Sat Feb 25 22:25:46 2012 +0100 (2012-02-25) |
parents | a72a389399fc |
children | a88f3ecb4606 |
line diff
1.1 --- a/app/main/delegation/new.lua Sat Feb 25 22:20:38 2012 +0100 1.2 +++ b/app/main/delegation/new.lua Sat Feb 25 22:25:46 2012 +0100 1.3 @@ -1,17 +1,22 @@ 1.4 +local voting_right_unit_id 1.5 + 1.6 local unit = Unit:by_id(param.get("unit_id", atom.integer)) 1.7 if unit then 1.8 + voting_right_unit_id = unit.id 1.9 slot.put_into("title", encode.html(config.single_unit_id and _"Set global delegation" or _"Set unit delegation")) 1.10 util.help("delegation.new.unit") 1.11 end 1.12 1.13 local area = Area:by_id(param.get("area_id", atom.integer)) 1.14 if area then 1.15 + voting_right_unit_id = area.unit_id 1.16 slot.put_into("title", encode.html(_"Set delegation for Area '#{name}'":gsub("#{name}", area.name))) 1.17 util.help("delegation.new.area") 1.18 end 1.19 1.20 local issue = Issue:by_id(param.get("issue_id", atom.integer)) 1.21 if issue then 1.22 + voting_right_unit_id = issue.area.unit_id 1.23 slot.put_into("title", encode.html(_"Set delegation for Issue ##{number} in Area '#{area_name}'":gsub("#{number}", issue.id):gsub("#{area_name}", issue.area.name))) 1.24 util.help("delegation.new.issue") 1.25 end 1.26 @@ -54,6 +59,7 @@ 1.27 1.28 local contact_members = Member:build_selector{ 1.29 is_contact_of_member_id = app.session.member_id, 1.30 + voting_right_for_unit_id = voting_right_unit_id, 1.31 order = "name" 1.32 }:exec() 1.33