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