liquid_feedback_frontend

view app/main/membership/_show_box.lua @ 375:89d32158bfd5

Show unit delegatee on member area list, optical enhancements on member area list
author bsw
date Sun Mar 04 14:18:41 2012 +0100 (2012-03-04)
parents b77e6a17ca77
children 63d6549cc00b
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 },
13 content = function()
14 ui.image{
15 static = "icons/16/user_green.png"
16 }
17 slot.put(_"You are member")
18 end
19 }
21 ui.link{
22 image = { static = "icons/16/cross.png" },
23 text = _"Withdraw membership",
24 module = "membership",
25 action = "update",
26 params = { area_id = area.id, delete = true },
27 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
28 }
29 elseif app.session.member:has_voting_right_for_unit_id(area.unit_id) then
30 ui.link{
31 image = { static = "icons/16/user_add.png" },
32 text = _"Become a member",
33 module = "membership",
34 action = "update",
35 params = { area_id = area.id },
36 routing = {
37 default = {
38 mode = "redirect",
39 module = "area",
40 view = "show",
41 id = area.id
42 }
43 }
44 }
45 end
47 end)

Impressum / About Us