liquid_feedback_frontend
view app/main/index/_menu.lua @ 911:c0d17602fd8c
Added tag v2.1.0 for changeset e7cea3037d69
| author | bsw | 
|---|---|
| date | Sun Sep 23 17:11:03 2012 +0200 (2012-09-23) | 
| parents | f52f918b38b8 | 
| children | 81bde33c2256 | 
 line source
     1 ui.tag{ tag = "ul", content = function()
     3   if app.session.member_id 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 }
    59     ui.tag{ tag = "li", content = function()
    61       ui.link{
    62         text   = _"Logout",
    63         module = 'index',
    64         action = 'logout',
    65         routing = {
    66           default = {
    67             mode = "redirect",
    68             module = "index",
    69             view = "index"
    70           }
    71         }
    72       }
    73     end }
    74   end
    76   for i, lang in ipairs(config.enabled_languages) do
    78     local langcode
    80     locale.do_with({ lang = lang }, function()
    81       langcode = _("[Name of Language]")
    82     end)
    84     ui.tag{ tag = "li", content = function()
    85       ui.link{
    86         content = _('Select language "#{langcode}"', { langcode = langcode }),
    87         module = "index",
    88         action = "set_lang",
    89         params = { lang = lang },
    90         routing = {
    91           default = {
    92             mode = "redirect",
    93             module = request.get_module(),
    94             view = request.get_view(),
    95             id = param.get_id_cgi(),
    96             params = param.get_all_cgi()
    97           }
    98         }
    99       }
   100     end }
   101   end
   103 end }
