# HG changeset patch # User bsw # Date 1632738033 -7200 # Node ID 58e1e8d6f5963c2e49428e6da7a3cec25856f166 # Parent c14da47b2357c84faf41a54db0ae8dd224ad7fe4 Changed order of sidebar elements diff -r c14da47b2357 -r 58e1e8d6f596 app/main/area/_sidebar_whatcanido.lua --- a/app/main/area/_sidebar_whatcanido.lua Mon Sep 27 12:17:27 2021 +0200 +++ b/app/main/area/_sidebar_whatcanido.lua Mon Sep 27 12:20:33 2021 +0200 @@ -84,19 +84,6 @@ end } end - if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() - ui.tag{ content = _"I want to vote" } - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () - 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." } - end } - end } - end - - if app.session.member and not app.session.member:has_voting_right_for_unit_id(area.unit_id) then - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = _"You are not entitled to vote in this unit" } - end - if app.session.member and app.session.member:has_voting_right_for_unit_id(area.unit_id) then if not config.disable_delegations then @@ -175,7 +162,14 @@ end } end } end - + end + if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() + ui.tag{ content = _"I want to vote" } + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () + 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." } + end } + end } end else ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function () diff -r c14da47b2357 -r 58e1e8d6f596 app/main/unit/_sidebar_whatcanido.lua --- a/app/main/unit/_sidebar_whatcanido.lua Mon Sep 27 12:17:27 2021 +0200 +++ b/app/main/unit/_sidebar_whatcanido.lua Mon Sep 27 12:20:33 2021 +0200 @@ -61,7 +61,14 @@ end end } end - + if not config.voting_only and app.session.member_id and app.session.member:has_initiative_right_for_unit_id ( unit.id ) then + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() + ui.tag{ content = _"I want to start a new initiative" } + ui.tag{ tag = "ul", attr = { class = "ul" }, content = function () + ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." } + end } + end } + end ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() ui.tag{ content = _"I want to vote" @@ -83,16 +90,5 @@ end end } end - - if not config.voting_only and app.session.member_id and app.session.member:has_initiative_right_for_unit_id ( unit.id ) then - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() - ui.tag{ content = _"I want to start a new initiative" } - ui.tag{ tag = "ul", attr = { class = "ul" }, content = function () - ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." } - end } - end } - end - end } - end }