liquid_feedback_frontend

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

Impressum / About Us