aboutsummaryrefslogtreecommitdiffstats
path: root/app
Commit message (Collapse)AuthorAgeLines
* Save cached columns once updated.Louise Crow2013-09-05-0/+6
|
* Don't dirty the first_letter attribute when not changed.Louise Crow2013-09-05-3/+14
|
* Don't re-index body when updating statsLouise Crow2013-09-05-0/+1
|
* Don't save versions of new counter cache columnsLouise Crow2013-09-05-1/+5
|
* Merge branch 'body-statistics' into rails-3-developLouise Crow2013-09-04-1/+224
|\
| * Don't include NULL column values in the statisticsMark Longair2013-08-20-1/+1
| | | | | | | | | | | | | | We were already excluding graphs where all the data was NULL but it's possible by directly manipulating the database to have some values NULL and some non-NULL, so exclude any NULL values anyway.
| * Add some caveats to the experimental statistics pageMark Longair2013-08-20-0/+38
| | | | | | | | | | | | | | The statistics we're publishing are potentially subject to misinterpretation, so add some warnings about their experimental nature. Also, add a note crediting Mark Goodge for his useful work on statistics for WhatDoTheyKnow.
| * Reduce the number of public bodies per graphMark Longair2013-08-20-1/+1
| | | | | | | | | | | | | | | | It seems to be difficult to customize the display of the tick labels (see the body-statistics-rotated-label branch for an as-yet-not-working alternative) so for the moment just reduce the number of public bodies shown per graph from 10 to 8.
| * Add a config option to enable the public body statistics pageMark Longair2013-08-20-0/+4
| |
| * Refactor calculation of statisticsMark Longair2013-08-20-91/+125
| | | | | | | | | | | | Move the calculation of statistics on public bodies into the PublicBody model, so that there's less logic in the controller.
| * Improve calculation of PublicBody statistics columnsMark Longair2013-08-20-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On PublicBody, we don't need to update info_requests_count because that's already done with :counter_cache. On the other hand, info_requests_successful_count and info_requests_not_held_count can't be updated easily with counter_cache (since they need conditions to be attached). Instead we update them in post_save and post_destroy, as suggested here: http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions This also adds tests to ensure that the after_(save|destroy) callbacks are called and that they modify the counts correctly.
| * Add excanvas for support of graph-drawing on IE8 and beforeMark Longair2013-08-20-0/+1
| | | | | | | | This is as suggested in the Flot documentation.
| * Make the minimum requests for statistics configurableMark Longair2013-08-20-1/+3
| | | | | | | | This adds the MINIMUM_REQUESTS_FOR_STATISTICS config option.
| * Add a page with experimental statistics on public bodiesMark Longair2013-08-20-1/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statistics on the status of the requests to a particular public body are too slow to calculate on-the-fly, so this commit adds: * Extra columns on public_bodies to store counts of the successful, not held, and overdue request counts for each public body. * A rake task which should be run periodically to update the overdue request count column. If Javascript is not available, the summary statistics are shown as tables. If Javascript is available, graphs are drawn with Flot.
* | Merge remote-tracking branch 'origin/admin-js-static' into rails-3-developLouise Crow2013-08-28-95/+0
|\ \
| * | Serve admin.js as a static fileMark Longair2013-08-21-95/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | admin.js was being generated from a view so that the config variable ADMIN_PUBLIC_URL could be used to direct AJAX requests in the admin interface correctly. ADMIN_PUBLIC_URL was necessary for WhatDoTheyKnow when the admin interface was proxied over SSL, while the rest of the site was non-SSL. Now that the whole site is served over SSL, however, the proxy for the admin interface is not longer used and ADMIN_PUBLIC_URL / ADMIN_BASE_URL have been removed. As a result, admin.js is now being generated from a Rails view unnecessarily, and at some performance cost. This commit moves admin.coffee and admin.js to the public directory, so they will be served more efficiently. In addition, this commit removes admin.coffee / admin.js from public/javascripts/ where there was a second (and different) version that now appears to be unused.
* | | Merge branch 'feature/restore-unobtrusive-js' into rails-3-developLouise Crow2013-08-22-3/+2
|\ \ \ | |/ / |/| |
| * | Add confirmation to outgoing messsage destroy.Louise Crow2013-08-22-2/+1
| | | | | | | | | | | | Closes #1053.
| * | Include unobtrusive js in the admin layoutLouise Crow2013-08-22-1/+1
| | | | | | | | | | | | We use the :confirm option of the submit_tag helper. Fixes #1042.
* | | Merge branch 'release/0.13' into rails-3-developLouise Crow2013-08-20-1/+1
|\ \ \
| * | | Handle case of nil user_idLouise Crow2013-08-20-1/+1
| | |/ | |/| | | | | | | When status was updated by a script.
* | | Merge remote-tracking branch ↵Louise Crow2013-08-20-8/+5
|\ \ \ | |/ / |/| | | | | 'openaustralia_github/fix-production-diagnostic-messages' into rails-3-develop
| * | Make method name clearerHenare Degan2013-08-10-3/+3
| | |
| * | Don't show diagnostic messages when request is simply localHenare Degan2013-08-10-6/+3
| |/ | | | | | | | | | | This fixes the scenario when Alaveteli is behind a proxy in production Resolves #1039
* | Merge branch 'feature/further-request-event-fixes' into rails-3-developLouise Crow2013-08-15-11/+43
|\ \
| * | Comments on described_state and calculated_stateLouise Crow2013-08-15-3/+20
| | | | | | | | | | | | | | | | | | Add some notes on the logic and expectations around InfoRequest.described_state and calculate_status and InfoRequestEvent.described_state and calculated_state.
| * | Set the calculated state on external requests.Louise Crow2013-08-15-0/+2
| | | | | | | | | | | | Set to 'waiting_response' on creation, to match the displayed state.
| * | Make admin edits affect info_request_event described_states.Louise Crow2013-08-15-7/+8
| | | | | | | | | | | | | | | | | | | | | Make sure that admin edits changing the described state of an info request are reflected in the latest_status and status values of info request events so that the info requests are retrieved correctly in status-based searches.
| * | Allow 'edit' and 'status_update' calculated states to propagate.Louise Crow2013-08-15-4/+16
| |/ | | | | | | | | | | | | | | Update test expectations and add further test to explicitly show that we want the described status from a status update to be propagated to a preceding response, as well as being filled in in the status update itself (which is mostly to deal with the case where there isn't a preceding response). Make those changes to calculate_event_states
* | Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-1/+1
| |
* | Fix for #566. Also fix wrong identifier being used in text.Louise Crow2013-08-13-1/+1
|/
* Use raw on select_tag option string so it doesn't get escaped. Fixes #1027.Louise Crow2013-07-31-2/+2
|
* Preserve string "Tags (separated by a space):", removed in ↵Louise Crow2013-07-31-1/+1
| | | | f89e2c3d5cee5e3bf2bd2227254fa0edb09aeb53, as there are lots of translations for this already, and we'll probably be re-introducing it with more features around tagging.
* Remove unused line of codeLouise Crow2013-07-30-1/+0
|
* Handle the case of a name that hits the character limits and has been ↵Louise Crow2013-07-29-2/+2
| | | | suffixed with a number.
* Merge branch 'feature/localisation-fixes' into rails-3-developLouise Crow2013-07-29-2/+2
|\
| * Use FastGettext.locale, not I18n.locale as the latter will return hyphens, ↵Louise Crow2013-07-23-1/+1
| | | | | | | | not underscores as we use in our URLs.
| * gettext_i18n_rails patches I18n.locale= so that it changes underscores in ↵Louise Crow2013-07-18-1/+1
| | | | | | | | locale names (as used in the gettext world) to the dashes that I18n prefers. So for locales that include an underscore the equality test was returning false. Use FastGettext.locale instead to be consistent. Fixes #998.
* | Prevent erroneous internal error messages with multibyte characters under ↵Louise Crow2013-07-25-2/+2
| | | | | | | | ruby 1.8 by using mb_chars for length comparison - it counts multibyte characters.
* | Merge branch 'feature/similar-fixes' into rails-3-developLouise Crow2013-07-23-9/+14
|\ \
| * | Change concatenated header and title strings to full, properly escaped ↵Louise Crow2013-07-22-8/+13
| | | | | | | | | | | | strings that are available for translation. Fixes #1003.
| * | Supply correct parameter for similar requests page. Fixes #1002.Louise Crow2013-07-22-1/+1
| |/
* | Merge remote-tracking branch ↵Louise Crow2013-07-23-11/+11
|\ \ | | | | | | | | | | | | | | | | | | 'openaustralia_github/tests_set_described_state' into rails-3-develop Conflicts: spec/models/info_request_spec.rb
| * | Now record a state_update event *whenever* a user classifies a requestMatthew Landauer2013-04-20-10/+10
| | |
| * | How we would handle event states if we added a state_update event whenever a ↵Matthew Landauer2013-04-20-1/+1
| | | | | | | | | | | | user classifies a request
| * | Simple solution to bugs shown up in tests in last 2 commitsMatthew Landauer2013-04-18-1/+1
| | |
* | | Merge remote-tracking branch 'origin/721-defunct-tag' into rails-3-developLouise Crow2013-07-23-21/+32
|\ \ \ | |_|/ |/| |
| * | Say Defunct instead of Make your own request in listings.Matthew Somerville2013-07-17-2/+8
| | | | | | | | | | | | Also don't show 'Make your own request' unless it's requestable.
| * | Always show defunct message, whether body has notes or not (for #721).Matthew Somerville2013-07-17-19/+24
| | |
* | | Syntax fix - we don't want to output the final value of the iterator.Louise Crow2013-07-18-1/+1
|/ /