webmcp

view demo-app/app/main/user/index.lua @ 274:d22b58cafebf

Removed Lua 5.1 compatibility code in webmcp_accelerator.c
author jbe
date Sat Mar 21 14:37:32 2015 +0100 (2015-03-21)
parents 9fdfb27f8e67
children
line source
1 slot.put_into("title", encode.html(_"Users"))
3 slot.select("actions", function()
4 ui.link{
5 content = _"Create new user",
6 module = "user",
7 view = "show"
8 }
9 end)
12 local selector = User:new_selector():add_order_by('"ident", "id"')
14 slot.select("main", function()
15 ui.paginate{
16 selector = selector,
17 content = function()
18 ui.list{
19 records = selector:exec(),
20 columns = {
21 {
22 field_attr = { style = "float: right;" },
23 label = _"Id",
24 name = "id"
25 },
26 {
27 label = _"Ident",
28 name = "ident"
29 },
30 {
31 label = _"Name",
32 name = "name"
33 },
34 {
35 label = _"w",
36 name = "write_priv"
37 },
38 {
39 label = _"Admin",
40 name = "admin"
41 },
42 {
43 content = function(record)
44 ui.link{
45 content = _"Show",
46 module = "user",
47 view = "show",
48 id = record.id
49 }
50 end
51 },
52 }
53 }
54 end
55 }
56 end)

Impressum / About Us