liquid_feedback_frontend
annotate 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
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 |
| rev | line source |
|---|---|
| bsw/jbe@0 | 1 |
| bsw/jbe@0 | 2 local contacts_selector = Contact:new_selector() |
| bsw/jbe@0 | 3 :add_where{ "member_id = ?", app.session.member.id } |
| bsw/jbe@0 | 4 :join("member", nil, "member.id = contact.other_member_id") |
| bsw/jbe@4 | 5 :add_order_by("member.name") |
| bsw/jbe@0 | 6 |
| bsw/jbe@0 | 7 ui.paginate{ |
| bsw/jbe@0 | 8 selector = contacts_selector, |
| bsw/jbe@0 | 9 content = function() |
| bsw/jbe@0 | 10 local contacts = contacts_selector:exec() |
| bsw/jbe@0 | 11 if #contacts == 0 then |
| bsw/jbe@0 | 12 ui.field.text{ value = _"You didn't saved any member as contact yet." } |
| bsw/jbe@0 | 13 else |
| bsw/jbe@0 | 14 ui.list{ |
| bsw/jbe@0 | 15 records = contacts, |
| bsw/jbe@0 | 16 columns = { |
| bsw/jbe@0 | 17 { |
| bsw/jbe@0 | 18 label = _"Name", |
| bsw/jbe@0 | 19 content = function(record) |
| bsw/jbe@0 | 20 ui.link{ |
| bsw/jbe@0 | 21 text = record.other_member.name, |
| bsw/jbe@0 | 22 module = "member", |
| bsw/jbe@0 | 23 view = "show", |
| bsw/jbe@0 | 24 id = record.other_member_id |
| bsw/jbe@0 | 25 } |
| bsw/jbe@0 | 26 end |
| bsw/jbe@0 | 27 }, |
| bsw/jbe@0 | 28 { |
| bsw/jbe@0 | 29 label = _"Published", |
| bsw/jbe@0 | 30 content = function(record) |
| bsw/jbe@0 | 31 ui.field.boolean{ value = record.public } |
| bsw/jbe@0 | 32 end |
| bsw/jbe@0 | 33 }, |
| bsw/jbe@0 | 34 { |
| bsw/jbe@0 | 35 content = function(record) |
| bsw/jbe@0 | 36 if record.public then |
| bsw/jbe@0 | 37 ui.link{ |
| bsw/jbe@0 | 38 attr = { class = "action" }, |
| bsw/jbe@0 | 39 text = _"Hide", |
| bsw/jbe@0 | 40 module = "contact", |
| bsw/jbe@0 | 41 action = "add_member", |
| bsw/jbe@0 | 42 id = record.other_member_id, |
| bsw/jbe@0 | 43 params = { public = false }, |
| bsw/jbe@0 | 44 routing = { |
| bsw/jbe@0 | 45 default = { |
| bsw/jbe@0 | 46 mode = "redirect", |
| bsw/jbe@0 | 47 module = request.get_module(), |
| bsw/jbe@0 | 48 view = request.get_view(), |
| bsw/jbe@0 | 49 id = param.get_id_cgi(), |
| bsw/jbe@0 | 50 params = param.get_all_cgi() |
| bsw/jbe@0 | 51 } |
| bsw/jbe@0 | 52 } |
| bsw/jbe@0 | 53 } |
| bsw/jbe@0 | 54 else |
| bsw/jbe@0 | 55 ui.link{ |
| bsw/jbe@0 | 56 attr = { class = "action" }, |
| bsw/jbe@0 | 57 text = _"Publish", |
| bsw/jbe@0 | 58 module = "contact", |
| bsw/jbe@0 | 59 action = "add_member", |
| bsw/jbe@0 | 60 id = record.other_member_id, |
| bsw/jbe@0 | 61 params = { public = true }, |
| bsw/jbe@0 | 62 routing = { |
| bsw/jbe@0 | 63 default = { |
| bsw/jbe@0 | 64 mode = "redirect", |
| bsw/jbe@0 | 65 module = request.get_module(), |
| bsw/jbe@0 | 66 view = request.get_view(), |
| bsw/jbe@0 | 67 id = param.get_id_cgi(), |
| bsw/jbe@0 | 68 params = param.get_all_cgi() |
| bsw/jbe@0 | 69 } |
| bsw/jbe@0 | 70 } |
| bsw/jbe@0 | 71 } |
| bsw/jbe@0 | 72 end |
| bsw/jbe@0 | 73 end |
| bsw/jbe@0 | 74 }, |
| bsw/jbe@0 | 75 { |
| bsw/jbe@0 | 76 content = function(record) |
| bsw/jbe@0 | 77 ui.link{ |
| bsw/jbe@0 | 78 attr = { class = "action" }, |
| bsw/jbe@0 | 79 text = _"Remove", |
| bsw/jbe@0 | 80 module = "contact", |
| bsw/jbe@0 | 81 action = "remove_member", |
| bsw/jbe@0 | 82 id = record.other_member_id, |
| bsw/jbe@0 | 83 routing = { |
| bsw/jbe@0 | 84 default = { |
| bsw/jbe@0 | 85 mode = "redirect", |
| bsw/jbe@0 | 86 module = request.get_module(), |
| bsw/jbe@0 | 87 view = request.get_view(), |
| bsw/jbe@0 | 88 id = param.get_id_cgi(), |
| bsw/jbe@0 | 89 params = param.get_all_cgi() |
| bsw/jbe@0 | 90 } |
| bsw/jbe@0 | 91 } |
| bsw/jbe@0 | 92 } |
| bsw/jbe@0 | 93 end |
| bsw/jbe@0 | 94 }, |
| bsw/jbe@0 | 95 } |
| bsw/jbe@0 | 96 } |
| bsw/jbe@0 | 97 end |
| bsw/jbe@0 | 98 end |
| bsw/jbe@4 | 99 } |