aboutsummaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeLines
* Cleanup popup notices.Louise Crow2014-01-14-11/+15
| | | | | | | | Move HTML to view from controller, use same elements for other country popup and everypage - partly so they don't display on top of each other anymore. Don't position them over existing content, position them at the top of the page. Use consistent styling, and keep the javascript unobtrusive.
* Remove the duplicate close button on the popup bannerMark Longair2013-12-10-1/+0
|
* Merge branch 'feature/restore-caching' into wdtkLouise Crow2013-11-26-61/+113
|\
| * Make fragment caching dependent on a config variable.Louise Crow2013-11-25-2/+9
| |
| * Restore caching for five minutes to frontpage.Louise Crow2013-11-25-1/+2
| |
| * Move getting recent requests into a helper method.Louise Crow2013-11-25-24/+49
| |
| * Use built-in SQL quoting.Louise Crow2013-11-25-2/+3
| |
| * Move getting popular bodies into a model method.Louise Crow2013-11-25-23/+26
| |
| * Cache the similar requests for 1 dayLouise Crow2013-11-25-1/+9
| |
| * Move getting similar requests to the InfoRequest model.Louise Crow2013-11-25-12/+19
| |
| * Reduce the memory used to serve /body/all-authorities.csvMark Longair2013-11-14-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On WDTK, /body/all-authorities was using lots of memory - this commit reduces that by (a) fetching the public bodies in batches, rather than keeping them all in memory at one time and (b) writing the CSV to a file and then returning it with X-Sendfile (or equivalent), rather than returning the whole file from memory with send_data. There's a FIXME to do with the layout of download directories; if that's changed, the example nginx config, etc. will need to be updated too. This commit also adds a basic test for reasonable CSV being returned and switches from FasterCSV to CSV in order to fix this NotImplementedError under Ruby 1.9: Please switch to Ruby 1.9's standard CSV library. It's FasterCSV plus support for Ruby 1.9's m17n encoding engine. (The CSV version seems to still work fine under 1.8.7.)
* | Merge branch 'release/0.15' into wdtkMark Longair2013-11-15-76/+141
|\| | | | | | | | | Conflicts: lib/tasks/stats.rake
| * Merge branch 'feature/1118-fix-ask-us-to-add-links' into rails-3-developMark Longair2013-11-07-13/+12
| |\
| | * Show 'browse all' and 'ask us to add' one for authority only search.Louise Crow2013-11-07-0/+2
| | | | | | | | | | | | | | | This is for the case where there are no results and the user was explicitly searching for authorities.
| | * Don't show sorting links when there are no results.Louise Crow2013-11-07-1/+1
| | |
| | * Don't show link for browsing bodiesLouise Crow2013-11-07-2/+0
| | | | | | | | | | | | | | | | | | The context here is that bodies have merely been included in the search - it hasn't been explicitly restricted to bodies. So the links don't really make sense.
| | * Show highlights and correction regardless of search type.Louise Crow2013-11-07-8/+9
| | | | | | | | | | | | Contributes to #1118.
| | * Add 'browse all' and 'ask us to add' to authority search.Louise Crow2013-11-07-3/+1
| | | | | | | | | | | | | | | This is the template used when the user is searching for a public body specifically to make a request to.
| * | Don't include public bodies tagged 'test' in public body statisticsMark Longair2013-11-07-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the initial release of public body statistics to WhatDoTheyKnow a public body only intended for testing ("mySociety Test Quango") was included in the statistics. This commit causes public bodies tagged with "test" to be excluded from the public body statistics page. Fixes #1115.
| * | Factor out code for generating graphable data and add testsMark Longair2013-11-05-23/+48
| | | | | | | | | | | | | | | | | | This simplifies the statistics action of the PublicBodyController and makes it easier to test the functionality now in the simplify_stats_for_graphs method.
| * | Update the calculation of the numerator for percentage statisticsMark Longair2013-11-05-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have changed the denominator of the proportion-based statistics to only include requests that are both visible and not 'awaiting_description'. This would mean, however, that the numerator could be larger than the denominator. This commit updates the calculation of those statistics to also exclude any hidden or unclassified requests.
| * | Add "(n)" to the tooltips on the stats graphsMark Longair2013-11-05-3/+6
| | |
| * | For percentage stats, exclude hidden or unclassified requestsMark Longair2013-11-05-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The WDTK volunteers pointed out that it's not fair to include hidden requests in the denominator, since they're typically hidden for a good reason (e.g. being vexatious, spam, etc.), and we have no information about those that are awaiting_description (i.e. unclassified) so they should be excluded as well.
| * | Add a info_requests_visible_classified_count column to PublicBodyMark Longair2013-11-05-20/+26
| |/ | | | | | | | | | | This counts only those info requests that have prominence 'normal' (i.e. are not hidden) and are not 'awaiting_description' (i.e. that they have had some basic status classification).
| * Fix a small error in stats-graphs-improvementsMark Longair2013-11-03-2/+2
| |
| * Update the helpful model schema annotationsMark Longair2013-11-01-19/+22
| | | | | | | | These are regenerated with "bundle exec annotate"
| * Merge branch 'stats-graphs-improvements' into rails-3-developMark Longair2013-10-31-14/+14
| |\
| | * Avoid an error when the statistics column hasn't been populatedMark Longair2013-10-31-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | The 'if data' needs to be earlier to avoid an error if one of the statistics columns hasn't been filled in by the stats:update_public_bodies_stats rake task yet. Thanks to Louise Crow for pointing this out in code review.
| * | Merge remote-tracking branch 'origin/stats-graphs-improvements' into ↵Louise Crow2013-10-30-8/+18
| |\| | | | | | | | | | rails-3-develop
| | * Add (and use) minified versions of the Flot JavascriptMark Longair2013-10-15-1/+1
| | |
| | * Refactor to avoid repeating .each_with_index.mapMark Longair2013-10-15-4/+9
| | |
| | * Increase the number of public bodies per graph to 10Mark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | Now that there are rotated names on the x axis we shouldn't need to worry about them overlapping, which was the reason for limiting the number to 8 in the first place.
| | * Make bars in public body statistics charts clickableMark Longair2013-10-15-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now if you click on the bar representing statistics for a particular public body, it will take you to that public body's page. In addition, the bars are highlighted when you hover over them.
| | * Only include minimal information about public bodies in JSONMark Longair2013-10-15-1/+6
| | | | | | | | | | | | | | | | | | | | | Previously, the JSON included all the columns from the public body table, which was unnecessary and included the public body's email address. Instead, just include the name and URL of the public body.
| | * Rotate labels on the x-axis by 90 degreesMark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | This commit adds the tickrotor extension to Flot, which allows rotated labels for public bodies. This extension is licensed under either MPL 1.1, GPL 2.0 or LGPL 2.1.
| | * Update flot to a development versionMark Longair2013-10-15-1/+1
| | | | | | | | | | | | | | | | | | This updates flot to version 0c2f6e3, which should be shortly before the release of 0.8.2. This is required for the tickrotor extension (allowing rotated public body names on the x-axis).
| * | Merge remote-tracking branch 'origin/command-line-csv-import' into ↵Louise Crow2013-10-30-0/+2
| |\ \ | | | | | | | | | | | | rails-3-develop
| | * | Add a rake task to import public bodies from a CSV fileMark Longair2013-10-15-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | For importing a very large number of public bodies, it's mostly likely less frustrating to import them from the CSV file using this rake task instead of using the form in the admin interface. Fixes #1132
| * | Merge branch 'hotfix/0.14.0.3' into rails-3-developLouise Crow2013-10-24-1/+2
| |\ \ | | |/ | |/|
| * | Merge branch 'feature/email-subject-cleanup' into rails-3-developLouise Crow2013-10-07-8/+2
| |\ \
| | * | Move special case to whatdotheyknow-themeLouise Crow2013-10-04-8/+2
| | | | | | | | | | | | | | | | | | | | Apart from anything else, we don't want translators to have to worry about the special case text. See https://github.com/mysociety/whatdotheyknow-theme/commit/2078febca5181ce3b1a9c0fae0123ae5f6448718 for the corresponding change to whatdotheyknow-theme.
| * | | Merge branch 'feature/followup-translators-notes' into rails-3-developLouise Crow2013-10-07-2/+13
| |\ \ \
| | * | | Add some translator's notes on the use of 'follow up'.Louise Crow2013-10-04-2/+13
| | |/ /
| * | | Merge remote-tracking branch 'origin/first-letter-unicode-fixes' into ↵Louise Crow2013-10-07-3/+3
| |\ \ \ | | |/ / | |/| | | | | | rails-3-develop
| | * | Fix upcasing of a non-US-ASCII first letter under Ruby 1.8Mark Longair2013-10-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the rare circumstance that someone created a public body whose name started with a lower case letter outside [a-z] with Alaveteli running under Ruby 1.8, the letter would not be upcased correctly before saving to the first_letter column. This commit fixes that by using a Unicode-aware upcase function.
| | * | Allow public body listing based on first letter outside US-ASCIIMark Longair2013-10-04-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Ruby 1.8, it was previously impossible to use one of the "first letter" alphabet links on the public body listing page if the first letter was outside [A-Za-z] since the test for the parameter only being a single letter wasn't aware of the possibly of multi-byte characters. In addition, upcasing of letters outside [A-Za-z] didn't work because String#upcase in Ruby 1.8 isn't Unicode-aware. This commit fixes these two problems, so that non-US-ASCII first letter links will work under Ruby 1.8. (Fixes #1112.)
| * | | Merge remote-tracking branch 'origin/radio-button-fix' into rails-3-developLouise Crow2013-10-04-1/+1
| |\ \ \
| | * | | Fix a radio button label when updating a request statusMark Longair2013-10-01-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clicking on the "This request requires administrator attention" label would actually select the "I've received an error message" option due to the label referring to the wrong input element. This change corrects the label. Thanks to Jedidiah Broadbent for spotting this bug. Fixes #1113
| * | | | Remove important termsLouise Crow2013-10-04-3/+0
| | |/ / | |/| | | | | | | | | | | | | | | | | | These are only being rendered into a comment, and have been for a long time. They now appear to be causing problems with non-ascii characters in ruby 1.9, so drop them completely.
| * | | Merge branch 'release/0.14' into rails-3-developLouise Crow2013-09-24-1/+2
| |\ \ \