liquid_feedback_frontend

view app/main/membership/_show_box.lua @ 118:93f4e465b50d

add initiator support in delegation

if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Mon Sep 20 20:32:04 2010 +0200 (2010-09-20)
parents 00d1004545f1
children ca006681befc
line source
1 local area = param.get("area", "table")
3 local membership = Membership:by_pk(area.id, app.session.member.id)
5 slot.select("interest", function()
7 if membership then
9 ui.container{
10 attr = {
11 class = "head head_active",
12 onclick = "document.getElementById('membership_content').style.display = 'block';"
13 },
14 content = function()
15 ui.image{
16 static = "icons/16/user_green.png"
17 }
18 slot.put(_"You are member")
19 ui.image{
20 static = "icons/16/dropdown.png"
21 }
22 end
23 }
25 ui.container{
26 attr = { class = "content", id = "membership_content" },
27 content = function()
28 ui.container{
29 attr = {
30 class = "close",
31 style = "cursor: pointer;",
32 onclick = "document.getElementById('membership_content').style.display = 'none';"
33 },
34 content = function()
35 ui.image{ static = "icons/16/cross.png" }
36 end
37 }
38 ui.link{
39 text = _"Remove my membership",
40 module = "membership",
41 action = "update",
42 params = { area_id = area.id, delete = true },
43 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
44 }
45 if membership.autoreject then
46 ui.field.text{ value = _"Autoreject is on." }
47 ui.link{
48 text = _"Remove autoreject",
49 module = "membership",
50 action = "update",
51 params = { area_id = area.id, autoreject = false },
52 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
53 }
54 else
55 ui.field.text{ value = _"Autoreject is off." }
56 ui.link{
57 text = _"Set autoreject",
58 module = "membership",
59 action = "update",
60 params = { area_id = area.id, autoreject = true },
61 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
62 }
63 end
64 end
65 }
66 else
67 ui.link{
68 image = { static = "icons/16/user_add.png" },
69 text = _"Become a member",
70 module = "membership",
71 action = "update",
72 params = { area_id = area.id },
73 routing = {
74 default = {
75 mode = "redirect",
76 module = "area",
77 view = "show",
78 id = area.id
79 }
80 }
81 }
82 end
84 end)

Impressum / About Us