liquid_feedback_frontend
view app/main/admin/policy_list.lua @ 1360:7fbe8b516c2b
Fixed syntax error
author | bsw |
---|---|
date | Mon Aug 06 13:59:24 2018 +0200 (2018-08-06) |
parents | 701a5cf6b067 |
children | 6929d3ced007 |
line source
1 local show_not_in_use = param.get("show_not_in_use", atom.boolean) or false
3 local policies = Policy:build_selector{ active = not show_not_in_use }:exec()
6 ui.titleAdmin(_"Policy list")
8 ui.section( function()
9 ui.sectionHead( function()
10 ui.heading { level = 1, content = _"Policy list" }
11 end )
13 ui.sectionRow( function()
15 if show_not_in_use then
16 ui.link{
17 text = _"Show policies in use",
18 module = "admin",
19 view = "policy_list"
20 }
22 else
23 ui.link{
24 text = _"Create new policy",
25 module = "admin",
26 view = "policy_show"
27 }
28 slot.put(" · ")
29 ui.link{
30 text = _"Show policies not in use",
31 module = "admin",
32 view = "policy_list",
33 params = { show_not_in_use = true }
34 }
36 end
38 end )
40 ui.sectionRow( function()
42 ui.list{
43 records = policies,
44 columns = {
46 { content = function(record)
47 ui.link{
48 text = record.name,
49 module = "admin",
50 view = "policy_show",
51 id = record.id
52 }
53 end
54 }
56 }
57 }
59 end )
60 end )