liquid_feedback_frontend

view app/main/issue/_show_head.lua @ 30:abcac05b1091

Added tag beta11 for changeset b195682957dc
author jbe
date Sun Feb 21 17:34:37 2010 +0100 (2010-02-21)
parents 00d1004545f1
children 0849be391140
line source
1 local issue = param.get("issue", "table")
3 local direct_voter = DirectVoter:by_pk(issue.id, app.session.member.id)
5 slot.put_into("html_head", '<link rel="alternate" type="application/rss+xml" title="RSS" href="../show/' .. tostring(issue.id) .. '.rss" />')
7 slot.select("path", function()
8 end)
10 slot.select("title", function()
11 ui.link{
12 content = issue.area.name,
13 module = "area",
14 view = "show",
15 id = issue.area.id
16 }
17 slot.put(" &middot; ")
18 ui.link{
19 content = _("Issue ##{id}", { id = issue.id }),
20 module = "issue",
21 view = "show",
22 id = issue.id
23 }
24 slot.put(" &middot; ")
25 ui.tag{
26 tag = "span",
27 content = issue.state_name,
28 }
29 end)
32 slot.select("actions", function()
34 if issue.state == 'voting' then
35 local text
36 if not direct_voter then
37 text = _"Vote now"
38 else
39 text = _"Change vote"
40 end
41 ui.link{
42 content = function()
43 ui.image{ static = "icons/16/email_open.png" }
44 slot.put(text)
45 end,
46 module = "vote",
47 view = "list",
48 params = { issue_id = issue.id }
49 }
50 end
52 execute.view{
53 module = "interest",
54 view = "_show_box",
55 params = { issue = issue }
56 }
58 if not issue.closed then
59 execute.view{
60 module = "delegation",
61 view = "_show_box",
62 params = { issue_id = issue.id }
63 }
64 end
66 execute.view{
67 module = "issue",
68 view = "_show_vote_later_box",
69 params = { issue = issue }
70 }
72 if config.issue_discussion_url_func then
73 local url = config.issue_discussion_url_func(issue)
74 ui.link{
75 attr = { target = "_blank" },
76 external = url,
77 content = function()
78 ui.image{ static = "icons/16/comments.png" }
79 slot.put(_"Discussion on issue")
80 end,
81 }
82 end
83 end)
86 execute.view{
87 module = "issue",
88 view = "_show_box",
89 params = { issue = issue }
90 }
92 -- ui.twitter("http://example.com/t" .. tostring(issue.id))
95 if issue.state == 'voting' and not direct_voter then
96 ui.container{
97 attr = { class = "voting_active_info" },
98 content = function()
99 slot.put(_"Voting for this issue is currently running!")
100 slot.put(" ")
101 ui.link{
102 content = function()
103 slot.put(_"Vote now")
104 end,
105 module = "vote",
106 view = "list",
107 params = { issue_id = issue.id }
108 }
109 end
110 }
111 slot.put("<br />")
112 end

Impressum / About Us