liquid_feedback_frontend

view app/main/policy/show.lua @ 286:c587d8762e62

Registration process updated for Core 2.0, lockable member fields, notification settings
author bsw
date Sat Feb 25 11:51:37 2012 +0100 (2012-02-25)
parents 88ac7798b562
children 832c8d0f3c7e
line source
1 local policy = Policy:by_id(param.get_id())
3 slot.put_into("title", encode.html(_("Policy '#{name}'", { name = policy.name })))
5 ui.form{
6 attr = { class = "vertical" },
7 record = policy,
8 content = function()
9 ui.field.text{ label = _"Name", value = policy.name }
11 ui.field.text{ label = _"New", value = "≤ " .. policy.admission_time }
12 ui.field.text{ label = _"Discussion", value = policy.discussion_time }
13 ui.field.text{ label = _"Frozen", value = policy.verification_time }
14 ui.field.text{ label = _"Voting", value = policy.voting_time }
16 ui.field.text{
17 label = _"Issue quorum",
18 value = "≥ " .. tostring(policy.issue_quorum_num) .. "/" .. tostring(policy.issue_quorum_den)
19 }
20 ui.field.text{
21 label = _"Initiative quorum",
22 value = "≥ " .. tostring(policy.initiative_quorum_num) .. "/" .. tostring(policy.initiative_quorum_den)
23 }
24 ui.field.text{
25 label = _"Direct majority",
26 value =
27 (policy.direct_majority_strict and ">" or "≥" ) .. " "
28 .. tostring(policy.direct_majority_num) .. "/"
29 .. tostring(policy.direct_majority_den)
30 .. (policy.direct_majority_positive > 1 and ", " .. _("at least #{count} approvals", { count = policy.direct_majority_positive }) or "")
31 .. (policy.direct_majority_non_negative > 1 and ", " .. _("at least #{count} approvals or abstentions", { count = policy.direct_majority_non_negative }) or "")
32 }
34 ui.field.text{
35 label = _"Indirect majority",
36 value =
37 (policy.indirect_majority_strict and ">" or "≥" ) .. " "
38 .. tostring(policy.indirect_majority_num) .. "/"
39 .. tostring(policy.indirect_majority_den)
40 .. (policy.indirect_majority_positive > 1 and ", " .. _("at least #{count} approvals", { count = policy.indirect_majority_positive }) or "")
41 .. (policy.indirect_majority_non_negative > 1 and ", " .. _("at least #{count} approvals or abstentions", { count = policy.indirect_majority_non_negative }) or "")
42 }
44 local texts = {}
45 if policy.no_reverse_beat_path then
46 texts[#texts+1] = _"no reverse beat path to status quo (including ties)"
47 end
48 if policy.no_multistage_majority then
49 texts[#texts+1] = _"prohibit potentially instable results caused by multistage majorities"
50 end
51 ui.field.text{
52 label = _"Options",
53 value = table.concat(texts, ", ")
54 }
55 ui.container{
56 attr = { class = "suggestion_content wiki" },
57 content = function()
58 ui.tag{
59 tag = "p",
60 content = policy.description
61 }
62 end
63 }
65 end
66 }

Impressum / About Us