liquid_feedback_frontend
diff app/main/index/index.lua @ 0:3bfb2fcf7ab9
Version alpha1
author | bsw/jbe |
---|---|
date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) |
parents | |
children | 80c215dbf076 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/index/index.lua Wed Nov 18 12:00:00 2009 +0100 1.3 @@ -0,0 +1,82 @@ 1.4 +slot.select("title", function() 1.5 + ui.image{ 1.6 + attr = { class = "avatar" }, 1.7 + module = "member", 1.8 + view = "avatar", 1.9 + extension = "jpg", 1.10 + id = app.session.member.id 1.11 + } 1.12 +end) 1.13 + 1.14 +slot.select("title", function() 1.15 + ui.container{ 1.16 + attr = { class = "lang_chooser" }, 1.17 + content = function() 1.18 + for i, lang in ipairs{"en", "de"} do 1.19 + ui.link{ 1.20 + content = function() 1.21 + ui.image{ 1.22 + static = "lang/" .. lang .. ".png", 1.23 + attr = { style = "margin-left: 0.5em;", alt = lang } 1.24 + } 1.25 + end, 1.26 + module = "index", 1.27 + action = "set_lang", 1.28 + params = { lang = lang }, 1.29 + routing = { 1.30 + default = { 1.31 + mode = "redirect", 1.32 + module = request.get_module(), 1.33 + view = request.get_view(), 1.34 + id = param.get_id_cgi(), 1.35 + params = param.get_all_cgi() 1.36 + } 1.37 + } 1.38 + } 1.39 + end 1.40 + end 1.41 + } 1.42 +end) 1.43 + 1.44 +slot.put_into("title", encode.html(config.app_title)) 1.45 + 1.46 +slot.select("actions", function() 1.47 + slot.put(_"Logged in as:") 1.48 + slot.put(" <b>") 1.49 + slot.put(app.session.member.login) 1.50 + slot.put("</b> | ") 1.51 + 1.52 + ui.link{ 1.53 + content = function() 1.54 + ui.image{ static = "icons/16/user_gray.png" } 1.55 + slot.put(_"Upload avatar") 1.56 + end, 1.57 + module = "member", 1.58 + view = "edit_avatar" 1.59 + } 1.60 + 1.61 + ui.link{ 1.62 + content = function() 1.63 + ui.image{ static = "icons/16/application_form.png" } 1.64 + slot.put(_"Edit my page") 1.65 + end, 1.66 + module = "member", 1.67 + view = "edit" 1.68 + } 1.69 + 1.70 + ui.link{ 1.71 + content = function() 1.72 + ui.image{ static = "icons/16/key.png" } 1.73 + slot.put(_"Change password") 1.74 + end, 1.75 + module = "index", 1.76 + view = "change_password" 1.77 + } 1.78 +end) 1.79 + 1.80 +execute.view{ 1.81 + module = "member", 1.82 + view = "_show", 1.83 + params = { member = app.session.member } 1.84 +} 1.85 +