liquid_feedback_frontend
diff app/main/initiative/_suggestions.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 | 0849be391140 |
children | 63d6549cc00b |
line diff
1.1 --- a/app/main/initiative/_suggestions.lua Thu Feb 16 14:08:55 2012 +0100 1.2 +++ b/app/main/initiative/_suggestions.lua Thu Feb 16 15:01:49 2012 +0100 1.3 @@ -1,6 +1,11 @@ 1.4 local initiative = param.get("initiative", "table") 1.5 1.6 -if app.session.member_id and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then 1.7 +if app.session.member_id 1.8 + and not initiative.issue.half_frozen 1.9 + and not initiative.issue.closed 1.10 + and not initiative.revoked 1.11 + and app.session.member:has_voting_right_for_unit_id(initiative.issue.area.unit_id) 1.12 +then 1.13 ui.link{ 1.14 content = function() 1.15 ui.image{ static = "icons/16/comment_add.png" }