aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* Add a rudimentary view for an info request batch.Louise Crow2013-12-04-2/+46
|
* Notices for success and errors.Louise Crow2013-12-04-23/+62
|
* Add check for double submission.Louise Crow2013-12-04-5/+95
|
* Make method names for finding existing objects clearerLouise Crow2013-12-04-12/+12
| | | | | They're not finding by the existing object, they're finding an existing object.
* Simple code for the happy pathLouise Crow2013-12-04-19/+52
| | | | | Create the batch and associate new requests with it, send the outgoing messages, and redirect to a page for the new batch.
* Use two bodies in specs.Louise Crow2013-12-04-3/+5
|
* Add InfoRequestBatch model.Louise Crow2013-12-04-0/+74
| | | | | Re-annotate models. Index InfoRequestBatches by user - we'll display the batches for a user when they view their own requests.
* Remove extra 'is invalid' error message.Louise Crow2013-12-04-2/+4
| | | | | | This duplicates what's done in the new action, but I can't currently think of a way of sharing functionality that doesn't seem overly complex and/or risky.
* Handle a banned user making batch requests.Louise Crow2013-12-04-1/+20
|
* Factor out common params for clarity.Louise Crow2013-12-04-18/+11
|
* Batch users don't have a daily limit.Louise Crow2013-12-04-2/+11
| | | | | | | It doesn't make logical sense that they would. However I am preserving the ability to make batch requests as a separate thing from not having a daily limit - I think batch sending requires a (perhaps marginally) bigger level of trust.
* Add some specs for existing exceeded_limit? behaviourLouise Crow2013-12-04-0/+24
|
* Pass public bodies list through forms.Louise Crow2013-12-04-3/+14
|
* Require at least one public body in the params.Louise Crow2013-12-04-5/+13
|
* Create template and outgoing messageLouise Crow2013-12-04-23/+102
| | | | | Add validation, preview as in single request creation. Add comments noting further work to be done in this action.
* Isolate code for preparing to display the compose interface.Louise Crow2013-12-04-51/+67
| | | | Reuse it for the batch request page.
* Create a placeholder salutation for a batch request template.Louise Crow2013-12-04-3/+17
|
* Handle the application of censor rules to a batch request template.Louise Crow2013-12-04-1/+10
|
* Add a batch_request_template flagLouise Crow2013-12-04-1/+19
| | | | | | A virtual attribute to use to customise some info request behaviours when we are using one request as a template for creating multiple requests.
* Add new_batch actionLouise Crow2013-12-04-72/+159
| | | | | | Give it basic access control, and add some conditionals to the 'new' template around bits that use @info_request.public_body so that they render something different if @batch is assigned.
* Add template for select_authoritiesLouise Crow2013-12-04-3/+145
| | | | Should retain a list of selected public bodies across searches.
* Handle not enabled, no user, unauthorised user.Louise Crow2013-12-04-15/+77
|
* Add a link to the select_authorities page.Louise Crow2013-12-04-0/+7
| | | | | Contingent on batch requests being allowed, and the session user being allowed to make them.
* Add a select_authorities action.Louise Crow2013-12-04-0/+13
|
* Add new config param - ALLOW_BATCH_REQUESTSLouise Crow2013-12-04-0/+7
|
* Add a can_make_batch_requests flag to user modelLouise Crow2013-12-04-2/+37
| | | | Make it updatable via the user admin page.
* Set enforce_available_locales to false.Louise Crow2013-12-04-0/+1
| | | | | This was the previous behaviour. Setting it explicitly avoids a deprecation warning.
* Upgrade Rails to 3.2.16 to get fixes for CVE-2013-6414, CVE-2013-4491, ↵Louise Crow2013-12-04-29/+29
| | | | CVE-2013-6417, CVE-2013-6415.
* Merge branch 'rails-3-develop' of ↵Louise Crow2013-12-03-9/+19
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Merge branch 'theme-install-fixes' into rails-3-developMark Longair2013-12-03-9/+19
| |\ | | | | | | | | | | | | Conflicts: script/rails-post-deploy
| | * Try to uninstall the old theme from vendor/plugins and lib/themesMark Longair2013-12-03-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The theme install task would fail if there's an old theme present in vendor/plugins, since it doesn't try to uninstall the plugin from that location, only the new location. Then when the install.rb in the new plugin runs, it'll complain that there's a public/alavetelitheme symlink already present. This commit changes themes:install to try to uninstall the plugin from both locations.
| | * Precompile assets only for production.Louise Crow2013-12-03-1/+4
| | | | | | | | | | | | | | | Conflicts: script/rails-post-deploy
| | * Ensure that the lib/themes directory exists before installing to thereMark Longair2013-12-03-0/+1
| | | | | | | | | | | | | | | | | | (An alternative would have been to add an empty lib/themes/.gitkeep file to this directory, but that makes ignoring the installed themes more complicated.)
* | | Merge branch 'feature/1201-close-attachment-files-after-read' into ↵Louise Crow2013-12-03-2/+1
|\ \ \ | |/ / |/| | | | | rails-3-develop
| * | Use a block to automatically close file.Louise Crow2013-11-12-1/+1
| | |
* | | Only precompile assets on non-staging sites.Louise Crow2013-12-03-0/+3
| | |
* | | Ignore db/structure.sqlLouise Crow2013-12-03-0/+1
| |/ |/| | | | | Rails 3.2 uses structure.sql for schema dumps
* | Merge branch 'move-plugins-out-of-vendor-plugins' into rails-3-developMark Longair2013-12-03-42/+57
|\ \
| * | Revert "Silence deprecation warnings."Mark Longair2013-12-03-3/+0
| | | | | | | | | | | | This reverts commit 084cc9574c254cc0af2de4cd615fa99a5be8bc83.
| * | Move themes from vendor/plugins to lib/themesMark Longair2013-12-03-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are essentially required in exactly the same way as before, but from lib/themes rather than vendor/plugins. This is the simplest possible change in order make the themes work outside vendor/plugins, I think, but it's not necessarily ideal. It would be worth considering whether these should be changed to Rails engines, as described here: http://guides.rubyonrails.org/engines.html
| * | Update the acts_as_xapian generator to work under Rails 3Mark Longair2013-11-29-11/+8
| | |
| * | Move the acts_as_xapian generator into lib/generatorsMark Longair2013-11-29-0/+0
| | |
| * | Move acts_as_xapian out of vendor/pluginsMark Longair2013-11-29-14/+31
| | | | | | | | | | | | | | | This includes making making sure that xapiandbs directory is moved with this version of the code.
| * | Move has_tag_string out of vendor/pluginsMark Longair2013-11-29-2/+3
| | |
| * | Move strip_attributes out of vendor/pluginsMark Longair2013-11-29-3/+3
| | |
* | | Add timestamps to public_body_translation fixtures.Louise Crow2013-11-29-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Between rails 3.2.0 and 4.0.1rc4, timestamps were constrained to be non-null. As globalize creates the public_body_translation table with timestamps, this means there are errors in the tests when trying to insert the fixture data, which doesn't have timestamps. These errors were only appearing on Travis because locally the test database is cloned from the development structure rather than being created by running the migrations.
* | | Merge remote-tracking branch 'origin/merged-rails-3-2-assset-pipeline' into ↵Louise Crow2013-11-29-2027/+482
|\| | | | | | | | | | | | | | | | | | | | rails-3-develop Conflicts: Gemfile.lock
| * | With Rails 3.2, switching theme requires asset recompilationMark Longair2013-11-29-1/+5
| | |
| * | Merge branch 'feature/rails-3-2-upgrade-spike' into ↵Mark Longair2013-11-29-283/+157
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feature/switch-to-asset-pipeline Conflicts: Gemfile.lock app/assets/images/admin-theme/ui-bg_flat_0_aaaaaa_40x100.png app/assets/images/admin-theme/ui-bg_flat_55_fbf9ee_40x100.png app/assets/images/admin-theme/ui-bg_flat_65_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_cccccc_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_dadada_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_e6e6e6_40x100.png app/assets/images/admin-theme/ui-bg_flat_75_ffffff_40x100.png app/assets/images/admin-theme/ui-bg_inset-soft_95_fef1ec_1x100.png app/assets/images/admin-theme/ui-icons_222222_256x240.png app/assets/images/admin-theme/ui-icons_2e83ff_256x240.png app/assets/images/admin-theme/ui-icons_454545_256x240.png app/assets/images/admin-theme/ui-icons_888888_256x240.png app/assets/images/admin-theme/ui-icons_cd0a0a_256x240.png app/assets/javascripts/admin.js app/assets/javascripts/admin/jquery-ui.min.js app/assets/javascripts/application.js app/assets/javascripts/jquery-ui.min.js app/assets/javascripts/jquery.flot.errorbars.min.js app/assets/javascripts/jquery.flot.min.js app/assets/javascripts/stats.js app/assets/stylesheets/application.css app/assets/stylesheets/fonts.scss app/views/general/_stylesheet_includes.html.erb app/views/layouts/admin.html.erb app/views/layouts/default.html.erb app/views/public_body/statistics.html.erb config/application.rb config/environments/development.rb
| | * | Add a dummy exception notification address for testingLouise Crow2013-11-12-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | ActionMailer now checks for a 'to' address on sending mail, so supply one so that we can check exception notification mail sending. Also check that we have one before trying to call the exception notification code.