# HG changeset patch # User bsw # Date 1330601146 -3600 # Node ID 5a0d5369b21dd54c3031e76bb5e403d3ca5ecae9 # Parent da65510b5d05baf37bc120bb87dd5277d987a476 Login at startpage when no public_access diff -r da65510b5d05 -r 5a0d5369b21d app/main/index/index.lua --- a/app/main/index/index.lua Thu Mar 01 12:22:41 2012 +0100 +++ b/app/main/index/index.lua Thu Mar 01 12:25:46 2012 +0100 @@ -73,5 +73,41 @@ ui.tag{ tag = "p", content = _"Closed user group, please login to participate." } + ui.form{ + attr = { class = "login" }, + module = 'index', + action = 'login', + routing = { + ok = { + mode = 'redirect', + module = param.get("redirect_module") or "index", + view = param.get("redirect_view") or "index", + id = param.get("redirect_id"), + }, + error = { + mode = 'forward', + module = 'index', + view = 'login', + } + }, + content = function() + ui.field.text{ + attr = { id = "username_field" }, + label = _'login name', + html_name = 'login', + value = '' + } + ui.script{ script = 'document.getElementById("username_field").focus();' } + ui.field.password{ + label = _'Password', + html_name = 'password', + value = '' + } + ui.submit{ + text = _'Login' + } + end +} + end diff -r da65510b5d05 -r 5a0d5369b21d app/main/index/login.lua --- a/app/main/index/login.lua Thu Mar 01 12:22:41 2012 +0100 +++ b/app/main/index/login.lua Thu Mar 01 12:25:46 2012 +0100 @@ -54,10 +54,14 @@ } end -ui.tag{ - tag = 'p', - content = _'You need to be logged in, to use all features of this system.' -} +if config.public_access then + ui.tag{ + tag = 'p', + content = _'You need to be logged in, to use all features of this system.' + } +else + ui.tag{ tag = "p", content = _"Closed user group, please login to participate." } +end ui.form{ attr = { class = "login" }, diff -r da65510b5d05 -r 5a0d5369b21d locale/translations.de.lua --- a/locale/translations.de.lua Thu Mar 01 12:22:41 2012 +0100 +++ b/locale/translations.de.lua Thu Mar 01 12:25:46 2012 +0100 @@ -110,7 +110,7 @@ ["Choose member"] = "Mitglied auswählen"; ["Click for details"] = "Klicke für Details"; ["Closed"] = "geschlossen"; -["Closed user group, please login to participate."] = "Geschlossene Benutzergruppe, bitte melde dich an, um teilzunehmen."; +["Closed user group, please login to participate."] = "Geschlossene Benutzergruppe: Bitte melde dich an um teilzunehmen."; ["Collective opinion of supporters"] = "Meinungsbild der Unterstützer"; ["Commit suggestion"] = "Anregung speichern"; ["Compare"] = "Vergleichen";