liquid_feedback_frontend
diff app/main/area/show.lua @ 281:b77e6a17ca77
Check unit voting right where neccessary, hide action buttons for units without voting right
| author | bsw |
|---|---|
| date | Thu Feb 16 15:01:49 2012 +0100 (2012-02-16) |
| parents | bde068b37608 |
| children | 6c88b4bfb56c |
line diff
1.1 --- a/app/main/area/show.lua Thu Feb 16 14:08:55 2012 +0100 1.2 +++ b/app/main/area/show.lua Thu Feb 16 15:01:49 2012 +0100 1.3 @@ -50,17 +50,19 @@ 1.4 params = { area_id = area.id } 1.5 } 1.6 1.7 - slot.select("actions", function() 1.8 - ui.link{ 1.9 - content = function() 1.10 - ui.image{ static = "icons/16/folder_add.png" } 1.11 - slot.put(_"Create new issue") 1.12 - end, 1.13 - module = "initiative", 1.14 - view = "new", 1.15 - params = { area_id = area.id } 1.16 - } 1.17 - end) 1.18 + if app.session.member:has_voting_right_for_unit_id(area.unit_id) then 1.19 + slot.select("actions", function() 1.20 + ui.link{ 1.21 + content = function() 1.22 + ui.image{ static = "icons/16/folder_add.png" } 1.23 + slot.put(_"Create new issue") 1.24 + end, 1.25 + module = "initiative", 1.26 + view = "new", 1.27 + params = { area_id = area.id } 1.28 + } 1.29 + end) 1.30 + end 1.31 1.32 1.33 end