liquid_feedback_frontend
diff app/main/area/_sidebar_whatcanido.lua @ 1843:b01d9920371b
merge
author | jbe |
---|---|
date | Thu Feb 03 15:57:22 2022 +0100 (2022-02-03) |
parents | 4edec387855f |
children |
line diff
1.1 --- a/app/main/area/_sidebar_whatcanido.lua Thu Feb 03 15:54:23 2022 +0100 1.2 +++ b/app/main/area/_sidebar_whatcanido.lua Thu Feb 03 15:57:22 2022 +0100 1.3 @@ -71,32 +71,21 @@ 1.4 ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.5 ui.tag { tag = "li", content = function () 1.6 ui.tag { content = function () 1.7 - ui.tag{ content = _"Edit your global " } 1.8 + local text = _"Edit your global <link>notification settings</link> to receive updates by email." 1.9 + local text_pre, text_link, text_post = string.match(text, "([^<]*)<link>([^<]+)</link>([^<]*)") 1.10 + ui.tag{ content = text_pre } 1.11 ui.link { 1.12 module = "member", view = "settings_notification", 1.13 params = { return_to = "area", return_to_area_id = area.id }, 1.14 - text = _"notification settings" 1.15 + text = text_link 1.16 } 1.17 - ui.tag{ content = _" to receive updates by email" } 1.18 + ui.tag{ content = text_post } 1.19 end } 1.20 end } 1.21 end } 1.22 end } 1.23 end 1.24 1.25 - if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then 1.26 - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.27 - ui.tag{ content = _"I want to vote" } 1.28 - ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.29 - 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.30 - end } 1.31 - end } 1.32 - end 1.33 - 1.34 - if app.session.member and not app.session.member:has_voting_right_for_unit_id(area.unit_id) then 1.35 - ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = _"You are not entitled to vote in this unit" } 1.36 - end 1.37 - 1.38 if app.session.member and app.session.member:has_voting_right_for_unit_id(area.unit_id) then 1.39 1.40 if not config.disable_delegations then 1.41 @@ -175,16 +164,27 @@ 1.42 end } 1.43 end } 1.44 end 1.45 - 1.46 + end 1.47 + if app.session.member:has_voting_right_for_unit_id ( area.unit_id ) then 1.48 + ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() 1.49 + ui.tag{ content = _"I want to vote" } 1.50 + ui.tag { tag = "ul", attr = { class = "ul" }, content = function () 1.51 + 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.52 + end } 1.53 + end } 1.54 end 1.55 else 1.56 ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function () 1.57 - ui.tag{ content = _"You are not entitled to vote in this unit" } 1.58 - ui.tag{ tag = "ul", content = function() 1.59 - ui.tag{ tag = "li", content = function() 1.60 - ui.link{ module = "index", view = "login", content = _"Login" } 1.61 + if not app.session.member_id then 1.62 + ui.tag{ content = _"Login to participate" } 1.63 + ui.tag{ tag = "ul", content = function() 1.64 + ui.tag{ tag = "li", content = function() 1.65 + ui.link{ module = "index", view = "login", content = _"Login [button]" } 1.66 + end } 1.67 end } 1.68 - end } 1.69 + else 1.70 + ui.tag{ content = _"You are not entitled to vote in this unit" } 1.71 + end 1.72 end } 1.73 end 1.74 end }