liquid_feedback_frontend

annotate app/main/issue/_details.lua @ 742:b8b205e65c6d

Optical enhancements
author bsw
date Thu Jun 28 22:26:26 2012 +0200 (2012-06-28)
parents cc64a4fc6ab6
children ad1e31e13ff6
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@718 10 ui.field.text{ label = _"State", name = "state_name" }
bsw@25 11 ui.field.timestamp{ label = _"Created at", name = "created" }
bsw@25 12 ui.field.text{ label = _"Admission time", value = issue.admission_time }
bsw/jbe@19 13 ui.field.text{
bsw/jbe@19 14 label = _"Issue quorum",
bsw/jbe@19 15 value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den)
bsw/jbe@19 16 }
bsw@255 17 if issue.population then
bsw@255 18 ui.field.text{
bsw@255 19 label = _"Currently required",
bsw@255 20 value = math.ceil(issue.population * policy.issue_quorum_num / policy.issue_quorum_den)
bsw@255 21 }
bsw@255 22 end
bsw@718 23 if issue.accepted then
bsw@718 24 ui.field.timestamp{ label = _"Accepted at", name = "accepted" }
bsw@718 25 end
bsw@25 26 ui.field.text{ label = _"Discussion time", value = issue.discussion_time }
bsw@718 27 if issue.half_frozen then
bsw@718 28 ui.field.timestamp{ label = _"Half frozen at", name = "half_frozen" }
bsw@718 29 end
bsw@25 30 ui.field.text{ label = _"Verification time", value = issue.verification_time }
bsw/jbe@19 31 ui.field.text{
bsw/jbe@19 32 label = _"Initiative quorum",
bsw/jbe@19 33 value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den)
bsw/jbe@19 34 }
bsw@255 35 if issue.population then
bsw@255 36 ui.field.text{
bsw@255 37 label = _"Currently required",
bsw@255 38 value = math.ceil(issue.population * (issue.policy.initiative_quorum_num / issue.policy.initiative_quorum_den)),
bsw@255 39 }
bsw@255 40 end
bsw@718 41 if issue.fully_frozen then
bsw@718 42 ui.field.timestamp{ label = _"Fully frozen at", name = "fully_frozen" }
bsw@718 43 end
bsw@25 44 ui.field.text{ label = _"Voting time", value = issue.voting_time }
bsw@718 45 if issue.closed then
bsw@718 46 ui.field.timestamp{ label = _"Closed", name = "closed" }
bsw@718 47 end
bsw/jbe@19 48 end
bsw/jbe@19 49 }
bsw/jbe@19 50 ui.form{
bsw/jbe@19 51 record = issue.policy,
bsw/jbe@19 52 readonly = true,
bsw/jbe@19 53 content = function()
bsw/jbe@19 54 end
bsw/jbe@19 55 }

Impressum / About Us