bsw/jbe@19: local initiative = param.get("initiative", "table") or Initiative:by_id(param.get_id()) bsw/jbe@19: bsw/jbe@19: -- TODO performance bsw/jbe@19: local initiator = Initiator:by_pk(initiative.id, app.session.member.id) bsw/jbe@19: bsw/jbe@19: ui.partial{ bsw/jbe@19: module = "initiative", bsw/jbe@19: view = "show_support", bsw/jbe@19: id = initiative.id, bsw/jbe@19: target = "initiative_" .. tostring(initiative.id) .. "_support", bsw/jbe@19: content = function() bsw/jbe@19: ui.container{ bsw/jbe@19: attr = { bsw/jbe@19: class = "slot_support vote_info", bsw/jbe@19: }, bsw/jbe@19: content = function() bsw/jbe@19: ui.container{ bsw/jbe@19: attr = { class = "actions" }, bsw/jbe@19: content = function() bsw/jbe@19: execute.view{ bsw/jbe@19: module = "supporter", bsw/jbe@19: view = "_show_box", bsw/jbe@19: params = { initiative = initiative } bsw/jbe@19: } bsw/jbe@19: if initiator and initiator.accepted and not initiative.issue.half_frozen and not initiative.issue.closed and not initiative.revoked then bsw/jbe@19: ui.link{ bsw/jbe@19: attr = { class = "action", style = "float: left;" }, bsw/jbe@19: content = function() bsw/jbe@19: ui.image{ static = "icons/16/script_delete.png" } bsw/jbe@19: slot.put(_"Revoke initiative") bsw/jbe@19: end, bsw/jbe@19: module = "initiative", bsw/jbe@19: view = "revoke", bsw/jbe@19: id = initiative.id bsw/jbe@19: } bsw/jbe@19: end bsw/jbe@19: end bsw/jbe@19: } bsw/jbe@19: end bsw/jbe@19: } bsw/jbe@19: slot.put("
") bsw/jbe@19: end bsw/jbe@19: }