aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Don't display duplicate public bodies with the fallbackMark Longair2013-09-12-30/+110
| | | | | | | | | | | This introduces some raw SQL statement for the fallback case, but we can't see an easy way to avoid that in this case. This commit also adds some tests that assert the sorting and non-duplication properties of the listing. Thanks to Louise Crow for working out the SQL expression for falling back to the default locale.
* Factor out the code to generate example single language public bodiesMark Longair2013-09-10-16/+23
| | | | | It's useful to be able to generate example public bodies that only have translations in particular languages.
* Add tests to assert the new public body listing behaviourMark Longair2013-09-10-0/+14
| | | | | | These tests will fail unless we have the new behaviour for public body listing, which depend on the setting of PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE.
* Fix locales used to find public bodies in AdminPublicBodyControllerMark Longair2013-09-10-2/+3
| | | | | | | | | The locale returned from locale_from_params may be dash-separated, (the I18n module convention) whereas those in the public_body_translations table are underscore-separated. The AdminPublicBodyController was looking for dash-separated locales in that table, so ensure that dashes are substituted for underscores before using them in a query.
* Make falling back to default locale in public body listings optionalMark Longair2013-09-10-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | As the code stood, the list method in PublicBodyController would only return results that had translations of the public body in the default locale. This has a variety of problems if you're viewing pages in the non-default locale - for example, the "first letter" links wouldn't bring up the public bodies that began with that letter in the current locale, only those that began with it in the default locale. Ideally, every public body would be translated into every available locale for the site, but there are cases where deployers wish to have public body listings also include those from the default locale, in case there are untralsated public bodies: https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ This commit makes the default behaviour to look for public body listings only in the current locale, but if the new configuration option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public body listings will be looked for in both the current locale and the default locale. Fixes #1000
* Tidy up SQL query stringsMark Longair2013-08-29-14/+14
| | | | | | | | | | | | | | | In the list method of PublicBodyController, capitalize the SQL keywords consistenly and don't include extraneous whitespace in the strings. (On the former point, previously only some were - the convention is a matter of some debate, but in this case the you editor's not doing to do syntax highlighting of SQL so having the keywords capitalized helps its readibility, I think.) I wouldn't normally do this kind of cosmetic tidying up, since it affects the tidiness of diffs and merges, but in this case I'm going to change all these lines in the next commit anyway, so that reasoning doesn't apply.
* Ignore db/development_structure.sqlLouise Crow2013-08-22-0/+1
| | | | We're not checking it in any more.
* Merge branch 'feature/restore-unobtrusive-js' into rails-3-developLouise Crow2013-08-22-9268/+400
|\
| * Merge branch 'feature/restore-unobtrusive-js' of ↵Louise Crow2013-08-22-0/+0
| |\ | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into feature/restore-unobtrusive-js
| | * Include unobtrusive js in the admin layout, where we use the :confirm option ↵Louise Crow2013-08-12-1/+1
| | | | | | | | | | | | of the submit_tag helper. Fixes #1042.
| | * Add unobtrusive javascript gem to provide the js side of Rails built-in ↵Louise Crow2013-08-12-0/+398
| | | | | | | | | | | | helpers using the jquery framework rather than prototype.
| | * Remove prototype javascript files. We don't seem to be using them, we seem ↵Louise Crow2013-08-12-9265/+0
| | | | | | | | | | | | to be using jquery.
| * | 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.
| * | Add unobtrusive javascript gem.Louise Crow2013-08-22-0/+398
| | | | | | | | | | | | | | | This is to provide the js side of Rails built-in helpers using the jquery framework rather than prototype.
| * | Remove prototype javascript files.Louise Crow2013-08-22-9265/+0
| |/ | | | | | | We don't seem to be using them, we seem to be using jquery.
* | Merge branch 'release/0.13' into rails-3-developLouise Crow2013-08-20-11/+34
|\ \
| * | Mark all events for the fixed requests as needing a reindex.release/0.13Louise Crow2013-08-20-9/+16
| | |
| * | Handle case of nil user_idLouise Crow2013-08-20-1/+1
| | | | | | | | | | | | When status was updated by a script.
| * | Release notes for 0.13Louise Crow2013-08-15-0/+16
| | |
| * | Bump application version.Louise Crow2013-08-15-1/+1
| | |
| * | Merge branch 'rails-3-develop' into release/0.13Louise Crow2013-08-15-36/+151
| |\ \
| * \ \ Merge branch 'rails-3-develop' into release/0.13Louise Crow2013-08-12-2153/+36
| |\ \ \
* | \ \ \ 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
* | | | | | Add libxml2-dev and libxslt-devLouise Crow2013-08-19-0/+2
| |_|_|/ / |/| | | | | | | | | | | | | | They are depended on by nokogiri, depended on in turn by webrat.
* | | | | Merge branch 'feature/further-request-event-fixes' into rails-3-developLouise Crow2013-08-15-14/+126
|\ \ \ \ \
| * | | | | 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.
| * | | | | Add task for cleaning up bad request histories.Louise Crow2013-08-15-0/+30
| | | | | |
| * | | | | Set the calculated state on external requests.Louise Crow2013-08-15-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-7/+45
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | The mysociety debian repo only has 64-bit packagesGanesh Sittampalam2013-08-14-1/+1
| | | | |
* | | | | Run migrations before trying to install themeIan Chard2013-08-14-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: script/rails-post-deploy
* | | | | Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-1/+2
| | | | |
* | | | | add wheezy package names as alternates for rdoc and irbIan Chard2013-08-14-2/+2
| | | | |
* | | | | Update tests for changes to fixture file.Louise Crow2013-08-14-14/+18
| | | | |
* | | | | Fix for #566. Also fix wrong identifier being used in text.Louise Crow2013-08-13-1/+1
| |_|/ / |/| | |
* | | | Clean up paths to be a bit less OS dependent.Louise Crow2013-08-12-6/+4
| |_|/ |/| |
* | | Merge remote-tracking branch ↵Louise Crow2013-08-12-51/+1
|\ \ \ | |_|/ |/| | | | | 'openaustralia_github/upgrade-rvmrc-to-ruby-version' into rails-3-develop
| * | Switch from .rvmrc to .ruby-versionHenare Degan2013-08-10-51/+1
|/ / | | | | | | ruby-version is cross compatible with other Ruby version managers
* | Removing db/development_structure.sql from version control. Because ↵Louise Crow2013-08-08-2095/+0
| | | | | | | | different versions of postgres are producing minor variations every time this is generated, it's proving more of a hindrance than a help to development. Happy to reinstate it if anyone has suggestions about how to keep it stable across minor postgres version differences.
* | Merge branch 'feature/check-submodules' into rails-3-developLouise Crow2013-08-08-0/+30
|\ \
| * | Only check commonlib, don't try to split the response into segments (as @mhl ↵Louise Crow2013-08-08-7/+8
| | | | | | | | | | | | points out, the case where the initial character is a space is somewhat confusing), just grab the first character of the whole string and check it against expected values.
| * | Call it an error, not a warning.Louise Crow2013-07-30-4/+4
| | |
| * | Get first character in a way that will work in Ruby 1.8 and 1.9Louise Crow2013-07-30-1/+1
| | |
| * | Add a rake task to print a warning if the state of a submodule is not what ↵Louise Crow2013-07-30-0/+29
| | | | | | | | | | | | we expect it to be.
* | | Update for Rails 3 - script/server is deprecated.Louise Crow2013-08-07-1/+1
| |/ |/|
* | Translations with new strings.Louise Crow2013-08-05-81/+384
| |