liquid_feedback_frontend
diff app/main/index/search.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 | 5c601807d397 |
| children | aaba4d28dd53 |
line diff
1.1 --- a/app/main/index/search.lua Tue Feb 02 00:31:06 2010 +0100 1.2 +++ b/app/main/index/search.lua Sat Feb 20 22:10:31 2010 +0100 1.3 @@ -1,44 +1,41 @@ 1.4 -local search_for = param.get("search_for", atom.string) 1.5 +local search_for = param.get("search_for", atom.string) or "global" 1.6 local search_string = param.get("search", atom.string) 1.7 1.8 -search_for = search_for or "global" 1.9 - 1.10 slot.put_into("title", _("Search results for: '#{search}'", { search = search_string })) 1.11 1.12 + 1.13 if search_for == "global" or search_for == "member" then 1.14 - members_selector = Member:get_search_selector(search_string) 1.15 ---if #members > 0 then 1.16 + local members_selector = Member:get_search_selector(search_string) 1.17 ui.heading{ content = _"Members" } 1.18 execute.view{ 1.19 module = "member", 1.20 view = "_list", 1.21 params = { members_selector = members_selector }, 1.22 } 1.23 ---end 1.24 end 1.25 1.26 -if search_for == "global" or search_for == "issue" then 1.27 - issues_selector = Issue:get_search_selector(search_string) 1.28 ---if #issues > 0 then 1.29 - ui.heading{ content = _"Issues" } 1.30 - execute.view{ 1.31 - module = "issue", 1.32 - view = "_list", 1.33 - params = { issues_selector = issues_selector, highlight_string = search_string }, 1.34 - } 1.35 ---end 1.36 -end 1.37 - 1.38 -if search_for == "initiative" then 1.39 - initiatives_selector = Initiative:get_search_selector(search_string) 1.40 ---if #initiatives > 0 then 1.41 +if search_for == "global" or search_for == "initiative" then 1.42 + local initiatives_selector = Initiative:get_search_selector(search_string) 1.43 ui.heading{ content = _"Initiatives" } 1.44 execute.view{ 1.45 module = "initiative", 1.46 view = "_list", 1.47 params = { initiatives_selector = initiatives_selector }, 1.48 } 1.49 ---end 1.50 +end 1.51 + 1.52 +if search_for == "issue" then 1.53 + local issues_selector = Issue:get_search_selector(search_string) 1.54 + ui.heading{ content = _"Issues" } 1.55 + execute.view{ 1.56 + module = "issue", 1.57 + view = "_list", 1.58 + params = { 1.59 + issues_selector = issues_selector, 1.60 + highlight_string = search_string, 1.61 + no_filter = true 1.62 + }, 1.63 + } 1.64 end 1.65 1.66