liquid_feedback_frontend
diff app/main/policy/list.lua @ 900:832c8d0f3c7e
Handle policies without issue quorum in policy views correctly
| author | bsw |
|---|---|
| date | Tue Aug 21 00:33:17 2012 +0200 (2012-08-21) |
| parents | c85f17285a94 |
| children | eb16d41929bd |
line diff
1.1 --- a/app/main/policy/list.lua Tue Aug 21 00:25:57 2012 +0200 1.2 +++ b/app/main/policy/list.lua Tue Aug 21 00:33:17 2012 +0200 1.3 @@ -33,7 +33,11 @@ 1.4 label_attr = { width = "200" }, 1.5 label = _"Phases", 1.6 content = function(policy) 1.7 - ui.field.text{ label = _"New" .. ":", value = "≤ " .. policy.admission_time } 1.8 + if policy.polling then 1.9 + ui.field.text{ label = _"New" .. ":", value = _"without" } 1.10 + else 1.11 + ui.field.text{ label = _"New" .. ":", value = "≤ " .. policy.admission_time } 1.12 + end 1.13 ui.field.text{ label = _"Discussion" .. ":", value = policy.discussion_time } 1.14 ui.field.text{ label = _"Frozen" .. ":", value = policy.verification_time } 1.15 ui.field.text{ label = _"Voting" .. ":", value = policy.voting_time } 1.16 @@ -43,10 +47,14 @@ 1.17 label_attr = { width = "200" }, 1.18 label = _"Quorum", 1.19 content = function(policy) 1.20 - ui.field.text{ 1.21 - label = _"Issue quorum" .. ":", 1.22 - value = "≥ " .. tostring(policy.issue_quorum_num) .. "/" .. tostring(policy.issue_quorum_den) 1.23 - } 1.24 + if policy.polling then 1.25 + ui.field.text{ label = _"Issue quorum" .. ":", value = _"without" } 1.26 + else 1.27 + ui.field.text{ 1.28 + label = _"Issue quorum" .. ":", 1.29 + value = "≥ " .. tostring(policy.issue_quorum_num) .. "/" .. tostring(policy.issue_quorum_den) 1.30 + } 1.31 + end 1.32 ui.field.text{ 1.33 label = _"Initiative quorum" .. ":", 1.34 value = "≥ " .. tostring(policy.initiative_quorum_num) .. "/" .. tostring(policy.initiative_quorum_den)