liquid_feedback_frontend
annotate app/main/issue/show_tab.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 | |
children | 53a45356c107 |
rev | line source |
---|---|
bsw/jbe@19 | 1 local issue |
bsw/jbe@19 | 2 if request.get_json_request_slots() then |
bsw/jbe@19 | 3 issue = Issue:by_id(param.get("issue_id")) |
bsw/jbe@19 | 4 else |
bsw/jbe@19 | 5 issue = param.get("issue", "table") |
bsw/jbe@19 | 6 end |
bsw/jbe@19 | 7 |
bsw/jbe@19 | 8 local voting_requested_percentage = 0 |
bsw/jbe@19 | 9 if issue.vote_later and issue.population and issue.population > 0 then |
bsw/jbe@19 | 10 voting_requested_percentage = math.ceil(issue.vote_later / issue.population * 100) |
bsw/jbe@19 | 11 end |
bsw/jbe@19 | 12 |
bsw/jbe@19 | 13 local interested_members_selector = issue:get_reference_selector("interested_members_snapshot") |
bsw/jbe@19 | 14 :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id") |
bsw/jbe@19 | 15 :add_field("direct_interest_snapshot.weight") |
bsw/jbe@19 | 16 :add_where("direct_interest_snapshot.event = issue.latest_snapshot_event") |
bsw/jbe@19 | 17 |
bsw/jbe@19 | 18 local voting_requests_selector = issue:get_reference_selector("interested_members_snapshot") |
bsw/jbe@19 | 19 :join("issue", nil, "issue.id = direct_interest_snapshot.issue_id") |
bsw/jbe@19 | 20 :add_where("direct_interest_snapshot.voting_requested = false") |
bsw/jbe@19 | 21 |
bsw/jbe@19 | 22 local delegations_selector = issue:get_reference_selector("delegations") |
bsw/jbe@19 | 23 |
bsw/jbe@19 | 24 |
bsw/jbe@19 | 25 ui.tabs{ |
bsw/jbe@19 | 26 module = "issue", |
bsw/jbe@19 | 27 view = "show_tab", |
bsw/jbe@19 | 28 static_params = { issue_id = issue.id }, |
bsw/jbe@19 | 29 { |
bsw/jbe@19 | 30 name = "interested_members", |
bsw/jbe@19 | 31 label = _"Interested members" .. " (" .. tostring(interested_members_selector:count()) .. ")" , |
bsw/jbe@19 | 32 icon = { static = "icons/16/eye.png" }, |
bsw/jbe@19 | 33 module = "member", |
bsw/jbe@19 | 34 view = "_list", |
bsw/jbe@19 | 35 params = { |
bsw/jbe@19 | 36 issue = issue, |
bsw/jbe@19 | 37 members_selector = interested_members_selector |
bsw/jbe@19 | 38 } |
bsw/jbe@19 | 39 }, |
bsw/jbe@19 | 40 { |
bsw/jbe@19 | 41 name = "voting_requests", |
bsw/jbe@19 | 42 label = _"Vote later requests" .. " (" .. tostring(voting_requests_selector:count()) .. ") (" .. tostring(voting_requested_percentage) .. "%)", |
bsw/jbe@19 | 43 icon = { static = "icons/16/clock_play.png" }, |
bsw/jbe@19 | 44 module = "member", |
bsw/jbe@19 | 45 view = "_list", |
bsw/jbe@19 | 46 params = { |
bsw/jbe@19 | 47 issue = issue, |
bsw/jbe@19 | 48 members_selector = voting_requests_selector |
bsw/jbe@19 | 49 } |
bsw/jbe@19 | 50 }, |
bsw/jbe@19 | 51 { |
bsw/jbe@19 | 52 name = "delegations", |
bsw/jbe@19 | 53 label = _"Delegations" .. " (" .. tostring(delegations_selector:count()) .. ")" , |
bsw/jbe@19 | 54 icon = { static = "icons/16/table_go.png" }, |
bsw/jbe@19 | 55 module = "delegation", |
bsw/jbe@19 | 56 view = "_list", |
bsw/jbe@19 | 57 params = { delegations_selector = delegations_selector } |
bsw/jbe@19 | 58 }, |
bsw/jbe@19 | 59 { |
bsw/jbe@19 | 60 name = "details", |
bsw/jbe@19 | 61 label = _"Details", |
bsw/jbe@19 | 62 icon = { static = "icons/16/magnifier.png" }, |
bsw/jbe@19 | 63 module = "issue", |
bsw/jbe@19 | 64 view = "_details", |
bsw/jbe@19 | 65 params = { issue = issue } |
bsw/jbe@19 | 66 }, |
bsw/jbe@19 | 67 } |
bsw/jbe@19 | 68 |
bsw/jbe@19 | 69 |