liquid_feedback_frontend

annotate app/main/index/index.lua @ 433:990432f7dba0

Added footer, moved about to footer
author bsw
date Sat Mar 10 22:25:42 2012 +0100 (2012-03-10)
parents 699b9fa7bc36
children 58647c8a0339
rev   line source
bsw/jbe@0 1 slot.select("title", function()
bsw/jbe@0 2 ui.container{
bsw/jbe@0 3 attr = { class = "lang_chooser" },
bsw/jbe@0 4 content = function()
bsw@15 5 for i, lang in ipairs{"en", "de", "eo"} do
bsw/jbe@0 6 ui.link{
bsw/jbe@0 7 content = function()
bsw/jbe@0 8 ui.image{
bsw/jbe@0 9 static = "lang/" .. lang .. ".png",
bsw/jbe@0 10 attr = { style = "margin-left: 0.5em;", alt = lang }
bsw/jbe@0 11 }
bsw/jbe@0 12 end,
bsw/jbe@19 13 text = _('Select language "#{langcode}"', { langcode = lang }),
bsw/jbe@0 14 module = "index",
bsw/jbe@0 15 action = "set_lang",
bsw/jbe@0 16 params = { lang = lang },
bsw/jbe@0 17 routing = {
bsw/jbe@0 18 default = {
bsw/jbe@0 19 mode = "redirect",
bsw/jbe@0 20 module = request.get_module(),
bsw/jbe@0 21 view = request.get_view(),
bsw/jbe@0 22 id = param.get_id_cgi(),
bsw/jbe@0 23 params = param.get_all_cgi()
bsw/jbe@0 24 }
bsw/jbe@0 25 }
bsw/jbe@0 26 }
bsw/jbe@0 27 end
bsw/jbe@0 28 end
bsw/jbe@0 29 }
bsw/jbe@0 30 end)
bsw/jbe@0 31
bsw/jbe@0 32 slot.put_into("title", encode.html(config.app_title))
bsw/jbe@0 33
bsw@276 34 if app.session.member_id then
bsw@276 35 util.help("index.index", _"Home")
bsw@276 36
bsw@276 37 execute.view{
bsw@276 38 module = "member",
bsw@276 39 view = "_show",
bsw@276 40 params = {
bsw@276 41 member = app.session.member,
bsw@276 42 show_as_homepage = true
bsw@276 43 }
bsw@276 44 }
bsw@276 45
bsw@276 46 elseif config.public_access then
bsw@276 47 if config.motd_public then
bsw@276 48 local help_text = config.motd_public
bsw@276 49 ui.container{
bsw@276 50 attr = { class = "wiki motd" },
bsw@276 51 content = function()
bsw@276 52 slot.put(format.wiki_text(help_text))
bsw@276 53 end
bsw@276 54 }
bsw@276 55 end
bsw@276 56
bsw@276 57 execute.view{ module = "unit", view = "_list" }
bsw@276 58
bsw@276 59 else
bsw@276 60
bsw@386 61 if config.motd_public then
bsw@386 62 local help_text = config.motd_public
bsw@386 63 ui.container{
bsw@386 64 attr = { class = "wiki motd" },
bsw@386 65 content = function()
bsw@386 66 slot.put(format.wiki_text(help_text))
bsw@386 67 end
bsw@386 68 }
bsw@386 69 end
bsw@386 70
bsw@367 71 ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
bsw@276 72
bsw@369 73 ui.form{
bsw@369 74 attr = { class = "login" },
bsw@369 75 module = 'index',
bsw@369 76 action = 'login',
bsw@369 77 routing = {
bsw@369 78 ok = {
bsw@369 79 mode = 'redirect',
bsw@369 80 module = param.get("redirect_module") or "index",
bsw@369 81 view = param.get("redirect_view") or "index",
bsw@369 82 id = param.get("redirect_id"),
bsw@369 83 },
bsw@369 84 error = {
bsw@369 85 mode = 'forward',
bsw@369 86 module = 'index',
bsw@369 87 view = 'login',
bsw@369 88 }
bsw@369 89 },
bsw@369 90 content = function()
bsw@369 91 ui.field.text{
bsw@369 92 attr = { id = "username_field" },
bsw@369 93 label = _'login name',
bsw@369 94 html_name = 'login',
bsw@369 95 value = ''
bsw@369 96 }
bsw@369 97 ui.script{ script = 'document.getElementById("username_field").focus();' }
bsw@369 98 ui.field.password{
bsw@369 99 label = _'Password',
bsw@369 100 html_name = 'password',
bsw@369 101 value = ''
bsw@369 102 }
bsw@369 103 ui.submit{
bsw@369 104 text = _'Login'
bsw@369 105 }
bsw@369 106 end
bsw@369 107 }
bsw@369 108
jorges@103 109 end
jorges@103 110

Impressum / About Us