liquid_feedback_frontend
view app/main/membership/_show_box.lua @ 52:88ac7798b562
Several bugfixes (getpic.c, accepted but canceled issues, ...); Listing of available policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
| author | bsw/jbe | 
|---|---|
| date | Thu Apr 15 19:58:25 2010 +0200 (2010-04-15) | 
| 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)
