rev |
line source |
bsw/jbe@19
|
1 local issue = param.get("issue", "table")
|
bsw/jbe@19
|
2
|
bsw/jbe@19
|
3 local policy = issue.policy
|
bsw/jbe@19
|
4 ui.form{
|
bsw/jbe@19
|
5 record = issue,
|
bsw/jbe@19
|
6 readonly = true,
|
bsw/jbe@19
|
7 attr = { class = "vertical" },
|
bsw/jbe@19
|
8 content = function()
|
bsw@25
|
9 ui.field.text{ label = _"Population", name = "population" }
|
bsw@25
|
10 ui.field.timestamp{ label = _"Created at", name = "created" }
|
bsw@899
|
11 if policy.polling then
|
bsw@907
|
12 ui.field.text{ label = _"Admission time", value = _"Implicitly admitted" }
|
bsw@899
|
13 else
|
bsw@899
|
14 ui.field.text{ label = _"Admission time", value = issue.admission_time }
|
bsw@255
|
15 ui.field.text{
|
bsw@899
|
16 label = _"Issue quorum",
|
bsw@899
|
17 value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den)
|
bsw@255
|
18 }
|
bsw@899
|
19 if issue.population then
|
bsw@899
|
20 ui.field.text{
|
bsw@899
|
21 label = _"Currently required",
|
bsw@899
|
22 value = math.ceil(issue.population * policy.issue_quorum_num / policy.issue_quorum_den)
|
bsw@899
|
23 }
|
bsw@899
|
24 end
|
bsw@255
|
25 end
|
bsw@718
|
26 if issue.accepted then
|
bsw@718
|
27 ui.field.timestamp{ label = _"Accepted at", name = "accepted" }
|
bsw@718
|
28 end
|
bsw@25
|
29 ui.field.text{ label = _"Discussion time", value = issue.discussion_time }
|
bsw@718
|
30 if issue.half_frozen then
|
bsw@718
|
31 ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" }
|
bsw@718
|
32 end
|
bsw@25
|
33 ui.field.text{ label = _"Verification time", value = issue.verification_time }
|
bsw/jbe@19
|
34 ui.field.text{
|
bsw/jbe@19
|
35 label = _"Initiative quorum",
|
bsw/jbe@19
|
36 value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den)
|
bsw/jbe@19
|
37 }
|
bsw@255
|
38 if issue.population then
|
bsw@255
|
39 ui.field.text{
|
bsw@255
|
40 label = _"Currently required",
|
bsw@255
|
41 value = math.ceil(issue.population * (issue.policy.initiative_quorum_num / issue.policy.initiative_quorum_den)),
|
bsw@255
|
42 }
|
bsw@255
|
43 end
|
bsw@718
|
44 if issue.fully_frozen then
|
bsw@718
|
45 ui.field.timestamp{ label = _"Fully frozen at", name = "fully_frozen" }
|
bsw@718
|
46 end
|
bsw@25
|
47 ui.field.text{ label = _"Voting time", value = issue.voting_time }
|
bsw@718
|
48 if issue.closed then
|
bsw@718
|
49 ui.field.timestamp{ label = _"Closed", name = "closed" }
|
bsw@718
|
50 end
|
bsw/jbe@19
|
51 end
|
bsw/jbe@19
|
52 }
|
bsw/jbe@19
|
53 ui.form{
|
bsw/jbe@19
|
54 record = issue.policy,
|
bsw/jbe@19
|
55 readonly = true,
|
bsw/jbe@19
|
56 content = function()
|
bsw/jbe@19
|
57 end
|
bsw/jbe@19
|
58 }
|