liquid_feedback_frontend

view app/main/unit/_sidebar_whatcanido.lua @ 1788:b27b327be05e

Splitted translations for login as headline and as button
author bsw
date Wed Oct 20 15:25:41 2021 +0200 (2021-10-20)
parents 0a3cce889a75
children
line source
1 local unit = param.get ( "unit", "table" )
2 unit:load_delegation_info_once_for_member_id(app.session.member_id)
4 ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function()
5 ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function()
6 ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"What can I do here?" }
7 end }
8 ui.container{ attr = { class = "what-can-i-do-here" }, content = function()
10 if app.session.member and app.session.member:has_voting_right_for_unit_id ( unit.id ) then
11 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
12 ui.tag{ content = _"I want to stay informed" }
13 ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
14 ui.tag { tag = "li", content = function ()
15 ui.tag{ content = _"check your " }
16 ui.link{
17 module = "member", view = "settings_notification",
18 params = { return_to = "home" },
19 text = _"notifications settings"
20 }
21 end }
22 if not config.voting_only then
23 ui.tag { tag = "li", content = function ()
24 ui.tag{ content = _"subscribe subject areas or add your interested to issues and you will be notified about changes (follow the instruction on the area or issue page)" }
25 end }
26 end
27 end }
28 end }
30 if not config.disable_delegations then
31 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
32 if not unit.delegation_info.first_trustee_id then
33 ui.tag{ content = _"I want to delegate this organizational unit" }
34 ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
35 ui.tag { tag = "li", content = function ()
36 ui.link {
37 module = "delegation", view = "show", params = {
38 unit_id = unit.id,
39 },
40 content = _("choose delegatee", {
41 unit_name = unit.name
42 })
43 }
44 end }
45 end }
46 else
47 ui.tag{ content = _"You delegated this unit" }
49 ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
50 ui.tag { tag = "li", content = function ()
51 ui.link {
52 module = "delegation", view = "show", params = {
53 unit_id = unit.id,
54 },
55 content = _("change/revoke delegation", {
56 unit_name = unit.name
57 })
58 }
59 end }
60 end }
61 end
62 end }
63 end
64 if not config.voting_only and app.session.member_id and app.session.member:has_initiative_right_for_unit_id ( unit.id ) then
65 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
66 ui.tag{ content = _"I want to start a new initiative" }
67 ui.tag{ tag = "ul", attr = { class = "ul" }, content = function ()
68 ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." }
69 end }
70 end }
71 end
72 ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function()
73 ui.tag{
74 content = _"I want to vote"
75 }
76 ui.tag { tag = "ul", attr = { class = "ul" }, content = function ()
77 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." }
78 end }
79 end }
81 else
82 ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function ()
83 if not app.session.member_id then
84 ui.tag{ content = _"Login to participate" }
85 ui.tag{ tag = "ul", content = function()
86 ui.tag{ tag = "li", content = function()
87 ui.link{ module = "index", view = "login", content = _"Login [button]" }
88 end }
89 end }
90 else
91 ui.tag{ content = _"You are not entitled to vote in this unit" }
92 end
93 end }
94 end
95 end }
96 end }

Impressum / About Us