liquid_feedback_frontend

view app/main/admin/policy_list.lua @ 1020:93fc1a338311

Added better view title for admin cancel issue
author bsw
date Sun Aug 11 22:13:32 2013 +0200 (2013-08-11)
parents b5684668ac4b
children 701a5cf6b067
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.title(_"Policy list")
9 ui.actions(function()
11 if show_not_in_use then
12 ui.link{
13 text = _"Show policies in use",
14 module = "admin",
15 view = "policy_list"
16 }
18 else
19 ui.link{
20 text = _"Create new policy",
21 module = "admin",
22 view = "policy_show"
23 }
24 slot.put(" · ")
25 ui.link{
26 text = _"Show policies not in use",
27 module = "admin",
28 view = "policy_list",
29 params = { show_not_in_use = true }
30 }
32 end
34 end)
37 ui.list{
38 records = policies,
39 columns = {
41 { label = _"Policy", name = "name" },
43 { content = function(record)
44 ui.link{
45 text = _"Edit",
46 module = "admin",
47 view = "policy_show",
48 id = record.id
49 }
50 end
51 }
53 }
54 }

Impressum / About Us