liquid_feedback_frontend
view app/main/index/index.lua @ 448:b04d1f79508e
Fixed wrong information about next state when state_time_left negative
| author | bsw | 
|---|---|
| date | Sun Mar 11 13:30:13 2012 +0100 (2012-03-11) | 
| parents | 58647c8a0339 | 
| children | ba310961ba34 | 
 line source
     1 execute.view{ module = "index", view = "_lang_chooser" }
     3 slot.put_into("title", encode.html(config.app_title))
     5 if app.session.member_id then
     6   util.help("index.index", _"Home")
     8   execute.view{
     9     module = "member",
    10     view = "_show",
    11     params = {
    12       member = app.session.member,
    13       show_as_homepage = true
    14     }
    15   }
    17 elseif config.public_access then
    18   if config.motd_public then
    19     local help_text = config.motd_public
    20     ui.container{
    21       attr = { class = "wiki motd" },
    22       content = function()
    23         slot.put(format.wiki_text(help_text))
    24       end
    25     }
    26   end
    28   execute.view{ module = "unit", view = "_list" }
    30 else
    32   if config.motd_public then
    33     local help_text = config.motd_public
    34     ui.container{
    35       attr = { class = "wiki motd" },
    36       content = function()
    37         slot.put(format.wiki_text(help_text))
    38       end
    39     }
    40   end
    42   ui.tag{ tag = "p", content = _"Closed user group, please login to participate." }
    44   ui.form{
    45   attr = { class = "login" },
    46   module = 'index',
    47   action = 'login',
    48   routing = {
    49     ok = {
    50       mode   = 'redirect',
    51       module = param.get("redirect_module") or "index",
    52       view = param.get("redirect_view") or "index",
    53       id = param.get("redirect_id"),
    54     },
    55     error = {
    56       mode   = 'forward',
    57       module = 'index',
    58       view   = 'login',
    59     }
    60   },
    61   content = function()
    62     ui.field.text{
    63       attr = { id = "username_field" },
    64       label     = _'login name',
    65       html_name = 'login',
    66       value     = ''
    67     }
    68     ui.script{ script = 'document.getElementById("username_field").focus();' }
    69     ui.field.password{
    70       label     = _'Password',
    71       html_name = 'password',
    72       value     = ''
    73     }
    74     ui.submit{
    75       text = _'Login'
    76     }
    77   end
    78 }
    80 end
