liquid_feedback_frontend

view app/main/issue/show.lua @ 159:5d797c6706d5

implement quorum display

show the initiative quorum as a small 1px line in bargraph
allow to update your support on the diff page
better linked title in diff page
show absolute quorum numbers in detail pages of issue and initiative
author Daniel Poelzleithner <poelzi@poelzi.org>
date Sat Oct 09 03:42:48 2010 +0200 (2010-10-09)
parents 9f3f74e82a65
children 7196685f9dd7
line source
1 local issue = Issue:by_id(param.get_id())
3 if not app.html_title.title then
4 app.html_title.title = _("Issue ##{id}", { id = issue.id })
5 end
7 execute.view{
8 module = "issue",
9 view = "_show_head",
10 params = { issue = issue }
11 }
13 --[[
14 if not issue.fully_frozen and not issue.closed then
15 slot.select("actions", function()
16 ui.link{
17 content = function()
18 ui.image{ static = "icons/16/script_add.png" }
19 slot.put(_"Create alternative initiative")
20 end,
21 module = "initiative",
22 view = "new",
23 params = { issue_id = issue.id }
24 }
25 end)
26 end
27 --]]
29 util.help("issue.show")
31 if issue.state == "cancelled" then
32 local policy = issue.policy
33 ui.container{
34 attr = { class = "not_admitted_info" },
35 content = _("This issue has been cancelled. It failed the quorum of #{quorum}.", { quorum = format.percentage(policy.issue_quorum_num / policy.issue_quorum_den) })
36 }
37 end
39 ui.container{
40 attr = { class = "issue_initiative_list" },
41 content = function()
42 execute.view{
43 module = "initiative",
44 view = "_list",
45 params = {
46 initiatives_selector = issue:get_reference_selector("initiatives"),
47 issue = issue,
48 expandable = true,
49 for_initiative_id = param.get("for_initiative_id", atom.number),
50 show_for_issue = true
51 }
52 }
53 end
54 }
56 slot.put("<br />")
58 execute.view{
59 module = "issue",
60 view = "show_tab",
61 params = { issue = issue }
62 }
64 if issue.snapshot then
65 slot.put("<br />")
66 ui.field.timestamp{ label = _"Last snapshot:", value = issue.snapshot }
67 end

Impressum / About Us