liquid_feedback_frontend
view app/main/contact/_list.lua @ 6:8d91bccab0bf
Version beta2
Possibility to browse voters of a closed issue
Registration with invite code
Email confirmation and password recovery
Download function (for database dumps) added
Critical bug solved, which made it impossible to select your opinion on other peoples suggestions
Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted
Fixed wrong sorting order for "supporters" or "potential supporters"
Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)
Strip space characters from certain fields and ensure they contain at least 3 characters
Showing grade in opinion/list as clear text instead of integer value
More information on initiative is displayed while voting
Colored notification box shown on pages of issues or initiatives which are currently in voting state
Changed default filter for issues to "Open"
Back link on suggestion page
Some optical changes
Removed wrong space character in LICENSE file
Possibility to browse voters of a closed issue
Registration with invite code
Email confirmation and password recovery
Download function (for database dumps) added
Critical bug solved, which made it impossible to select your opinion on other peoples suggestions
Catching error, when trying to set an opinion on a suggestion which has been meanwhile deleted
Fixed wrong sorting order for "supporters" or "potential supporters"
Added format info for birthday (Error when entering dates in wrong format is NOT fixed in this release)
Strip space characters from certain fields and ensure they contain at least 3 characters
Showing grade in opinion/list as clear text instead of integer value
More information on initiative is displayed while voting
Colored notification box shown on pages of issues or initiatives which are currently in voting state
Changed default filter for issues to "Open"
Back link on suggestion page
Some optical changes
Removed wrong space character in LICENSE file
author | bsw/jbe |
---|---|
date | Sat Jan 02 12:00:00 2010 +0100 (2010-01-02) |
parents | 80c215dbf076 |
children |
line source
2 local contacts_selector = Contact:new_selector()
3 :add_where{ "member_id = ?", app.session.member.id }
4 :join("member", nil, "member.id = contact.other_member_id")
5 :add_order_by("member.name")
7 ui.paginate{
8 selector = contacts_selector,
9 content = function()
10 local contacts = contacts_selector:exec()
11 if #contacts == 0 then
12 ui.field.text{ value = _"You didn't saved any member as contact yet." }
13 else
14 ui.list{
15 records = contacts,
16 columns = {
17 {
18 label = _"Name",
19 content = function(record)
20 ui.link{
21 text = record.other_member.name,
22 module = "member",
23 view = "show",
24 id = record.other_member_id
25 }
26 end
27 },
28 {
29 label = _"Published",
30 content = function(record)
31 ui.field.boolean{ value = record.public }
32 end
33 },
34 {
35 content = function(record)
36 if record.public then
37 ui.link{
38 attr = { class = "action" },
39 text = _"Hide",
40 module = "contact",
41 action = "add_member",
42 id = record.other_member_id,
43 params = { public = false },
44 routing = {
45 default = {
46 mode = "redirect",
47 module = request.get_module(),
48 view = request.get_view(),
49 id = param.get_id_cgi(),
50 params = param.get_all_cgi()
51 }
52 }
53 }
54 else
55 ui.link{
56 attr = { class = "action" },
57 text = _"Publish",
58 module = "contact",
59 action = "add_member",
60 id = record.other_member_id,
61 params = { public = true },
62 routing = {
63 default = {
64 mode = "redirect",
65 module = request.get_module(),
66 view = request.get_view(),
67 id = param.get_id_cgi(),
68 params = param.get_all_cgi()
69 }
70 }
71 }
72 end
73 end
74 },
75 {
76 content = function(record)
77 ui.link{
78 attr = { class = "action" },
79 text = _"Remove",
80 module = "contact",
81 action = "remove_member",
82 id = record.other_member_id,
83 routing = {
84 default = {
85 mode = "redirect",
86 module = request.get_module(),
87 view = request.get_view(),
88 id = param.get_id_cgi(),
89 params = param.get_all_cgi()
90 }
91 }
92 }
93 end
94 },
95 }
96 }
97 end
98 end
99 }