bsw@1045: local unit = param.get ( "unit", "table" ) bsw/jbe@1309: unit:load_delegation_info_once_for_member_id(app.session.member_id) bsw@1045: bsw/jbe@1309: ui.container{ attr = { class = "mdl-card mdl-card__fullwidth mdl-shadow--2dp" }, content = function() bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__title mdl-card--border" }, content = function() bsw/jbe@1309: ui.heading { attr = { class = "mdl-card__title-text" }, level = 2, content = _"What can I do here?" } bsw/jbe@1309: end } bsw/jbe@1309: ui.container{ attr = { class = "what-can-i-do-here" }, content = function() bsw@1045: bsw/jbe@1309: if app.session.member and app.session.member:has_voting_right_for_unit_id ( unit.id ) then bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() bsw/jbe@1309: ui.tag{ content = _"I want to stay informed" } bsw/jbe@1309: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw/jbe@1309: ui.tag { tag = "li", content = function () bsw/jbe@1309: ui.tag{ content = _"check your " } bsw/jbe@1309: ui.link{ bsw/jbe@1309: module = "member", view = "settings_notification", bsw/jbe@1309: params = { return_to = "home" }, bsw/jbe@1309: text = _"notifications settings" bsw/jbe@1309: } bsw/jbe@1309: end } bsw/jbe@1309: if not config.voting_only then bsw@1045: ui.tag { tag = "li", content = function () bsw/jbe@1309: 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: end } bsw/jbe@1309: end bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: bsw/jbe@1309: if not config.disable_delegations then bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() bsw/jbe@1309: if not unit.delegation_info.first_trustee_id then bsw/jbe@1309: ui.tag{ content = _"I want to delegate this organizational unit" } bsw/jbe@1309: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw/jbe@1309: ui.tag { tag = "li", content = function () bsw/jbe@1309: ui.link { bsw/jbe@1309: module = "delegation", view = "show", params = { bsw/jbe@1309: unit_id = unit.id, bsw/jbe@1309: }, bsw/jbe@1309: content = _("choose delegatee", { bsw/jbe@1309: unit_name = unit.name bsw/jbe@1309: }) bsw/jbe@1309: } bsw/jbe@1309: end } bsw/jbe@1309: end } bsw/jbe@1309: else bsw/jbe@1309: ui.tag{ content = _"You delegated this unit" } bsw@1045: bsw/jbe@1309: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw/jbe@1309: ui.tag { tag = "li", content = function () bsw/jbe@1309: ui.link { bsw/jbe@1309: module = "delegation", view = "show", params = { bsw/jbe@1309: unit_id = unit.id, bsw/jbe@1309: }, bsw/jbe@1309: content = _("change/revoke delegation", { bsw/jbe@1309: unit_name = unit.name bsw/jbe@1309: }) bsw/jbe@1309: } bsw/jbe@1309: end } bsw@1045: end } bsw/jbe@1309: end bsw/jbe@1309: end } bsw/jbe@1309: end bsw@1713: 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: ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() bsw@1713: ui.tag{ content = _"I want to start a new initiative" } bsw@1713: ui.tag{ tag = "ul", attr = { class = "ul" }, content = function () bsw@1713: ui.tag { tag = "li", content = _"open the appropriate subject area for your issue and follow the instruction on that page." } bsw@1713: end } bsw@1713: end } bsw@1713: end bsw/jbe@1309: ui.container{ attr = { class = "mdl-card__content mdl-card--border" }, content = function() bsw/jbe@1309: ui.tag{ bsw/jbe@1309: content = _"I want to vote" bsw/jbe@1309: } bsw/jbe@1309: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw/jbe@1309: 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: end } bsw/jbe@1309: end } bsw@1045: bsw/jbe@1309: else bsw/jbe@1309: ui.container { attr = { class = "mdl-card__content mdl-card--border" }, content = function () bsw@1569: if not app.session.member_id then bsw@1716: ui.tag{ content = _"Login to participate" } bsw@1569: ui.tag{ tag = "ul", content = function() bsw@1569: ui.tag{ tag = "li", content = function() bsw@1788: ui.link{ module = "index", view = "login", content = _"Login [button]" } bsw@1569: end } bsw/jbe@1309: end } bsw@1716: else bsw@1716: ui.tag{ content = _"You are not entitled to vote in this unit" } bsw@1569: end bsw/jbe@1309: end } bsw/jbe@1309: end bsw/jbe@1309: end } bsw/jbe@1309: end }