liquid_feedback_frontend
diff app/main/index/index.lua @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
author | bsw/jbe |
---|---|
date | Thu Dec 10 12:00:00 2009 +0100 (2009-12-10) |
parents | 3bfb2fcf7ab9 |
children | afd9f769c7ae |
line diff
1.1 --- a/app/main/index/index.lua Mon Nov 30 12:00:00 2009 +0100 1.2 +++ b/app/main/index/index.lua Thu Dec 10 12:00:00 2009 +0100 1.3 @@ -1,10 +1,11 @@ 1.4 slot.select("title", function() 1.5 - ui.image{ 1.6 - attr = { class = "avatar" }, 1.7 - module = "member", 1.8 - view = "avatar", 1.9 - extension = "jpg", 1.10 - id = app.session.member.id 1.11 + execute.view{ 1.12 + module = "member_image", 1.13 + view = "_show", 1.14 + params = { 1.15 + member = app.session.member, 1.16 + image_type = "avatar" 1.17 + } 1.18 } 1.19 end) 1.20 1.21 @@ -41,27 +42,28 @@ 1.22 slot.put_into("title", encode.html(config.app_title)) 1.23 1.24 slot.select("actions", function() 1.25 - slot.put(_"Logged in as:") 1.26 - slot.put(" <b>") 1.27 - slot.put(app.session.member.login) 1.28 - slot.put("</b> | ") 1.29 + 1.30 + ui.link{ 1.31 + content = function() 1.32 + ui.image{ static = "icons/16/application_form.png" } 1.33 + slot.put(_"Edit my profile") 1.34 + end, 1.35 + module = "member", 1.36 + view = "edit" 1.37 + } 1.38 1.39 ui.link{ 1.40 content = function() 1.41 ui.image{ static = "icons/16/user_gray.png" } 1.42 - slot.put(_"Upload avatar") 1.43 + slot.put(_"Upload images") 1.44 end, 1.45 module = "member", 1.46 - view = "edit_avatar" 1.47 + view = "edit_images" 1.48 } 1.49 1.50 - ui.link{ 1.51 - content = function() 1.52 - ui.image{ static = "icons/16/application_form.png" } 1.53 - slot.put(_"Edit my page") 1.54 - end, 1.55 - module = "member", 1.56 - view = "edit" 1.57 + execute.view{ 1.58 + module = "delegation", 1.59 + view = "_show_box" 1.60 } 1.61 1.62 ui.link{ 1.63 @@ -72,8 +74,28 @@ 1.64 module = "index", 1.65 view = "change_password" 1.66 } 1.67 + 1.68 end) 1.69 1.70 +local lang = locale.get("lang") 1.71 +local basepath = request.get_app_basepath() 1.72 +local file_name = basepath .. "/locale/motd/" .. lang .. ".txt" 1.73 +local file = io.open(file_name) 1.74 +if file ~= nil then 1.75 + local help_text = file:read("*a") 1.76 + if #help_text > 0 then 1.77 + ui.container{ 1.78 + attr = { class = "motd wiki" }, 1.79 + content = function() 1.80 + slot.put(format.wiki_text(help_text)) 1.81 + end 1.82 + } 1.83 + end 1.84 +end 1.85 + 1.86 + 1.87 +util.help("index.index", _"Home") 1.88 + 1.89 execute.view{ 1.90 module = "member", 1.91 view = "_show",