liquid_feedback_frontend

diff app/main/member/_menu.lua @ 525:63d6549cc00b

Delegation chain preview improved, better visualisation of current context, code cleanup
author bsw
date Fri May 18 19:07:07 2012 +0200 (2012-05-18)
parents
children a06634d17718
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/member/_menu.lua	Fri May 18 19:07:07 2012 +0200
     1.3 @@ -0,0 +1,104 @@
     1.4 +ui.tag{ tag = "ul", content = function()
     1.5 +  
     1.6 +  ui.tag{ tag = "li", content = function()
     1.7 +
     1.8 +    ui.link{
     1.9 +      text = _"Show profile",
    1.10 +      module = "member",
    1.11 +      view = "show",
    1.12 +      id = app.session.member_id
    1.13 +    }
    1.14 +    
    1.15 +  end }
    1.16 +   
    1.17 +  ui.tag{ tag = "li", content = function()
    1.18 +
    1.19 +    ui.link{
    1.20 +      content = function()
    1.21 +          slot.put(_"Edit profile")
    1.22 +      end,
    1.23 +      module = "member",
    1.24 +      view = "edit"
    1.25 +    }
    1.26 +
    1.27 +  end }
    1.28 +   
    1.29 +  ui.tag{ tag = "li", content = function()
    1.30 +
    1.31 +    ui.link{
    1.32 +      content = function()
    1.33 +          slot.put(_"Upload avatar/photo")
    1.34 +      end,
    1.35 +      module = "member",
    1.36 +      view = "edit_images"
    1.37 +    }
    1.38 +
    1.39 +  end }
    1.40 +    
    1.41 +  ui.tag{ tag = "li", content = function()
    1.42 +
    1.43 +    ui.link{
    1.44 +      content = _"Contacts",
    1.45 +      module = 'contact',
    1.46 +      view   = 'list'
    1.47 +    }
    1.48 +
    1.49 +  end }
    1.50 +   
    1.51 +  ui.tag{ tag = "li", content = function()
    1.52 +
    1.53 +    ui.link{
    1.54 +      text   = _"Settings",
    1.55 +      module = "member",
    1.56 +      view = "settings"
    1.57 +    }
    1.58 +
    1.59 +  end }
    1.60 +   
    1.61 +  ui.tag{ tag = "li", content = function()
    1.62 +
    1.63 +    ui.link{
    1.64 +      text   = _"Logout",
    1.65 +      module = 'index',
    1.66 +      action = 'logout',
    1.67 +      routing = {
    1.68 +        default = {
    1.69 +          mode = "redirect",
    1.70 +          module = "index",
    1.71 +          view = "index"
    1.72 +        }
    1.73 +      }
    1.74 +    }
    1.75 +  end }
    1.76 +
    1.77 +  ui.tag{ tag = "li", content = function()
    1.78 +    ui.tag{ tag = "span", content = _"Select language" }
    1.79 +  end }
    1.80 +
    1.81 +  for i, lang in ipairs{"en", "de", "eo"} do
    1.82 +    ui.tag{ tag = "li", content = function()
    1.83 +      ui.link{
    1.84 +        content = function()
    1.85 +          ui.image{
    1.86 +            static = "lang/" .. lang .. ".png",
    1.87 +          }
    1.88 +          ui.tag{ content = _('Select language "#{langcode}"', { langcode = lang }) }
    1.89 +        end,
    1.90 +        module = "index",
    1.91 +        action = "set_lang",
    1.92 +        params = { lang = lang },
    1.93 +        routing = {
    1.94 +          default = {
    1.95 +            mode = "redirect",
    1.96 +            module = request.get_module(),
    1.97 +            view = request.get_view(),
    1.98 +            id = param.get_id_cgi(),
    1.99 +            params = param.get_all_cgi()
   1.100 +          }
   1.101 +        }
   1.102 +      }
   1.103 +    end }
   1.104 +  end
   1.105 +
   1.106 +end }
   1.107 +

Impressum / About Us