liquid_feedback_frontend

view app/main/issue/_show_head.lua @ 5:afd9f769c7ae

Version beta1

Final voting with Schulze-Method is now possible

Many bug fixes and code cleanup

Registration with invite codes

More sort and filter options

Seperated display of "supporters" and "potential supporters"

Optical changes

Flood limit / initiative contigent is now checked by frontend

Neccessary changes to access core beta11
author bsw/jbe
date Fri Dec 25 12:00:00 2009 +0100 (2009-12-25)
parents 80c215dbf076
children 8d91bccab0bf
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 }
43 -- TODO performance
44 local interest = Interest:by_pk(issue.id, app.session.member.id)
45 if not issue.closed and not issue.fully_frozen then
46 if not interest then
47 ui.link{
48 content = function()
49 ui.image{ static = "icons/16/user_add.png" }
50 slot.put(_"Add my interest")
51 end,
52 module = "interest",
53 action = "update",
54 params = { issue_id = issue.id },
55 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
56 }
57 end
58 end
60 if not issue.closed then
61 execute.view{
62 module = "delegation",
63 view = "_show_box",
64 params = { issue_id = issue.id }
65 }
66 end
68 if issue.state == "accepted" then
69 -- TODO
70 ui.link{
71 content = function()
72 ui.image{ static = "icons/16/time.png" }
73 slot.put(_"Vote now/later")
74 end,
75 }
76 end
78 end)
81 execute.view{
82 module = "issue",
83 view = "_show_box",
84 params = { issue = issue }
85 }
87 -- ui.twitter("http://example.com/t" .. tostring(issue.id))

Impressum / About Us