bsw/jbe@0: local issue = Issue:by_id(param.get_id()) bsw/jbe@0: bsw/jbe@0: execute.view{ bsw/jbe@4: module = "issue", bsw/jbe@4: view = "_show_head", bsw/jbe@0: params = { issue = issue } bsw/jbe@0: } bsw/jbe@0: bsw/jbe@4: util.help("issue.show") bsw@2: bsw/jbe@0: ui.tabs{ bsw/jbe@0: { bsw/jbe@0: name = "initiatives", bsw/jbe@0: label = _"Initiatives", bsw/jbe@5: content = function() bsw/jbe@5: execute.view{ bsw/jbe@0: module = "initiative", bsw/jbe@0: view = "_list", bsw/jbe@0: params = { bsw/jbe@0: issue = issue, bsw/jbe@0: initiatives_selector = issue:get_reference_selector("initiatives") bsw/jbe@0: } bsw/jbe@0: } bsw/jbe@0: slot.put("
") bsw@3: if not issue.fully_frozen and not issue.closed then bsw/jbe@0: ui.link{ bsw/jbe@0: attr = { class = "action" }, bsw/jbe@0: content = function() bsw/jbe@0: ui.image{ static = "icons/16/script_add.png" } bsw/jbe@0: slot.put(_"Add new initiative to issue") bsw/jbe@0: end, bsw/jbe@0: module = "initiative", bsw/jbe@0: view = "new", bsw/jbe@0: params = { issue_id = issue.id } bsw/jbe@0: } bsw/jbe@0: end bsw/jbe@0: end bsw/jbe@0: }, bsw/jbe@0: --[[ { bsw/jbe@0: name = "voting_requests", bsw/jbe@0: label = _"Voting requests", bsw/jbe@0: content = function() bsw/jbe@0: execute.view{ bsw/jbe@0: module = "issue_voting_request", bsw/jbe@0: view = "_list", bsw/jbe@0: params = { issue = issue } bsw/jbe@0: } bsw/jbe@0: end bsw/jbe@0: }, bsw/jbe@0: --]] bsw/jbe@0: { bsw@3: name = "interested_members", bsw@3: label = _"Interested members", bsw@3: content = function() bsw@3: execute.view{ bsw@3: module = "member", bsw@3: view = "_list", bsw@3: params = { bsw@3: issue = issue, bsw@3: members_selector = issue:get_reference_selector("interested_members_snapshot") bsw@3: :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id") bsw@3: :add_field("direct_interest_snapshot.weight") bsw@3: :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event") bsw@3: } bsw@3: } bsw@3: end bsw@3: }, bsw@3: { bsw@2: name = "delegations", bsw@2: label = _"Delegations", bsw@2: content = function() bsw@2: execute.view{ bsw@2: module = "delegation", bsw@2: view = "_list", bsw@2: params = { delegations_selector = issue:get_reference_selector("delegations") } bsw@2: } bsw@2: end bsw@2: }, bsw@2: { bsw/jbe@0: name = "details", bsw/jbe@0: label = _"Details", bsw/jbe@0: content = function() bsw@2: local policy = issue.policy bsw/jbe@0: ui.form{ bsw/jbe@0: record = issue, bsw/jbe@0: readonly = true, bsw/jbe@0: attr = { class = "vertical" }, bsw/jbe@0: content = function() bsw/jbe@0: ui.field.text{ label = _"State", name = "state" } bsw@2: ui.field.timestamp{ label = _"Created at", name = "created" } bsw@3: ui.field.text{ label = _"Admission time", value = policy.admission_time } bsw@3: ui.field.text{ bsw@3: label = _"Issue quorum", bsw@3: value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den) bsw@3: } bsw@3: ui.field.timestamp{ label = _"Accepted at", name = "accepted" } bsw@3: ui.field.text{ label = _"Discussion time", value = policy.discussion_time } bsw@2: ui.field.vote_now{ label = _"Vote now", name = "vote_now" } bsw/jbe@0: ui.field.vote_later{ label = _"Vote later", name = "vote_later" } bsw@3: ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" } bsw@3: ui.field.text{ label = _"Verification time", value = policy.verification_time } bsw@3: ui.field.text{ bsw@3: label = _"Initiative quorum", bsw@3: value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den) bsw@3: } bsw@3: ui.field.timestamp{ label = _"Fully frozen at", name = "fully_frozen" } bsw@3: ui.field.text{ label = _"Voting time", value = policy.voting_time } bsw@2: ui.field.timestamp{ label = _"Closed", name = "closed" } bsw@2: end bsw@2: } bsw@2: ui.form{ bsw@2: record = issue.policy, bsw@2: readonly = true, bsw@2: content = function() bsw/jbe@0: end bsw/jbe@0: } bsw/jbe@0: end bsw/jbe@0: }, bsw/jbe@0: } bsw/jbe@0: bsw/jbe@0: