liquid_feedback_frontend

view app/main/issue/show.lua @ 2:5c601807d397

Version alpha3

Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft

Wiki formatting for drafts

Showing differences between two drafts of the same initiative

Display of outgoing delegation chains

Many other improvements
author bsw
date Mon Nov 23 12:00:00 2009 +0100 (2009-11-23)
parents 3bfb2fcf7ab9
children 768faea1096d
line source
1 local issue = Issue:by_id(param.get_id())
3 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />')
5 slot.select("path", function()
6 ui.link{
7 content = _"Area '#{name}'":gsub("#{name}", issue.area.name),
8 module = "area",
9 view = "show",
10 id = issue.area.id
11 }
12 end)
14 slot.put_into("title", encode.html(_"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name)))
16 slot.select("actions", function()
17 if not issue.closed then
18 ui.link{
19 content = function()
20 ui.image{ static = "icons/16/table_go.png" }
21 slot.put(_"Delegate")
22 end,
23 module = "delegation",
24 view = "new",
25 params = { issue_id = issue.id }
26 }
27 end
29 ui.twitter("http://example.com/t" .. tostring(issue.id))
31 end)
33 execute.view{
34 module = "interest",
35 view = "_show_box",
36 params = { issue = issue }
37 }
39 execute.view{
40 module = "delegation",
41 view = "_show_box",
42 params = { issue_id = issue.id }
43 }
45 execute.view{
46 module = "issue",
47 view = "_show_box",
48 params = { issue = issue }
49 }
51 ui.tabs{
52 {
53 name = "initiatives",
54 label = _"Initiatives",
55 content = function() execute.view{
56 module = "initiative",
57 view = "_list",
58 params = {
59 issue = issue,
60 initiatives_selector = issue:get_reference_selector("initiatives")
61 }
62 }
63 slot.put("<br />")
64 if not issue.frozen and not issue.closed then
65 ui.link{
66 attr = { class = "action" },
67 content = function()
68 ui.image{ static = "icons/16/script_add.png" }
69 slot.put(_"Add new initiative to issue")
70 end,
71 module = "initiative",
72 view = "new",
73 params = { issue_id = issue.id }
74 }
75 end
76 end
77 },
78 --[[ {
79 name = "voting_requests",
80 label = _"Voting requests",
81 content = function()
82 execute.view{
83 module = "issue_voting_request",
84 view = "_list",
85 params = { issue = issue }
86 }
87 end
88 },
89 --]]
90 {
91 name = "delegations",
92 label = _"Delegations",
93 content = function()
94 execute.view{
95 module = "delegation",
96 view = "_list",
97 params = { delegations_selector = issue:get_reference_selector("delegations") }
98 }
99 end
100 },
101 {
102 name = "details",
103 label = _"Details",
104 content = function()
105 local policy = issue.policy
106 ui.form{
107 record = issue,
108 readonly = true,
109 attr = { class = "vertical" },
110 content = function()
111 ui.field.text{ label = _"State", name = "state" }
112 ui.field.timestamp{ label = _"Created at", name = "created" }
113 ui.field.text{ label = _"admission_time", value = policy.admission_time }
114 ui.field.integer{ label = _"issue_quorum_num", value = policy.issue_quorum_num }
115 ui.field.integer{ label = _"issue_quorum_den", value = policy.issue_quorum_den }
116 ui.field.timestamp{ label = _"Accepted", name = "accepted" }
117 ui.field.text{ label = _"discussion_time", value = policy.discussion_time }
118 ui.field.vote_now{ label = _"Vote now", name = "vote_now" }
119 ui.field.vote_later{ label = _"Vote later", name = "vote_later" }
120 ui.field.timestamp{ label = _"Half frozen", name = "half_frozen" }
121 ui.field.text{ label = _"verification_time", value = policy.verification_time }
122 ui.field.integer{ label = _"initiative_quorum_num", value = policy.initiative_quorum_num }
123 ui.field.integer{ label = _"initiative_quorum_den", value = policy.initiative_quorum_den }
124 ui.field.timestamp{ label = _"Fully frozen", name = "fully_frozen" }
125 ui.field.text{ label = _"voting_time", value = policy.voting_time }
126 ui.field.timestamp{ label = _"Closed", name = "closed" }
127 end
128 }
129 ui.form{
130 record = issue.policy,
131 readonly = true,
132 content = function()
133 end
134 }
135 end
136 },
137 }

Impressum / About Us