liquid_feedback_frontend
view app/main/index/_menu.lua @ 1021:dd8b14c4b4c0
Fixed error in admin cancel issue
| author | bsw | 
|---|---|
| date | Sun Aug 11 22:13:55 2013 +0200 (2013-08-11) | 
| parents | 81bde33c2256 | 
| children | 
 line source
     1 ui.tag{ tag = "ul", content = function()
     3   if app.session.member_id and not app.session.needs_delegation_check then
     4     ui.tag{ tag = "li", content = function()
     6       ui.link{
     7         text = _"Show profile",
     8         module = "member",
     9         view = "show",
    10         id = app.session.member_id
    11       }
    13     end }
    15     ui.tag{ tag = "li", content = function()
    17       ui.link{
    18         content = function()
    19             slot.put(_"Edit profile")
    20         end,
    21         module = "member",
    22         view = "edit"
    23       }
    25     end }
    27     ui.tag{ tag = "li", content = function()
    29       ui.link{
    30         content = function()
    31             slot.put(_"Upload avatar/photo")
    32         end,
    33         module = "member",
    34         view = "edit_images"
    35       }
    37     end }
    39     ui.tag{ tag = "li", content = function()
    41       ui.link{
    42         content = _"Contacts",
    43         module = 'contact',
    44         view   = 'list'
    45       }
    47     end }
    49     ui.tag{ tag = "li", content = function()
    51       ui.link{
    52         text   = _"Settings",
    53         module = "member",
    54         view = "settings"
    55       }
    57     end }
    58   end
    60   if app.session.member_id then
    61     ui.tag{ tag = "li", content = function()
    63       ui.link{
    64         text   = _"Logout",
    65         module = 'index',
    66         action = 'logout',
    67         routing = {
    68           default = {
    69             mode = "redirect",
    70             module = "index",
    71             view = "index"
    72           }
    73         }
    74       }
    75     end }
    76   end
    78   for i, lang in ipairs(config.enabled_languages) do
    80     local langcode
    82     locale.do_with({ lang = lang }, function()
    83       langcode = _("[Name of Language]")
    84     end)
    86     ui.tag{ tag = "li", content = function()
    87       ui.link{
    88         content = _('Select language "#{langcode}"', { langcode = langcode }),
    89         module = "index",
    90         action = "set_lang",
    91         params = { lang = lang },
    92         routing = {
    93           default = {
    94             mode = "redirect",
    95             module = request.get_module(),
    96             view = request.get_view(),
    97             id = param.get_id_cgi(),
    98             params = param.get_all_cgi()
    99           }
   100         }
   101       }
   102     end }
   103   end
   105 end }
