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