liquid_feedback_frontend
view app/main/initiative/_details.lua @ 172:165f4bd02cf3
don't show the first draft of a new initiative as a new draft event in the timeline
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
new draft should only show changes of drafts drafts of new initiatives as they are handled by the new initiative event
| author | Daniel Poelzleithner <poelzi@poelzi.org> |
|---|---|
| date | Sun Oct 10 19:40:32 2010 +0200 (2010-10-10) |
| parents | db91c2005278 |
| children | aec9df5b4cd3 |
line source
1 local initiative = param.get("initiative", "table")
3 ui.form{
4 attr = { class = "vertical" },
5 record = initiative,
6 readonly = true,
7 content = function()
8 local policy = initiative.issue.policy
9 ui.field.text{ label = _"Issue policy", value = initiative.issue.policy.name }
10 ui.field.text{
11 label = _"Created at",
12 value = tostring(initiative.created)
13 }
14 if initiative.revoked then
15 ui.field.text{
16 label = _"Revoked at",
17 value = format.timestamp(initiative.revoked)
18 }
19 end
20 ui.field.text{
21 label = _"Initiative quorum",
22 value = format.percentage(policy.initiative_quorum_num / policy.initiative_quorum_den)
23 }
24 if initiative.issue.population then
25 ui.field.text{
26 label = _"Currently required",
27 value = math.ceil(initiative.issue.population * (policy.initiative_quorum_num / policy.initiative_quorum_den)),
28 }
29 end
30 -- ui.field.date{ label = _"Revoked at", name = "revoked" }
31 ui.field.boolean{ label = _"Admitted", name = "admitted" }
32 end
33 }
