liquid_feedback_frontend
diff app/main/index/index.lua @ 1843:b01d9920371b
merge
author | jbe |
---|---|
date | Thu Feb 03 15:57:22 2022 +0100 (2022-02-03) |
parents | ed156969a447 |
children |
line diff
1.1 --- a/app/main/index/index.lua Thu Feb 03 15:54:23 2022 +0100 1.2 +++ b/app/main/index/index.lua Thu Feb 03 15:57:22 2022 +0100 1.3 @@ -26,9 +26,14 @@ 1.4 1.5 if area_id then 1.6 area = Area:by_id(area_id) 1.7 - if not area or area.unit_id ~= unit.id then 1.8 - execute.view { module = "index", view = "404" } 1.9 - request.set_status("404 Not Found") 1.10 + if not area or (unit and area.unit_id ~= unit.id) then 1.11 + request.redirect{ 1.12 + external = encode.url{ 1.13 + module = "index", view = "index", params = { 1.14 + unit = unit_id 1.15 + } 1.16 + } 1.17 + } 1.18 return 1.19 end 1.20 area:load_delegation_info_once_for_member_id(app.session.member_id) 1.21 @@ -45,11 +50,17 @@ 1.22 ui.cell_main{ content = function() 1.23 1.24 execute.view{ module = "index", view = "_sidebar_motd_public" } 1.25 + if not unit_id and not area_id then 1.26 + execute.view{ module = "index", view = "_sidebar_motd_intern_top" } 1.27 + end 1.28 1.29 execute.view{ module = "issue", view = "_list" } 1.30 end } 1.31 1.32 ui.cell_sidebar{ content = function() 1.33 + if not unit and not area and config.logo_startpage then 1.34 + config.logo_startpage() 1.35 + end 1.36 execute.view{ module = "index", view = "_head" } 1.37 1.38 execute.view{ module = "index", view = "_sidebar_motd" }