bsw/jbe@4: local issue = param.get("issue", "table") poelzi@111: local initiative = param.get("initiative", "table") bsw/jbe@4: bsw@51: local direct_voter bsw@51: bsw@51: if app.session.member_id then bsw@51: direct_voter = DirectVoter:by_pk(issue.id, app.session.member.id) bsw@51: end bsw/jbe@19: bsw/jbe@52: if config.feature_rss_enabled then bsw/jbe@52: util.html_rss_head{ title = _"Initiatives in this issue (last created first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id } } bsw/jbe@52: util.html_rss_head{ title = _"Initiatives in this issue (last updated first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id, order = "last_updated" } } bsw/jbe@52: end bsw/jbe@4: bsw/jbe@4: slot.select("path", function() bsw/jbe@19: end) bsw/jbe@19: bsw/jbe@19: slot.select("title", function() bsw/jbe@4: ui.link{ bsw/jbe@19: content = issue.area.name, bsw/jbe@4: module = "area", bsw/jbe@4: view = "show", bsw/jbe@4: id = issue.area.id bsw/jbe@4: } bsw/jbe@19: slot.put(" · ") bsw/jbe@5: ui.link{ bsw/jbe@19: content = _("Issue ##{id}", { id = issue.id }), bsw/jbe@5: module = "issue", bsw/jbe@5: view = "show", bsw/jbe@5: id = issue.id bsw/jbe@5: } bsw/jbe@19: slot.put(" · ") bsw/jbe@19: ui.tag{ bsw/jbe@19: tag = "span", bsw/jbe@19: content = issue.state_name, bsw/jbe@19: } bsw/jbe@5: end) bsw/jbe@5: bsw/jbe@4: bsw/jbe@4: slot.select("actions", function() bsw/jbe@5: bsw@51: if app.session.member_id then bsw@51: bsw@51: if issue.state == 'voting' then bsw@51: local text bsw@51: if not direct_voter then bsw@51: text = _"Vote now" bsw@51: else bsw@51: text = _"Change vote" bsw@51: end bsw@51: ui.link{ bsw@51: content = function() bsw@51: ui.image{ static = "icons/16/email_open.png" } bsw@51: slot.put(text) bsw@51: end, bsw@51: module = "vote", bsw@51: view = "list", bsw@51: params = { issue_id = issue.id } bsw@51: } bsw/jbe@19: end bsw/jbe@5: bsw/jbe@5: execute.view{ bsw@51: module = "interest", bsw/jbe@5: view = "_show_box", bsw@51: params = { issue = issue } bsw/jbe@5: } bsw@7: bsw@51: if not issue.closed then bsw@51: execute.view{ bsw@51: module = "delegation", bsw@51: view = "_show_box", poelzi@111: params = { issue_id = issue.id, poelzi@111: initiative_id = initiative and initiative.id or nil} bsw@51: } bsw@51: end bsw@51: bsw@51: execute.view{ bsw@51: module = "issue", bsw@51: view = "_show_vote_later_box", bsw@51: params = { issue = issue } bsw@51: } bsw@51: bsw@51: end bsw/jbe@4: bsw@10: if config.issue_discussion_url_func then bsw@10: local url = config.issue_discussion_url_func(issue) bsw@10: ui.link{ bsw@10: attr = { target = "_blank" }, bsw@10: external = url, bsw@10: content = function() bsw@10: ui.image{ static = "icons/16/comments.png" } bsw@10: slot.put(_"Discussion on issue") bsw@10: end, bsw@10: } bsw@10: end bsw/jbe@4: end) bsw/jbe@4: bsw/jbe@4: bsw/jbe@4: execute.view{ bsw/jbe@4: module = "issue", bsw/jbe@4: view = "_show_box", bsw/jbe@4: params = { issue = issue } bsw/jbe@4: } bsw/jbe@4: bsw/jbe@4: -- ui.twitter("http://example.com/t" .. tostring(issue.id)) bsw/jbe@6: bsw@60: if config.public_access_issue_head and not app.session.member_id then bsw@60: config.public_access_issue_head(issue) bsw@60: end bsw/jbe@6: bsw@60: if app.session.member_id and issue.state == 'voting' and not direct_voter then bsw/jbe@6: ui.container{ bsw/jbe@6: attr = { class = "voting_active_info" }, bsw/jbe@6: content = function() bsw/jbe@6: slot.put(_"Voting for this issue is currently running!") bsw/jbe@6: slot.put(" ") bsw@51: if app.session.member_id then bsw@51: ui.link{ bsw@51: content = function() bsw@51: slot.put(_"Vote now") bsw@51: end, bsw@51: module = "vote", bsw@51: view = "list", bsw@51: params = { issue_id = issue.id } bsw@51: } bsw@51: end bsw/jbe@6: end bsw/jbe@6: } bsw/jbe@6: slot.put("
") bsw/jbe@6: end bsw/jbe@6: