liquid_feedback_frontend

diff app/main/api/instance.lua @ 1309:32cc544d5a5b

Cumulative patch for upcoming frontend version 4
author bsw/jbe
date Sun Jul 15 14:07:29 2018 +0200 (2018-07-15)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/app/main/api/instance.lua	Sun Jul 15 14:07:29 2018 +0200
     1.3 @@ -0,0 +1,33 @@
     1.4 +local navigation
     1.5 +
     1.6 +if param.get("include_navigation") then
     1.7 +  
     1.8 +  local items = config.meta_navigation_items_func(
     1.9 +    app.access_token and app.access_token.member or nil, 
    1.10 +    param.get("client_id"), 
    1.11 +    param.get("login_url")
    1.12 +  )
    1.13 +  
    1.14 +  navigation = json.array()
    1.15 +  for i, item in ipairs(items) do
    1.16 +    navigation[#navigation+1] = json.object{
    1.17 +      name        = item.name,
    1.18 +      description = item.description,
    1.19 +      url         = item.url,
    1.20 +      active      = item.active
    1.21 +    }
    1.22 +  end
    1.23 +
    1.24 +end
    1.25 +  
    1.26 +local result = json.object{
    1.27 +  name          = config.instance_name,
    1.28 +  slogan        = config.meta_navigation_slogan,
    1.29 +  home_url      = config.meta_navigation_home_url,
    1.30 +  logo_url      = config.meta_navigation_logo_url,
    1.31 +  logo_alt_text = config.meta_navigation_logo_alt_text,
    1.32 +  navigation    = navigation
    1.33 +}
    1.34 +
    1.35 +slot.set_layout(nil, "application/json")
    1.36 +slot.put_into("data", json.export(json.object{ result = result }))

Impressum / About Us