liquid_feedback_frontend

view app/main/interest/_show_box.lua @ 2:5c601807d397

Version alpha3

Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft

Wiki formatting for drafts

Showing differences between two drafts of the same initiative

Display of outgoing delegation chains

Many other improvements
author bsw
date Mon Nov 23 12:00:00 2009 +0100 (2009-11-23)
parents 3bfb2fcf7ab9
children 768faea1096d
line source
2 local issue = param.get("issue", "table")
5 slot.select("interest", function()
6 local interest = Interest:by_pk(issue.id, app.session.member.id)
8 ui.container{
9 attr = {
10 class = "head",
11 onclick = "document.getElementById('interest_content').style.display = 'block';"
12 },
13 content = function()
14 if interest then
15 ui.field.text{ value = _"You are interested. [more]" }
16 else
17 ui.field.text{ value = _"You are not interested. [more]" }
18 end
19 end
20 }
22 ui.container{
23 attr = { class = "content", id = "interest_content" },
24 content = function()
25 if interest then
26 ui.link{
27 content = _"Remove my interest",
28 module = "interest",
29 action = "update",
30 params = { issue_id = issue.id, delete = true },
31 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
32 }
33 if interest.autoreject then
34 ui.field.text{ value = _"Autoreject is on." }
35 ui.link{
36 content = _"Remove autoreject",
37 module = "interest",
38 action = "update",
39 params = { issue_id = issue.id, autoreject = false },
40 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
41 }
42 else
43 ui.field.text{ value = _"Autoreject is off." }
44 ui.link{
45 content = _"Set autoreject",
46 module = "interest",
47 action = "update",
48 params = { issue_id = issue.id, autoreject = true },
49 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
50 }
51 end
52 else
53 ui.link{
54 content = _"Add my interest to this issue",
55 module = "interest",
56 action = "update",
57 params = { issue_id = issue.id },
58 routing = { default = { mode = "redirect", module = "issue", view = "show", id = issue.id } }
59 }
60 end
61 ui.container{
62 attr = {
63 class = "head",
64 style = "cursor: pointer;",
65 onclick = "document.getElementById('interest_content').style.display = 'none';"
66 },
67 content = _"Click here to close."
68 }
69 end
70 }
71 end)

Impressum / About Us