liquid_feedback_frontend
annotate app/main/contact/_list.lua @ 52:88ac7798b562
Several bugfixes (getpic.c, accepted but canceled issues, ...); Listing of available policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
- Bugfixes in fastpath/getpic.c (related to crashes since alpha5)
- Respect Content-Types of images in database
(needs database update, as Content-Type was incorrectly stored by previous versions)
- Typo fixed in help messages
- RSS-Feed (currently only after manual authentication while session is valid)
- Listing of available policies
- German translation fixed: "gebe" -> "gib" (Imperativ)
- Bugfixes related to issues which had been accepted but canceled afterwards
- Prohibit creation of initiatives in disabled areas or with disabled policies
author | bsw/jbe |
---|---|
date | Thu Apr 15 19:58:25 2010 +0200 (2010-04-15) |
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 } |