liquid_feedback_frontend
view app/main/issue/_show_head.lua @ 52:88ac7798b562
Several bugfixes (getpic.c, accepted but canceled issues, ...); Listing of available policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
author | bsw/jbe |
---|---|
date | Thu Apr 15 19:58:25 2010 +0200 (2010-04-15) |
parents | 0849be391140 |
children | 7bc629bc1c20 |
line source
1 local issue = param.get("issue", "table")
3 local direct_voter
5 if app.session.member_id then
6 direct_voter = DirectVoter:by_pk(issue.id, app.session.member.id)
7 end
9 if config.feature_rss_enabled then
10 util.html_rss_head{ title = _"Initiatives in this issue (last created first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id } }
11 util.html_rss_head{ title = _"Initiatives in this issue (last updated first)", module = "initiative", view = "list_rss", params = { issue_id = issue.id, order = "last_updated" } }
12 end
14 slot.select("path", function()
15 end)
17 slot.select("title", function()
18 ui.link{
19 content = issue.area.name,
20 module = "area",
21 view = "show",
22 id = issue.area.id
23 }
24 slot.put(" · ")
25 ui.link{
26 content = _("Issue ##{id}", { id = issue.id }),
27 module = "issue",
28 view = "show",
29 id = issue.id
30 }
31 slot.put(" · ")
32 ui.tag{
33 tag = "span",
34 content = issue.state_name,
35 }
36 end)
39 slot.select("actions", function()
41 if app.session.member_id then
43 if issue.state == 'voting' then
44 local text
45 if not direct_voter then
46 text = _"Vote now"
47 else
48 text = _"Change vote"
49 end
50 ui.link{
51 content = function()
52 ui.image{ static = "icons/16/email_open.png" }
53 slot.put(text)
54 end,
55 module = "vote",
56 view = "list",
57 params = { issue_id = issue.id }
58 }
59 end
61 execute.view{
62 module = "interest",
63 view = "_show_box",
64 params = { issue = issue }
65 }
67 if not issue.closed then
68 execute.view{
69 module = "delegation",
70 view = "_show_box",
71 params = { issue_id = issue.id }
72 }
73 end
75 execute.view{
76 module = "issue",
77 view = "_show_vote_later_box",
78 params = { issue = issue }
79 }
81 end
83 if config.issue_discussion_url_func then
84 local url = config.issue_discussion_url_func(issue)
85 ui.link{
86 attr = { target = "_blank" },
87 external = url,
88 content = function()
89 ui.image{ static = "icons/16/comments.png" }
90 slot.put(_"Discussion on issue")
91 end,
92 }
93 end
94 end)
97 execute.view{
98 module = "issue",
99 view = "_show_box",
100 params = { issue = issue }
101 }
103 -- ui.twitter("http://example.com/t" .. tostring(issue.id))
106 if issue.state == 'voting' and not direct_voter then
107 ui.container{
108 attr = { class = "voting_active_info" },
109 content = function()
110 slot.put(_"Voting for this issue is currently running!")
111 slot.put(" ")
112 if app.session.member_id then
113 ui.link{
114 content = function()
115 slot.put(_"Vote now")
116 end,
117 module = "vote",
118 view = "list",
119 params = { issue_id = issue.id }
120 }
121 end
122 end
123 }
124 slot.put("<br />")
125 end