liquid_feedback_frontend

changeset 899:ad1e31e13ff6

Handle policies without issue quorum in issue details correctly
author bsw
date Tue Aug 21 00:25:57 2012 +0200 (2012-08-21)
parents ae9ab3edff89
children 832c8d0f3c7e
files app/main/issue/_details.lua
line diff
     1.1 --- a/app/main/issue/_details.lua	Mon Aug 20 03:54:20 2012 +0200
     1.2 +++ b/app/main/issue/_details.lua	Tue Aug 21 00:25:57 2012 +0200
     1.3 @@ -7,18 +7,21 @@
     1.4    attr = { class = "vertical" },
     1.5    content = function()
     1.6      ui.field.text{       label = _"Population",            name = "population" }
     1.7 -    ui.field.text{       label = _"State",                 name = "state_name" }
     1.8      ui.field.timestamp{  label = _"Created at",            name = "created" }
     1.9 -    ui.field.text{       label = _"Admission time",        value = issue.admission_time }
    1.10 -    ui.field.text{
    1.11 -      label = _"Issue quorum",
    1.12 -      value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den)
    1.13 -    }
    1.14 -    if issue.population then
    1.15 +    if policy.polling then
    1.16 +      ui.field.text{       label = _"Admission time",        value = _"Automatically admitted (poll mode)" }
    1.17 +    else
    1.18 +      ui.field.text{       label = _"Admission time",        value = issue.admission_time }
    1.19        ui.field.text{
    1.20 -        label = _"Currently required",
    1.21 -        value = math.ceil(issue.population * policy.issue_quorum_num / policy.issue_quorum_den)
    1.22 +        label = _"Issue quorum",
    1.23 +        value = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den)
    1.24        }
    1.25 +      if issue.population then
    1.26 +        ui.field.text{
    1.27 +          label = _"Currently required",
    1.28 +          value = math.ceil(issue.population * policy.issue_quorum_num / policy.issue_quorum_den)
    1.29 +        }
    1.30 +      end
    1.31      end
    1.32      if issue.accepted then
    1.33        ui.field.timestamp{  label = _"Accepted at",           name = "accepted" }

Impressum / About Us