liquid_feedback_frontend
view app/main/member/_list.lua @ 0:3bfb2fcf7ab9
Version alpha1
author | bsw/jbe |
---|---|
date | Wed Nov 18 12:00:00 2009 +0100 (2009-11-18) |
parents | |
children | 5c601807d397 |
line source
1 local members_selector = param.get("members_selector", "table")
3 ui.paginate{
4 selector = members_selector,
5 content = function()
6 ui.list{
7 records = members_selector:exec(),
8 columns = {
9 {
10 content = function(record)
11 ui.image{
12 attr = { style="height: 24px;" },
13 module = "member",
14 view = "avatar",
15 extension = "jpg",
16 id = record.id
17 }
18 end
19 },
20 {
21 label = _"Login",
22 content = function(record)
23 ui.link{
24 text = record.login,
25 module = "member",
26 view = "show",
27 id = record.id
28 }
29 end
30 },
31 {
32 label = _"Name",
33 content = function(record)
34 ui.link{
35 content = function()
36 util.put_highlighted_string(record.name)
37 end,
38 module = "member",
39 view = "show",
40 id = record.id
41 }
42 end
43 },
44 {
45 label = _"Ident number",
46 name = "ident_number"
47 },
48 {
49 label = _"Admin?",
50 name = "admin"
51 },
52 {
53 label = "Locked?",
54 content = function(record)
55 ui.field.boolean{ value = record.locked }
56 end
57 },
58 {
59 content = function(record)
60 ui.link{
61 attr = { class = "action" },
62 text = _"Add to my contacts",
63 module = "contact",
64 action = "add_member",
65 id = record.id,
66 routing = {
67 default = {
68 mode = "redirect",
69 module = request.get_module(),
70 view = request.get_view(),
71 id = param.get_id_cgi(),
72 params = param.get_all_cgi()
73 }
74 }
75 }
76 end
77 }
78 }
79 }
80 end
81 }