liquid_feedback_frontend

changeset 1477:e11d8f3a663a

Fixed inactive policy view
author bsw
date Thu Oct 18 17:48:21 2018 +0200 (2018-10-18)
parents 22bb5e2b6548
children 8c9f7f9152ce
files app/main/admin/index.lua
line diff
     1.1 --- a/app/main/admin/index.lua	Thu Oct 18 17:46:23 2018 +0200
     1.2 +++ b/app/main/admin/index.lua	Thu Oct 18 17:48:21 2018 +0200
     1.3 @@ -2,7 +2,8 @@
     1.4  
     1.5  local units = Unit:get_flattened_tree{ include_inactive = inactive }
     1.6  
     1.7 -local policies = Policy:build_selector{}:add_order_by("index"):exec()
     1.8 +local policies = Policy:build_selector{ active = not inactive }:exec()
     1.9 +--local policies = Policy:build_selector{}:add_order_by("index"):exec()
    1.10  
    1.11  ui.titleAdmin()
    1.12  
    1.13 @@ -121,12 +122,11 @@
    1.14            view = "policy_show"
    1.15          }
    1.16          slot.put("   ")
    1.17 -        ui.link{
    1.18 -          text = _"Show policies not in use",
    1.19 -          module = "admin",
    1.20 -          view = "policy_list",
    1.21 -          params = { show_not_in_use = true }
    1.22 -        }
    1.23 +        if (not inactive) then
    1.24 +          ui.link { module = "admin", view = "index", params = { inactive = true }, content = _"Show inactive" }
    1.25 +        else
    1.26 +          ui.link { module = "admin", view = "index", content = _"Hide inactive" }
    1.27 +        end
    1.28        end }
    1.29      end }
    1.30  

Impressum / About Us