bsw@1045: local issue = param.get("issue", "table") bsw@1045: local initiative = param.get("initiative", "table") bsw@1045: local member = param.get("member", "table") or app.session.member bsw@1045: bsw@1045: if initiative then bsw@1045: issue = initiative.issue bsw@1045: end bsw@1045: bsw@1045: local privileged_to_vote = app.session.member and app.session.member:has_voting_right_for_unit_id(issue.area.unit_id) bsw@1045: bsw@1045: local active_trustee_id bsw@1045: if member then bsw@1045: if not issue.member_info.own_participation then bsw@1045: if issue.member_info.first_trustee_participation then bsw@1045: active_trustee_id = issue.member_info.first_trustee_id bsw@1045: elseif issue.member_info.other_trustee_participation then bsw@1045: active_trustee_id = issue.member_info.other_trustee_id bsw@1045: end bsw@1045: end bsw@1045: end bsw@1045: bsw@1045: ui.sidebar ( "tab-whatcanido", function () bsw@1045: bsw@1045: ui.sidebarHeadWhatCanIDo() bsw@1045: bsw@1045: local supporter bsw@1045: bsw@1045: if initiative and app.session.member_id then bsw@1045: supporter = app.session.member:get_reference_selector("supporters") bsw@1045: :add_where{ "initiative_id = ?", initiative.id } bsw@1045: :optional_object_mode() bsw@1045: :exec() bsw@1045: end bsw@1045: bsw@1045: local view_module bsw@1045: local view_id bsw@1045: bsw@1045: if initiative then bsw@1045: issue = issue bsw@1045: view_module = "initiative" bsw@1045: view_id = initiative.id bsw@1045: else bsw@1045: view_module = "issue" bsw@1045: view_id = issue.id bsw@1045: end bsw@1045: bsw@1045: local initiator bsw@1045: if initiative and app.session.member_id then bsw@1045: initiator = Initiator:by_pk(initiative.id, app.session.member.id) bsw@1045: end bsw@1045: bsw@1045: local initiators bsw@1045: bsw@1045: if initiative then bsw@1045: local initiators_members_selector = initiative:get_reference_selector("initiating_members") bsw@1045: :add_field("initiator.accepted", "accepted") bsw@1045: :add_order_by("member.name") bsw@1045: if initiator and initiator.accepted then bsw@1045: initiators_members_selector:add_where("initiator.accepted ISNULL OR initiator.accepted") bsw@1045: else bsw@1045: initiators_members_selector:add_where("initiator.accepted") bsw@1045: end bsw@1045: bsw@1045: initiators = initiators_members_selector:exec() bsw@1045: end bsw@1045: bsw@1045: if initiator and bsw@1045: initiator.accepted and bsw@1045: not issue.fully_frozen and bsw@1045: not issue.closed and bsw@1045: not initiative.revoked bsw@1045: then bsw@1045: bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = function() bsw@1045: ui.tag { content = _"You are initiator of this initiative" } bsw@1045: end } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1135: if issue.half_frozen then bsw@1135: ui.tag { tag = "li", content = _"this issue is in verification phase, therefore the initiative text cannot be updated anymore" } bsw@1135: else bsw@1135: ui.tag { tag = "li", content = function () bsw@1135: ui.link{ bsw@1135: module = "draft", view = "new", bsw@1135: params = { initiative_id = initiative.id }, bsw@1135: content = _"edit proposal and/or reasons" bsw@1135: } bsw@1135: end } bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link{ bsw@1135: attr = { class = "action" }, bsw@1135: module = "initiative", view = "add_initiator", bsw@1045: params = { initiative_id = initiative.id }, bsw@1135: content = _"invite another initiator" bsw@1135: } bsw@1135: end } bsw@1135: if #initiative.initiators > 1 then bsw@1135: ui.tag { tag = "li", content = function () bsw@1135: ui.link{ bsw@1135: module = "initiative", view = "remove_initiator", bsw@1135: params = { initiative_id = initiative.id }, bsw@1135: content = _"remove an initiator" bsw@1135: } bsw@1135: end } bsw@1135: end bsw@1135: ui.tag { tag = "li", content = function () bsw@1135: ui.link{ bsw@1135: module = "initiative", view = "revoke", id = initiative.id, bsw@1135: content = _"revoke initiative" bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: -- invited as initiator bsw@1045: if initiator and initiator.accepted == nil and not initiative.issue.half_frozen and not initiative.issue.closed then bsw@1045: ui.container { attr = { class = "sidebarRow highlighted" }, content = function () bsw@1045: ui.heading { level = 3, content = function() bsw@1045: ui.tag { content = _"You are invited to become initiator of this initiative" } bsw@1045: end } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag{ tag = "li", content = function () bsw@1045: ui.link{ bsw@1045: content = _"accept invitation", bsw@1045: module = "initiative", bsw@1045: action = "accept_invitation", bsw@1045: id = initiative.id, bsw@1045: routing = { bsw@1045: default = { bsw@1045: mode = "redirect", bsw@1045: module = request.get_module(), bsw@1045: view = request.get_view(), bsw@1145: id = request.get_id_string(), bsw@1145: params = request.get_param_strings() bsw@1045: } bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: bsw@1045: ui.tag{ tag = "li", content = function () bsw@1045: ui.link{ bsw@1045: content = _"refuse invitation", bsw@1045: module = "initiative", bsw@1045: action = "reject_initiator_invitation", bsw@1045: params = { bsw@1045: initiative_id = initiative.id, bsw@1045: member_id = app.session.member.id bsw@1045: }, bsw@1045: routing = { bsw@1045: default = { bsw@1045: mode = "redirect", bsw@1045: module = request.get_module(), bsw@1045: view = request.get_view(), bsw@1145: id = request.get_id_string(), bsw@1145: params = request.get_param_strings() bsw@1045: } bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: bsw@1045: if privileged_to_vote and issue.member_info.first_trustee_id then bsw@1045: local member = Member:by_id(issue.member_info.first_trustee_id) bsw@1045: ui.sidebarSection( function () bsw@1045: ui.container { attr = { class = "right" }, content = function() bsw@1045: execute.view{ bsw@1045: module = "member_image", bsw@1045: view = "_show", bsw@1045: params = { bsw@1045: member = member, bsw@1045: image_type = "avatar", bsw@1045: show_dummy = true bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: if issue.member_info.own_delegation_scope == "unit" then bsw@1045: ui.heading{ level = 3, content = _"You delegated this organizational unit" } bsw@1045: elseif issue.member_info.own_delegation_scope == "area" then bsw@1045: ui.heading{ level = 3, content = _"You delegated this subject area" } bsw@1045: elseif issue.member_info.own_delegation_scope == "issue" then bsw@1045: ui.heading{ level = 3, content = _"You delegated this issue" } bsw@1045: end bsw@1045: bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: if issue.member_info.own_delegation_scope == "area" or bsw@1045: issue.member_info.own_delegation_scope == "unit" then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: issue_id = issue.id, bsw@1045: initiative_id = initiative and initiative.id or nil bsw@1045: }, bsw@1045: content = _"change/revoke delegation only for this issue" bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: if issue.member_info.own_delegation_scope == "unit" then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: unit_id = issue.area.unit_id, bsw@1045: }, bsw@1045: content = _("change/revoke delegation of organizational unit", { bsw@1045: unit_name = issue.area.unit.name bsw@1045: }) bsw@1045: } bsw@1045: end } bsw@1045: elseif issue.member_info.own_delegation_scope == "area" then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: area_id = issue.area_id, bsw@1045: }, bsw@1045: content = _"change/revoke delegation of subject area" bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: if issue.member_info.own_delegation_scope == nil then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: issue_id = issue.id, bsw@1045: initiative_id = initiative and initiative.id or nil bsw@1045: }, bsw@1045: content = _"choose issue delegatee" bsw@1045: } bsw@1045: end } bsw@1045: elseif issue.member_info.own_delegation_scope == "issue" then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: issue_id = issue.id, bsw@1045: initiative_id = initiative and initiative.id or nil bsw@1045: }, bsw@1045: content = _"change/revoke issue delegation" bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: end } bsw@1045: bsw@1045: if issue.member_info.first_trustee_id and issue.member_info.own_participation then bsw@1045: local text = _"As long as you are interested in this issue yourself, the delegation is suspended for this issue, but it will be applied again in the voting phase unless you vote yourself." bsw@1045: if issue.state == "voting" then bsw@1045: text = _"This delegation is suspended, because you voted yourself." bsw@1045: end bsw@1045: ui.container { content = text } bsw@1045: end bsw@1045: end ) bsw@1045: end bsw@1045: bsw@1045: if privileged_to_vote and not issue.closed and not issue.fully_frozen then bsw@1045: if issue.member_info.own_participation then bsw@1045: ui.sidebarSection( function () bsw@1045: ui.container{ attr = { class = "right" }, content = function() bsw@1045: ui.image{ attr = { class = "right" }, static = "icons/48/eye.png" } bsw@1045: if issue.member_info.weight and issue.member_info.weight > 1 then bsw@1045: slot.put("
") bsw@1045: ui.tag{ bsw@1045: attr = { class = "right" }, bsw@1045: content = "+" .. issue.member_info.weight - 1 bsw@1045: } bsw@1045: end bsw@1045: end } bsw@1045: ui.heading{ level = 3, content = _("You are interested in this issue", { id = issue.id }) } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: if issue.member_info.weight and issue.member_info.weight > 1 then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show_incoming", bsw@1045: params = { issue_id = issue.id, member_id = app.session.member_id }, bsw@1045: content = _("you have #{count} incoming delegations", { bsw@1045: count = issue.member_info.weight - 1 bsw@1045: }) bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "interest", action = "update", bsw@1045: routing = { default = { bsw@1045: mode = "redirect", module = view_module, view = "show", id = view_id bsw@1045: } }, bsw@1045: params = { issue_id = issue.id, delete = true }, bsw@1045: text = _"remove my interest" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end ) bsw@1045: else bsw@1045: ui.sidebarSection( function () bsw@1045: ui.heading{ level = 3, content = _("I want to participate in this issue", { id = issue.id }) } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "interest", action = "update", bsw@1045: params = { issue_id = issue.id }, bsw@1045: routing = { default = { bsw@1045: mode = "redirect", module = view_module, view = "show", id = view_id bsw@1045: } }, bsw@1045: text = _"add my interest" bsw@1045: } bsw@1045: end } bsw@1045: ui.tag { tag = "li", content = _"browse through the competing initiatives" } bsw@1045: end } bsw@1045: end ) bsw@1045: end bsw@1045: bsw@1045: if initiative then bsw@1045: bsw@1045: if not initiative.member_info.supported or active_trustee_id then bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = function() bsw@1045: ui.tag { content = _"I like this initiative and I want to support it" } bsw@1045: end } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "initiative", action = "add_support", bsw@1045: routing = { default = { bsw@1045: mode = "redirect", module = "initiative", view = "show", id = initiative.id bsw@1045: } }, bsw@1045: id = initiative.id, bsw@1045: text = _"add my support" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: bsw@1045: else -- if not supported bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: if initiative.member_info.satisfied then bsw@1045: ui.image{ attr = { class = "right icon48" }, static = "icons/32/support_satisfied.png" } bsw@1045: else bsw@1045: ui.image{ attr = { class = "right icon48" }, static = "icons/32/support_unsatisfied.png" } bsw@1045: end bsw@1045: ui.heading { level = 3, content = _"You are supporting this initiative" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: if not initiative.member_info.satisfied then bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.tag { content = function () bsw@1045: ui.link { bsw@1045: external = "#suggestions", bsw@1045: content = _"you restricted your support by rating suggestions as must or must not" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.tag { content = function () bsw@1045: ui.link { bsw@1045: xattr = { class = "btn btn-remove" }, bsw@1045: module = "initiative", action = "remove_support", bsw@1045: routing = { default = { bsw@1045: mode = "redirect", module = "initiative", view = "show", id = initiative.id bsw@1045: } }, bsw@1045: id = initiative.id, bsw@1045: text = _"remove my support" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: bsw@1045: end -- not supported bsw@1045: bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = _"I want to improve this initiative" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: if issue.state == "verification" then bsw@1045: ui.tag { tag = "li", content = _"this issue is in verification phase, therefore the initiative text cannot be updated anymore" } bsw@1045: elseif issue.state == "voting" then bsw@1045: ui.tag { tag = "li", content = _"this issue is in voting phase, therefore the initiative text cannot be updated anymore" } bsw@1045: else bsw@1045: bsw@1045: if initiative.member_info.initiated then bsw@1045: ui.tag { tag = "li", content =_"take a look at the suggestions of your supporters" } bsw@1045: ui.tag { tag = "li", content =_"if you like to implement a suggestion in your proposal and/or reasons, update your initiative draft" } bsw@1045: ui.tag { tag = "li", content =_"to argue about suggestions, just add your arguments to your reasons in the initiative draft, so your supporters can learn about your opinion" } bsw@1045: end bsw@1045: bsw@1045: if not initiative.member_info.supported or active_trustee_id then bsw@1045: ui.tag { tag = "li", content =_"add your support (see above) and rate or write new suggestions (and thereby restrict your support to certain conditions if necessary)" } bsw@1045: else bsw@1045: ui.tag { tag = "li", content = _"take a look at the suggestions (see left) and rate them" } bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "suggestion", view = "new", params = { bsw@1045: initiative_id = initiative.id bsw@1045: }, bsw@1045: content = _"write a new suggestion" bsw@1045: } bsw@1045: end } bsw@1045: end bsw@1045: end bsw@1045: end } bsw@1045: end } bsw@1045: bsw@1045: end bsw@1045: bsw@1045: if bsw@1045: (issue.state == "admission" or bsw@1045: issue.state == "discussion" or bsw@1045: issue.state == "verification") bsw@1045: then bsw@1045: ui.sidebarSection( function () bsw@1045: if initiative then bsw@1045: ui.heading{ level = 3, content = _"I don't like this initiative and I want to add my opinion or counter proposal" } bsw@1045: else bsw@1045: ui.heading{ level = 3, content = _"I don't like any of the initiative in this issue and I want to add my opinion or counter proposal" } bsw@1045: end bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "issue", view = "show", id = issue.id, bsw@1045: content = _"take a look at the competing initiatives" bsw@1045: } bsw@1045: end } bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "initiative", view = "new", bsw@1045: params = { issue_id = issue.id }, bsw@1045: content = _"start a new competing initiative" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end ) bsw@1045: end bsw@1045: bsw@1138: end bsw@1138: bsw@1138: if privileged_to_vote and not issue.closed then bsw@1138: bsw@1045: if not issue.member_info.first_trustee_id then bsw@1045: ui.sidebarSection( function () bsw@1045: ui.heading{ level = 3, content = _"I want to delegate this issue" } bsw@1045: bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link { bsw@1045: module = "delegation", view = "show", params = { bsw@1045: issue_id = issue.id, bsw@1045: initiative_id = initiative and initiative.id or nil bsw@1045: }, bsw@1045: content = _"choose issue delegatee" bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end ) bsw@1045: end bsw@1045: bsw@1045: end bsw@1045: bsw@1045: if initiator and initiator.accepted == false then bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = function() bsw@1045: ui.tag { content = _"You refused to become initiator of this initiative" } bsw@1045: end } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag{ tag = "li", content = function () bsw@1045: ui.link{ bsw@1045: text = _"allow invitation again", bsw@1045: module = "initiative", bsw@1045: action = "remove_initiator", bsw@1045: params = { bsw@1045: initiative_id = initiative.id, bsw@1045: member_id = app.session.member.id bsw@1045: }, bsw@1045: routing = { bsw@1045: ok = { bsw@1045: mode = "redirect", bsw@1045: module = "initiative", bsw@1045: view = "show", bsw@1045: id = initiative.id bsw@1045: } bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: bsw@1045: bsw@1045: if privileged_to_vote then bsw@1045: bsw@1045: if initiative and bsw@1045: (issue.state == "admission" or bsw@1045: issue.state == "discussion" or bsw@1045: issue.state == "verification") bsw@1045: then bsw@1045: bsw@1045: elseif issue.state == "verification" then bsw@1045: bsw@1045: elseif issue.state == "voting" then bsw@1045: if not issue.member_info.direct_voted then bsw@1045: if not issue.member_info.non_voter then bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = _"I like to vote on this issue:" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.tag { content = function () bsw@1045: if not issue.closed then bsw@1045: ui.link { bsw@1045: xattr = { class = "btn btn-vote" }, bsw@1045: module = "vote", view = "list", bsw@1045: params = { issue_id = issue.id }, bsw@1045: text = _"vote now" bsw@1045: } bsw@1045: end bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: if not issue.member_info.non_voter then bsw@1045: ui.heading { level = 3, content = _"I don't like to vote this issue (myself):" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link{ bsw@1045: content = _"do not notify me about this voting anymore", bsw@1045: module = "vote", bsw@1045: action = "non_voter", bsw@1045: params = { issue_id = issue.id }, bsw@1045: routing = { bsw@1045: default = { bsw@1045: mode = "redirect", bsw@1045: module = request.get_module(), bsw@1045: view = request.get_view(), bsw@1145: id = request.get_id_string(), bsw@1145: params = request.get_param_strings() bsw@1045: } bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: else bsw@1045: ui.heading { level = 3, content = _"You do not like to vote this issue (yourself)" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link{ bsw@1045: in_brackets = true, bsw@1045: content = _"discard", bsw@1045: module = "vote", bsw@1045: action = "non_voter", bsw@1045: params = { issue_id = issue.id, delete = true }, bsw@1045: routing = { bsw@1045: default = { bsw@1045: mode = "redirect", bsw@1045: module = request.get_module(), bsw@1045: view = request.get_view(), bsw@1145: id = request.get_id_string(), bsw@1145: params = request.get_param_strings() bsw@1045: } bsw@1045: } bsw@1045: } bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: end } bsw@1045: else bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = _"I like to change/revoke my vote:" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.tag { content = function () bsw@1045: if not issue.closed then bsw@1045: ui.link { bsw@1045: xattr = { class = "btn btn-vote" }, bsw@1045: module = "vote", view = "list", bsw@1045: params = { issue_id = issue.id }, bsw@1045: text = _"change my vote" bsw@1045: } bsw@1045: end bsw@1045: end } bsw@1045: end } bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.tag { content = function () bsw@1045: if not issue.closed then bsw@1045: ui.link { bsw@1045: module = "vote", action = "update", bsw@1045: params = { bsw@1045: issue_id = issue.id, bsw@1045: discard = true bsw@1045: }, bsw@1045: routing = { bsw@1045: default = { bsw@1045: mode = "redirect", bsw@1045: module = "issue", bsw@1045: view = "show", bsw@1045: id = issue.id bsw@1045: } bsw@1045: }, bsw@1045: text = _"discard my vote" bsw@1045: } bsw@1045: end bsw@1045: end } bsw@1045: end } bsw@1045: end } bsw@1045: bsw@1045: end } bsw@1045: bsw@1045: end bsw@1045: end bsw@1045: end bsw@1045: bsw@1045: if app.session.member and not privileged_to_vote then bsw@1045: ui.sidebarSection( _"You are not entitled to vote in this unit" ) bsw@1045: end bsw@1045: bsw@1045: if issue.closed then bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: ui.heading { level = 3, content = _"This issue is closed" } bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: if initiative and config.tell_others and config.tell_others.initiative then bsw@1045: ui.container { attr = { class = "sidebarRow" }, content = function () bsw@1045: bsw@1045: ui.heading { level = 3, content = _"Tell others about this initiative:" } bsw@1045: ui.tag { tag = "ul", attr = { class = "ul" }, content = function () bsw@1045: bsw@1045: for i, link in ipairs (config.tell_others.initiative(initiative)) do bsw@1045: ui.tag { tag = "li", content = function () bsw@1045: ui.link ( link ) bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: end } bsw@1045: end } bsw@1045: end bsw@1045: bsw@1045: bsw@1045: end )