liquid_feedback_frontend
diff app/main/issue/_show_head.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 | fecd4c13054a |
children | c587d8762e62 |
line diff
1.1 --- a/app/main/issue/_show_head.lua Thu Feb 16 14:08:55 2012 +0100 1.2 +++ b/app/main/issue/_show_head.lua Thu Feb 16 15:01:49 2012 +0100 1.3 @@ -68,7 +68,7 @@ 1.4 1.5 if app.session.member_id then 1.6 1.7 - if issue.state == 'voting' then 1.8 + if issue.state == 'voting' and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then 1.9 local text 1.10 if not direct_voter then 1.11 text = _"Vote now" 1.12 @@ -116,7 +116,7 @@ 1.13 end 1.14 end) 1.15 1.16 -if app.session.member_id then 1.17 +if app.session.member_id and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) then 1.18 slot.select("actions", function() 1.19 if not issue.fully_frozen and not issue.closed then 1.20 ui.link{ 1.21 @@ -137,7 +137,9 @@ 1.22 config.public_access_issue_head(issue) 1.23 end 1.24 1.25 -if app.session.member_id and issue.state == 'voting' and not direct_voter then 1.26 +if app.session.member_id and issue.state == 'voting' and not direct_voter 1.27 + and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) 1.28 +then 1.29 ui.container{ 1.30 attr = { class = "voting_active_info" }, 1.31 content = function()