liquid_feedback_frontend
view app/main/membership/_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
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 | 80c215dbf076 |
line source
1 local area = param.get("area", "table")
3 slot.select("interest", function()
4 local membership = Membership:by_pk(area.id, app.session.member.id)
6 ui.container{
7 attr = {
8 class = "head",
9 onclick = "document.getElementById('membership_content').style.display = 'block';"
10 },
11 content = function()
12 if membership then
13 ui.field.text{ value = _"You are member. [more]" }
14 else
15 ui.field.text{ value = _"You are not a member. [more]" }
16 end
17 end
18 }
20 ui.container{
21 attr = { class = "content", id = "membership_content" },
22 content = function()
23 ui.container{
24 attr = {
25 class = "close",
26 style = "cursor: pointer;",
27 onclick = "document.getElementById('membership_content').style.display = 'none';"
28 },
29 content = _"X"
30 }
31 if membership then
32 ui.link{
33 content = _"Remove my membership",
34 module = "membership",
35 action = "update",
36 params = { area_id = area.id, delete = true },
37 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
38 }
39 if membership.autoreject then
40 ui.field.text{ value = _"Autoreject is on." }
41 ui.link{
42 content = _"Remove autoreject",
43 module = "membership",
44 action = "update",
45 params = { area_id = area.id, autoreject = false },
46 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
47 }
48 else
49 ui.field.text{ value = _"Autoreject is off." }
50 ui.link{
51 content = _"Set autoreject",
52 module = "membership",
53 action = "update",
54 params = { area_id = area.id, autoreject = true },
55 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
56 }
57 end
58 else
59 ui.link{
60 content = _"Add my membership to this area",
61 module = "membership",
62 action = "update",
63 params = { area_id = area.id },
64 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
65 }
66 end
67 end
68 }
69 end)