liquid_feedback_frontend

view app/main/member/show.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
author bsw/jbe
date Sat Feb 20 22:10:31 2010 +0100 (2010-02-20)
parents 0ee1e0c42d4c
children 4f39f0a0d5b5
line source
1 local member = Member:by_id(param.get_id())
3 slot.select("title", function()
4 execute.view{
5 module = "member_image",
6 view = "_show",
7 params = {
8 member = member,
9 image_type = "avatar"
10 }
11 }
12 end)
14 slot.put_into("title", encode.html(_"Member '#{member}'":gsub("#{member}", member.name)))
16 if member.id ~= app.session.member.id then
17 --TODO performance
18 local contact = Contact:by_pk(app.session.member.id, member.id)
19 if contact then
20 slot.select("actions", function()
21 ui.container{
22 attr = { class = "interest" },
23 content = _"You have saved this member as contact."
24 }
25 ui.link{
26 image = { static = "icons/16/book_delete.png" },
27 text = _"Remove from contacts",
28 module = "contact",
29 action = "remove_member",
30 id = contact.other_member_id,
31 routing = {
32 default = {
33 mode = "redirect",
34 module = request.get_module(),
35 view = request.get_view(),
36 id = param.get_id_cgi(),
37 params = param.get_all_cgi()
38 }
39 }
40 }
41 end)
42 else
43 slot.select("actions", function()
44 ui.link{
45 image = { static = "icons/16/book_add.png" },
46 text = _"Add to my contacts",
47 module = "contact",
48 action = "add_member",
49 id = member.id,
50 routing = {
51 default = {
52 mode = "redirect",
53 module = request.get_module(),
54 view = request.get_view(),
55 id = param.get_id_cgi(),
56 params = param.get_all_cgi()
57 }
58 }
59 }
60 end)
61 end
62 end
64 slot.select("actions", function()
65 ui.link{
66 content = function()
67 ui.image{ static = "icons/16/clock_edit.png" }
68 slot.put(encode.html(_"Show name history"))
69 end,
70 module = "member",
71 view = "history",
72 id = member.id
73 }
74 end)
76 util.help("member.show", _"Member page")
78 execute.view{
79 module = "member",
80 view = "_show",
81 params = { member = member }
82 }

Impressum / About Us