liquid_feedback_frontend
diff app/main/area/list.lua @ 51:0849be391140
Public read access; Read-only API for initiatives; Prepared integration of OpenID
| author | bsw |
|---|---|
| date | Sun Apr 04 22:05:11 2010 +0200 (2010-04-04) |
| parents | 80c215dbf076 |
| children | c553898f64cb |
line diff
1.1 --- a/app/main/area/list.lua Wed Mar 31 17:50:32 2010 +0200 1.2 +++ b/app/main/area/list.lua Sun Apr 04 22:05:11 2010 +0200 1.3 @@ -1,4 +1,24 @@ 1.4 -slot.put_into("title", _'Area list') 1.5 +if app.session.member_id then 1.6 + slot.put_into("title", _'Area list') 1.7 +else 1.8 + slot.put_into("title", encode.html(config.app_title)) 1.9 +end 1.10 + 1.11 +local lang = locale.get("lang") 1.12 +local basepath = request.get_app_basepath() 1.13 +local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt" 1.14 +local file = io.open(file_name) 1.15 +if file ~= nil then 1.16 + local help_text = file:read("*a") 1.17 + if #help_text > 0 then 1.18 + ui.container{ 1.19 + attr = { class = "motd wiki" }, 1.20 + content = function() 1.21 + slot.put(format.wiki_text(help_text)) 1.22 + end 1.23 + } 1.24 + end 1.25 +end 1.26 1.27 util.help("area.list", _"Area list") 1.28