liquid_feedback_frontend
view app/main/contact/_list.lua @ 19:00d1004545f1
Dynamic interface using XMLHttpRequests, and many other changes
Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions
Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative
Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline
Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray
Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field
Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
Bugfixes:
- Only allow voting on admitted initiatives
- Repaired issue search
- Don't display delegations for closed issues on member page
- Don't show revoke link in initiative, when issue is already half_frozen
- Localization for voting JavaScript
- Display author of suggestions
Disclosure of voting data after voting is finished:
- Possibility to inspect every ballot including preferences
- Show number of voters preferring one initiative to another initiative
Interface behaviour changes:
- Reversed default order of drafts
- Default order of suggestions changed
- Show new drafts of initiatives only once per day in timeline
Accessibility:
- Barrier-free voting implemented
- POST links are now accessible without JavaScript
- Changed gray for unsatisfied supporters in bar graph to a lighter gray
Other interface improvements:
- Optical enhancements
- Dynamic interface using XMLHttpRequests
- Show usage terms in about section
- Show own membership in area listing
- Show uninformed supporters greyed out and marked with yellow question mark
- Warning box in non-admitted initiatives
- When voted, don't display voting notice and change label of voting link
- Show object counts in more tabulator heads
- Enlarged member statement input field
Miscellaneous:
- Code cleanup
- Added README file containing installation instructions
- Use new WebMCP function ui.filters{...} instead of own ui.filter and ui.order functions
| author | bsw/jbe |
|---|---|
| date | Sat Feb 20 22:10:31 2010 +0100 (2010-02-20) |
| 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 }
