bsw/jbe@19: local initiative = param.get("initiative", "table") bsw/jbe@19: bsw/jbe@19: ui.form{ bsw/jbe@19: attr = { class = "vertical" }, bsw/jbe@19: record = initiative, bsw/jbe@19: readonly = true, bsw/jbe@19: content = function() bsw@907: ui.field.text{ bsw@907: label = _"Created at", bsw@907: value = tostring(initiative.created) bsw@907: } bsw@907: if initiative.revoked then bsw@907: ui.field.text{ bsw@907: label = _"Revoked at", bsw@907: value = format.timestamp(initiative.revoked) bsw@907: } bsw@907: end bsw@907: if initiative.admitted ~= nil then bsw@907: ui.field.boolean{ label = _"Admitted", name = "admitted" } bsw@907: end bsw@907: if initiative.issue.fully_frozen and initiative.polling then bsw@907: ui.field.text{ label = _"Admitted", value = "Implicitly admitted" } bsw@907: end bsw@718: if initiative.issue.closed then bsw@718: ui.field.boolean{ label = _"Direct majority", value = initiative.direct_majority } bsw@718: ui.field.boolean{ label = _"Indirect majority", value = initiative.indirect_majority } bsw@718: ui.field.text{ label = _"Schulze rank", value = tostring(initiative.schulze_rank) .. " (" .. _("Status quo: #{rank}", { rank = initiative.issue.status_quo_schulze_rank }) .. ")" } bsw@718: local texts = {} bsw@718: if initiative.reverse_beat_path then bsw@718: texts[#texts+1] = _"reverse beat path to status quo (including ties)" bsw@718: end bsw@718: if initiative.multistage_majority then bsw@718: texts[#texts+1] = _"possibly instable result caused by multistage majority" bsw@718: end bsw@718: if #texts == 0 then bsw@718: texts[#texts+1] = _"none" bsw@718: end bsw@718: ui.field.text{ bsw@718: label = _"Other failures", bsw@718: value = table.concat(texts, ", ") bsw@718: } bsw@718: ui.field.boolean{ label = _"Eligible as winner", value = initiative.eligible } bsw@718: end bsw/jbe@19: end bsw/jbe@19: } bsw@274: bsw@274: execute.view{ module = "issue", view = "_details", params = { issue = initiative.issue } }