liquid_feedback_frontend

view app/main/issue/show.lua @ 0:3bfb2fcf7ab9

Version alpha1
author bsw/jbe
date Wed Nov 18 12:00:00 2009 +0100 (2009-11-18)
parents
children 5c601807d397
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 ui.tabs{
46 {
47 name = "initiatives",
48 label = _"Initiatives",
49 content = function()
50 execute.view{
51 module = "initiative",
52 view = "_list",
53 params = {
54 issue = issue,
55 initiatives_selector = issue:get_reference_selector("initiatives")
56 }
57 }
58 slot.put("<br />")
59 if not issue.frozen and not issue.closed then
60 ui.link{
61 attr = { class = "action" },
62 content = function()
63 ui.image{ static = "icons/16/script_add.png" }
64 slot.put(_"Add new initiative to issue")
65 end,
66 module = "initiative",
67 view = "new",
68 params = { issue_id = issue.id }
69 }
70 end
71 end
72 },
73 --[[ {
74 name = "voting_requests",
75 label = _"Voting requests",
76 content = function()
77 execute.view{
78 module = "issue_voting_request",
79 view = "_list",
80 params = { issue = issue }
81 }
82 end
83 },
84 --]]
85 {
86 name = "details",
87 label = _"Details",
88 content = function()
89 ui.form{
90 record = issue,
91 readonly = true,
92 attr = { class = "vertical" },
93 content = function()
94 trace.debug(issue.created)
95 ui.field.text{ label = _"State", name = "state" }
96 ui.field.timestamp{ label = _"Created at", name = "created" }
97 ui.field.timestamp{ label = _"Accepted", name = "accepted" }
98 ui.field.timestamp{ label = _"Half frozen", name = "half_frozen" }
99 ui.field.timestamp{ label = _"Fully frozen", name = "fully_frozen" }
100 ui.field.timestamp{ label = _"Closed", name = "closed" }
101 ui.field.potential_issue_weight{ label = _"Potential weight", name = "potential_weight" }
102 ui.field.vote_now{ label = _"Vote now", name = "vote_now" }
103 ui.field.vote_later{ label = _"Vote later", name = "vote_later" }
104 end
105 }
106 end
107 },
108 }

Impressum / About Us