liquid_feedback_frontend

diff app/main/index/login.lua @ 11:77d58efe99fd

Version beta7

Important security fixes:
- Added missing HTML encoding to postal address of member
- Link to discussion URL only if it starts with http(s)://

Other bugfixes:
- Fixed wrong display of 2nd level delegating voters for an initiative
- Do not display invited initiators as initiators while voting
- Added missing translation

New features:
- Public message of the day
- Both direct and indirect supporter count is shown in tab heads
- Support shown in initiative lists

Language chooser at the login page has been added (again)
author bsw
date Fri Jan 22 12:00:00 2010 +0100 (2010-01-22)
parents afd9f769c7ae
children a3ac899559de
line diff
     1.1 --- a/app/main/index/login.lua	Sun Jan 10 12:00:00 2010 +0100
     1.2 +++ b/app/main/index/login.lua	Fri Jan 22 12:00:00 2010 +0100
     1.3 @@ -12,6 +12,55 @@
     1.4  
     1.5  slot.put_into("title", encode.html(config.app_title))
     1.6  
     1.7 +slot.select("title", function()
     1.8 +  ui.container{
     1.9 +    attr = { class = "lang_chooser" },
    1.10 +    content = function()
    1.11 +      for i, lang in ipairs{"en", "de"} do
    1.12 +        ui.link{
    1.13 +          content = function()
    1.14 +            ui.image{
    1.15 +              static = "lang/" .. lang .. ".png",
    1.16 +              attr = { style = "margin-left: 0.5em;", alt = lang }
    1.17 +            }
    1.18 +          end,
    1.19 +          module = "index",
    1.20 +          action = "set_lang",
    1.21 +          params = { lang = lang },
    1.22 +          routing = {
    1.23 +            default = {
    1.24 +              mode = "redirect",
    1.25 +              module = request.get_module(),
    1.26 +              view = request.get_view(),
    1.27 +              id = param.get_id_cgi(),
    1.28 +              params = param.get_all_cgi()
    1.29 +            }
    1.30 +          }
    1.31 +        }
    1.32 +      end
    1.33 +    end
    1.34 +  }
    1.35 +end)
    1.36 +
    1.37 +
    1.38 +local lang = locale.get("lang")
    1.39 +local basepath = request.get_app_basepath() 
    1.40 +local file_name = basepath .. "/locale/motd/" .. lang .. "_public.txt"
    1.41 +local file = io.open(file_name)
    1.42 +if file ~= nil then
    1.43 +  local help_text = file:read("*a")
    1.44 +  if #help_text > 0 then
    1.45 +    ui.container{
    1.46 +      attr = { class = "motd wiki" },
    1.47 +      content = function()
    1.48 +        slot.put(format.wiki_text(help_text))
    1.49 +      end
    1.50 +    }
    1.51 +  end
    1.52 +end
    1.53 +
    1.54 +
    1.55 +
    1.56  ui.tag{
    1.57    tag = 'p',
    1.58    content = _'You need to be logged in, to use this system.'
    1.59 @@ -51,3 +100,4 @@
    1.60      }
    1.61    end
    1.62  }
    1.63 +

Impressum / About Us