liquid_feedback_frontend

annotate app/main/index/index.lua @ 111:bf885faf3452

add initiator support in delegation

if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author Daniel Poelzleithner <poelzi@poelzi.org>
date Mon Sep 20 20:32:04 2010 +0200 (2010-09-20)
parents 4f39f0a0d5b5
children 7d0f4721d2f3
rev   line source
bsw/jbe@0 1 slot.select("title", function()
bsw@10 2 if app.session.member then
bsw@10 3 execute.view{
bsw@10 4 module = "member_image",
bsw@10 5 view = "_show",
bsw@10 6 params = {
bsw@10 7 member = app.session.member,
bsw@10 8 image_type = "avatar"
bsw@10 9 }
bsw/jbe@4 10 }
bsw@10 11 end
bsw/jbe@0 12 end)
bsw/jbe@0 13
bsw/jbe@0 14 slot.select("title", function()
bsw/jbe@0 15 ui.container{
bsw/jbe@0 16 attr = { class = "lang_chooser" },
bsw/jbe@0 17 content = function()
bsw@15 18 for i, lang in ipairs{"en", "de", "eo"} do
bsw/jbe@0 19 ui.link{
bsw/jbe@0 20 content = function()
bsw/jbe@0 21 ui.image{
bsw/jbe@0 22 static = "lang/" .. lang .. ".png",
bsw/jbe@0 23 attr = { style = "margin-left: 0.5em;", alt = lang }
bsw/jbe@0 24 }
bsw/jbe@0 25 end,
bsw/jbe@19 26 text = _('Select language "#{langcode}"', { langcode = lang }),
bsw/jbe@0 27 module = "index",
bsw/jbe@0 28 action = "set_lang",
bsw/jbe@0 29 params = { lang = lang },
bsw/jbe@0 30 routing = {
bsw/jbe@0 31 default = {
bsw/jbe@0 32 mode = "redirect",
bsw/jbe@0 33 module = request.get_module(),
bsw/jbe@0 34 view = request.get_view(),
bsw/jbe@0 35 id = param.get_id_cgi(),
bsw/jbe@0 36 params = param.get_all_cgi()
bsw/jbe@0 37 }
bsw/jbe@0 38 }
bsw/jbe@0 39 }
bsw/jbe@0 40 end
bsw/jbe@0 41 end
bsw/jbe@0 42 }
bsw/jbe@0 43 end)
bsw/jbe@0 44
bsw/jbe@0 45 slot.put_into("title", encode.html(config.app_title))
bsw/jbe@0 46
bsw/jbe@0 47 slot.select("actions", function()
bsw/jbe@4 48
bsw@10 49 if app.session.member then
bsw@10 50 ui.link{
bsw@10 51 content = function()
bsw@10 52 ui.image{ static = "icons/16/application_form.png" }
bsw@10 53 slot.put(_"Edit my profile")
bsw@10 54 end,
bsw@10 55 module = "member",
bsw@10 56 view = "edit"
bsw@10 57 }
bsw/jbe@6 58 ui.link{
bsw/jbe@6 59 content = function()
bsw@10 60 ui.image{ static = "icons/16/user_gray.png" }
bsw@10 61 slot.put(_"Upload images")
bsw/jbe@6 62 end,
bsw@10 63 module = "member",
bsw@10 64 view = "edit_images"
bsw@10 65 }
bsw@10 66 execute.view{
bsw@10 67 module = "delegation",
bsw@10 68 view = "_show_box"
bsw/jbe@6 69 }
bsw@10 70 ui.link{
bsw@10 71 content = function()
bsw@10 72 ui.image{ static = "icons/16/wrench.png" }
bsw@10 73 slot.put(_"Settings")
bsw@10 74 end,
bsw@10 75 module = "member",
bsw@10 76 view = "settings"
bsw@10 77 }
bsw@10 78 if config.download_dir then
bsw@10 79 ui.link{
bsw@10 80 content = function()
bsw@10 81 ui.image{ static = "icons/16/database_save.png" }
bsw@10 82 slot.put(_"Download")
bsw@10 83 end,
bsw@10 84 module = "index",
bsw@10 85 view = "download"
bsw@10 86 }
bsw@10 87 end
bsw@10 88 end
bsw/jbe@0 89 end)
bsw/jbe@0 90
bsw/jbe@4 91 util.help("index.index", _"Home")
bsw/jbe@4 92
bsw@57 93 execute.view{
bsw@57 94 module = "member",
bsw@57 95 view = "_show",
bsw@57 96 params = {
bsw@57 97 member = app.session.member,
bsw@57 98 show_as_homepage = true
bsw/jbe@5 99 }
bsw@57 100 }

Impressum / About Us