bsw@441: execute.view{ module = "index", view = "_lang_chooser" } bsw/jbe@0: bsw/jbe@0: slot.put_into("title", encode.html(config.app_title)) bsw/jbe@0: bsw@276: if app.session.member_id then bsw@276: util.help("index.index", _"Home") bsw@276: bsw@276: execute.view{ bsw@276: module = "member", bsw@276: view = "_show", bsw@276: params = { bsw@276: member = app.session.member, bsw@276: show_as_homepage = true bsw@276: } bsw@276: } bsw@276: bsw@276: elseif config.public_access then bsw@276: if config.motd_public then bsw@276: local help_text = config.motd_public bsw@276: ui.container{ bsw@276: attr = { class = "wiki motd" }, bsw@276: content = function() bsw@276: slot.put(format.wiki_text(help_text)) bsw@276: end bsw@276: } bsw@276: end bsw@276: bsw@276: execute.view{ module = "unit", view = "_list" } bsw@276: bsw@276: else bsw@276: bsw@386: if config.motd_public then bsw@386: local help_text = config.motd_public bsw@386: ui.container{ bsw@386: attr = { class = "wiki motd" }, bsw@386: content = function() bsw@386: slot.put(format.wiki_text(help_text)) bsw@386: end bsw@386: } bsw@386: end bsw@386: bsw@367: ui.tag{ tag = "p", content = _"Closed user group, please login to participate." } bsw@276: bsw@369: ui.form{ bsw@369: attr = { class = "login" }, bsw@369: module = 'index', bsw@369: action = 'login', bsw@369: routing = { bsw@369: ok = { bsw@369: mode = 'redirect', bsw@369: module = param.get("redirect_module") or "index", bsw@369: view = param.get("redirect_view") or "index", bsw@369: id = param.get("redirect_id"), bsw@369: }, bsw@369: error = { bsw@369: mode = 'forward', bsw@369: module = 'index', bsw@369: view = 'login', bsw@369: } bsw@369: }, bsw@369: content = function() bsw@369: ui.field.text{ bsw@369: attr = { id = "username_field" }, bsw@369: label = _'login name', bsw@369: html_name = 'login', bsw@369: value = '' bsw@369: } bsw@369: ui.script{ script = 'document.getElementById("username_field").focus();' } bsw@369: ui.field.password{ bsw@369: label = _'Password', bsw@369: html_name = 'password', bsw@369: value = '' bsw@369: } bsw@369: ui.submit{ bsw@369: text = _'Login' bsw@369: } bsw@369: end bsw@369: } bsw@369: jorges@103: end jorges@103: