liquid_feedback_frontend
diff app/main/index/index.lua @ 276:f460555c9896
Code cleanup
author | bsw |
---|---|
date | Sun Feb 12 20:03:26 2012 +0100 (2012-02-12) |
parents | 7196685f9dd7 |
children | 9ac1ac69053d |
line diff
1.1 --- a/app/main/index/index.lua Sun Feb 12 13:42:08 2012 +0100 1.2 +++ b/app/main/index/index.lua Sun Feb 12 20:03:26 2012 +0100 1.3 @@ -44,18 +44,34 @@ 1.4 1.5 slot.put_into("title", encode.html(config.app_title)) 1.6 1.7 -if app.session.member then 1.8 - app.html_title.title = app.session.member.name 1.9 +if app.session.member_id then 1.10 + util.help("index.index", _"Home") 1.11 + 1.12 + execute.view{ 1.13 + module = "member", 1.14 + view = "_show", 1.15 + params = { 1.16 + member = app.session.member, 1.17 + show_as_homepage = true 1.18 + } 1.19 + } 1.20 + 1.21 +elseif config.public_access then 1.22 + if config.motd_public then 1.23 + local help_text = config.motd_public 1.24 + ui.container{ 1.25 + attr = { class = "wiki motd" }, 1.26 + content = function() 1.27 + slot.put(format.wiki_text(help_text)) 1.28 + end 1.29 + } 1.30 + end 1.31 + 1.32 + execute.view{ module = "unit", view = "_list" } 1.33 + 1.34 +else 1.35 + 1.36 + ui.tag{ content = _"Closed user group, please login to participate." } 1.37 + 1.38 end 1.39 1.40 - 1.41 -util.help("index.index", _"Home") 1.42 - 1.43 -execute.view{ 1.44 - module = "member", 1.45 - view = "_show", 1.46 - params = { 1.47 - member = app.session.member, 1.48 - show_as_homepage = true 1.49 - } 1.50 -}