liquid_feedback_frontend

view app/main/issue/_show_head.lua @ 16:559c6be0e1e9

"Vote later" feature; Refactored interest box
author bsw
date Tue Feb 02 00:10:17 2010 +0100 (2010-02-02)
parents 72c5e0ee7c98
children 00d1004545f1
line source
1 local issue = param.get("issue", "table")
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.select("title", function()
15 ui.link{
16 content = _"Issue ##{id} (#{policy_name})":gsub("#{id}", issue.id):gsub("#{policy_name}", issue.policy.name),
17 module = "issue",
18 view = "show",
19 id = issue.id
20 }
21 end)
24 slot.select("actions", function()
26 if issue.state == 'voting' then
27 ui.link{
28 content = function()
29 ui.image{ static = "icons/16/email_open.png" }
30 slot.put(_"Vote now")
31 end,
32 module = "vote",
33 view = "list",
34 params = { issue_id = issue.id }
35 }
36 end
38 execute.view{
39 module = "interest",
40 view = "_show_box",
41 params = { issue = issue }
42 }
44 if not issue.closed then
45 execute.view{
46 module = "delegation",
47 view = "_show_box",
48 params = { issue_id = issue.id }
49 }
50 end
52 execute.view{
53 module = "issue",
54 view = "_show_vote_later_box",
55 params = { issue = issue }
56 }
58 if config.issue_discussion_url_func then
59 local url = config.issue_discussion_url_func(issue)
60 ui.link{
61 attr = { target = "_blank" },
62 external = url,
63 content = function()
64 ui.image{ static = "icons/16/comments.png" }
65 slot.put(_"Discussion on issue")
66 end,
67 }
68 end
69 end)
72 execute.view{
73 module = "issue",
74 view = "_show_box",
75 params = { issue = issue }
76 }
78 -- ui.twitter("http://example.com/t" .. tostring(issue.id))
81 if issue.state == 'voting' then
82 ui.container{
83 attr = { class = "voting_active_info" },
84 content = function()
85 slot.put(_"Voting for this issue is currently running!")
86 slot.put(" ")
87 ui.link{
88 content = function()
89 slot.put(_"Vote now")
90 end,
91 module = "vote",
92 view = "list",
93 params = { issue_id = issue.id }
94 }
95 end
96 }
97 slot.put("<br />")
98 end

Impressum / About Us