liquid_feedback_frontend
view app/main/membership/_show_box.lua @ 788:d6bc1e7a409f
No help text on unit page
| author | bsw | 
|---|---|
| date | Fri Jun 29 00:38:53 2012 +0200 (2012-06-29) | 
| 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
