liquid_feedback_frontend

view app/main/contact/_list.lua @ 75:733f65c0c0a0

Bugfixes, feature enhancements, code-cleanup, and major work on API

Details:
- API
-- Allow relation name to be passed to helper function util.autoapi{...}
-- Added area API
-- Bugfixes in API
--- Correctly return initiatives (bug #162)
--- Correctly process "id" parameter for initiative API
--- Bugfix related to "state" parameter (bug #165)
--- Changed constant "discussion" to "accepted" (in model/issue.lua, used by API)
--- Fixed JSON encoding in auto_api (bug #181)
--- Ignore list filter "voted" in case of public access
--- Enable access to API without session
- Work on RSS feed (incomplete yet)
- Other bugfixes
-- Handle empty browser identification string
-- Handle invalid date in member/update.lua (bugs #24 #109 #115 #136)
-- Better handle errors while converting uploaded images. (bug #79 +5 duplicates)
-- Don't display revoked initiatives in list of new drafts (bug #134)
-- Fixed syntax error in app/main/member/_action/update_name.lua throwing unexpected error, when new name was too short
-- Do not display refresh support button for revoked initiatives
-- Repaired issue search (bug #150)
-- Fixed typos in german translation files
--- "initi(i)erte"
--- "Er(g)eignisse" (bug #161)
- Code cleanup
-- Removed deprecated motd files locale/motd/de.txt and locale/motd/de_public.txt
-- Removed redundant code in app/main/index/_updated_drafts.lua
- New features and (optical) enhancements
-- Support change of notify email; notification of not approved address added to start page
-- Settings dialog splitted into single pages
-- Mark deactivated members
-- Calendar for birthday selection in profile
-- Policy list public readable when public access is enabled
author bsw
date Thu Jul 08 18:44:02 2010 +0200 (2010-07-08)
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 }

Impressum / About Us