liquid_feedback_frontend
view app/main/membership/_show_box.lua @ 1558:5e7d76a32227
Hide discard vote button after voting is closed
author | bsw |
---|---|
date | Tue Nov 10 20:23:37 2020 +0100 (2020-11-10) |
parents | 63d6549cc00b |
children |
line source
1 local area = param.get("area", "table")
3 local membership = Membership:by_pk(area.id, app.session.member.id)
5 if membership then
7 ui.container{
8 attr = {
9 class = "head head_active",
10 },
11 content = function()
12 ui.image{
13 static = "icons/16/user_green.png"
14 }
15 slot.put(_"You are member")
16 end
17 }
19 ui.link{
20 image = { static = "icons/16/cross.png" },
21 text = _"Withdraw membership",
22 module = "membership",
23 action = "update",
24 params = { area_id = area.id, delete = true },
25 routing = { default = { mode = "redirect", module = "area", view = "show", id = area.id } }
26 }
27 elseif app.session.member:has_voting_right_for_unit_id(area.unit_id) then
28 ui.link{
29 image = { static = "icons/16/user_add.png" },
30 text = _"Become a member",
31 module = "membership",
32 action = "update",
33 params = { area_id = area.id },
34 routing = {
35 default = {
36 mode = "redirect",
37 module = "area",
38 view = "show",
39 id = area.id
40 }
41 }
42 }
43 end