liquid_feedback_frontend
diff app/main/area/_sidebar_whatcanido.lua @ 1732:80c101b08bf9
merge
author | bsw |
---|---|
date | Thu Sep 30 10:04:55 2021 +0200 (2021-09-30) |
parents | 0a3cce889a75 |
children | b27b327be05e |
line diff
1.1 --- a/app/main/area/_sidebar_whatcanido.lua Thu Sep 30 10:04:31 2021 +0200 1.2 +++ b/app/main/area/_sidebar_whatcanido.lua Thu Sep 30 10:04:55 2021 +0200 1.3 @@ -84,19 +84,6 @@ 1.4 end } 1.5 end 1.6 1.7 - if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then 1.8 - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.9 - ui.tag{ content = _"I want to vote" } 1.10 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.11 - ui.tag { tag = "li", content = _"check the issues on the right, and click on 'Vote now' to vote on an issue which is in voting phase." } 1.12 - end } 1.13 - end } 1.14 - end 1.15 - 1.16 - if app.session.member and not app.session.member:has_voting_right_for_unit_id(area.unit_id) then 1.17 - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = _"You are not entitled to vote in this unit" } 1.18 - end 1.19 - 1.20 if app.session.member and app.session.member:has_voting_right_for_unit_id(area.unit_id) then 1.21 1.22 if not config.disable_delegations then 1.23 @@ -175,16 +162,27 @@ 1.24 end } 1.25 end } 1.26 end 1.27 - 1.28 + end 1.29 + if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then 1.30 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.31 + ui.tag{ content = _"I want to vote" } 1.32 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.33 + ui.tag { tag = "li", content = _"check the issues on the right, and click on 'Vote now' to vote on an issue which is in voting phase." } 1.34 + end } 1.35 + end } 1.36 end 1.37 else 1.38 ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function () 1.39 - ui.tag{ content = _"You are not entitled to vote in this unit" } 1.40 - ui.tag{ tag = "ul", content = function() 1.41 - ui.tag{ tag = "li", content = function() 1.42 - ui.link{ module = "index", view = "login", content = _"Login" } 1.43 + if not app.session.member_id then 1.44 + ui.tag{ content = _"Login to participate" } 1.45 + ui.tag{ tag = "ul", content = function() 1.46 + ui.tag{ tag = "li", content = function() 1.47 + ui.link{ module = "index", view = "login", content = _"Login" } 1.48 + end } 1.49 end } 1.50 - end } 1.51 + else 1.52 + ui.tag{ content = _"You are not entitled to vote in this unit" } 1.53 + end 1.54 end } 1.55 end 1.56 end }