aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
Commit message (Collapse)AuthorAgeLines
* Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-93/+221
|\ | | | | | | | | | | Conflicts: config/general.yml-example spec/factories.rb
| * Preserve whitespace in strings for translation.Louise Crow2014-01-28-1/+1
| | | | | | | | | | Otherwise they get marked as fuzzy in .po files and lose their existing translations.
| * Update notices for offline sending.Louise Crow2013-12-04-16/+11
| |
| * Display batch requests for user on 'my requests' pageLouise Crow2013-12-04-0/+3
| | | | | | | | This is the most rudimentary possible way to give them access to the batch request urls, pending #1239
| * Split the creation of a batch and the associated requests.Louise Crow2013-12-04-5/+6
| | | | | | | | We're going to want to actually create and send the requests later.
| * Add list of bodies batch request will be sent to.Louise Crow2013-12-04-0/+6
| |
| * Javascript enhancements.Louise Crow2013-12-04-6/+18
| | | | | | | | Add or remove all buttons, ajax search as you type.
| * Raise limit on results to 1000.Louise Crow2013-12-04-3/+3
| | | | | | | | | | Seems like you have to specify a limit with xapian. We'll probably want to document the limit somewhere on this page.
| * Move creation of batch to InfoRequestBatch.Louise Crow2013-12-04-21/+7
| |
| * Add a rudimentary view for an info request batch.Louise Crow2013-12-04-2/+4
| |
| * Notices for success and errors.Louise Crow2013-12-04-7/+28
| |
| * Add check for double submission.Louise Crow2013-12-04-5/+8
| |
| * Make method names for finding existing objects clearerLouise Crow2013-12-04-5/+5
| | | | | | | | | | They're not finding by the existing object, they're finding an existing object.
| * Simple code for the happy pathLouise Crow2013-12-04-19/+28
| | | | | | | | | | Create the batch and associate new requests with it, send the outgoing messages, and redirect to a page for the new batch.
| * 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/+5
| |
| * Batch users don't have a daily limit.Louise Crow2013-12-04-2/+1
| | | | | | | | | | | | | | 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.
| * Pass public bodies list through forms.Louise Crow2013-12-04-1/+0
| |
| * Require at least one public body in the params.Louise Crow2013-12-04-3/+3
| |
| * Create template and outgoing messageLouise Crow2013-12-04-18/+60
| | | | | | | | | | 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.
| * Add new_batch actionLouise Crow2013-12-04-15/+23
| | | | | | | | | | | | 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-0/+11
| | | | | | | | Should retain a list of selected public bodies across searches.
| * Handle not enabled, no user, unauthorised user.Louise Crow2013-12-04-12/+17
| |
| * Add a select_authorities action.Louise Crow2013-12-04-0/+3
| |
| * Add a can_make_batch_requests flag to user modelLouise Crow2013-12-04-0/+1
| | | | | | | | Make it updatable via the user admin page.
* | Merge branch 'hotfix/0.16.0.6' into rails-3-developLouise Crow2014-01-28-1/+4
|\ \
| * | Handle a request with no user in the show request function0.16.0.5hotfix/0.16.0.5Louise Crow2014-01-28-1/+4
| | |
* | | Merge branch 'feature/1176-automate-authority-contacts' into rails-3-developLouise Crow2014-01-28-9/+92
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: doc/CHANGES.md
| * | | Add form for closing change request without actionLouise Crow2014-01-13-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | For cases where we don't want to make the change suggested. There doesn't seem to be any obvious default text to use in the response to the person who requested the change.
| * | | Populate admin public body forms based on a change request.Louise Crow2014-01-13-3/+39
| | | | | | | | | | | | | | | | | | | | Also add editable text for an email to be sent to the person requesting the change.
| * | | Allow from_admin_message to take a name and email.Louise Crow2014-01-13-1/+2
| | | | | | | | | | | | | | | | | | | | Previously it accepted a user, but for this usage we won't necessarily have one.
| * | | Add change requests to the 'Things to do' listLouise Crow2014-01-13-0/+2
| | | |
| * | | Clean up admin indexLouise Crow2014-01-13-5/+6
| | | | | | | | | | | | | | | | Refactor a bit so it's easier to read.
| * | | Form and models for asking for a public body change.Louise Crow2014-01-13-0/+28
| | | |
* | | | Merge branch 'feature/cache-request-lists' into rails-3-developLouise Crow2014-01-28-103/+7
|\ \ \ \
| * | | | Cache frequently accessed request lists.Louise Crow2013-12-19-7/+5
| | | | | | | | | | | | | | | | | | | | Make specs a bit more focused, remove view specs - they're not relevant to the new code in their current form and don't seem to merit updating.
| * | | | Move make_query_from_params to XapianQueriesLouise Crow2013-12-19-97/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is involved with the construction of meaningful xapian queries with respect to InfoRequestEvents. This commit also removes the get_tags_from_params method, which presumably was targeted at PublicBodies, but doesn't seem to actually be used anywhere. XapianQueries is used to extend InfoRequestEvent in order to prevent InfoRequestEvent becoming too unwieldy and to preserve the association between these methods.
* | | | Merge branch 'release/0.16' into rails-3-developLouise Crow2014-01-14-3/+0
|\ \ \ \ | | |/ / | |/| |
| * | | Merge branch 'feature/cleanup-popups' into release/0.16Louise Crow2014-01-14-3/+0
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile.lock app/views/layouts/default.html.erb config/application.rb public/admin/stylesheets/admin.css
| | * | Cleanup popup notices.Louise Crow2014-01-14-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | localisation bug fixed in request_controllerGyörgy Peng2014-01-08-1/+1
| | | | | | | | | | | | It is a better solution to forma sentenses in po file, therefore the substring in variable added to _() as a parameter.
* | | | Standardise explanation generation by using render_to_stringLouise Crow2013-12-18-9/+7
|/ / /
* | | Merge branch 'feature/display-social-media-when-configured' into rails-3-developLouise Crow2013-12-09-0/+4
|\ \ \
| * | | Only show the blog if a BLOG_FEED is configured.Louise Crow2013-12-09-0/+4
| | |/ | |/|
* / | Fix the command-line CSV importer under Ruby 1.9Mark Longair2013-12-03-0/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Ruby 1.8.7, you can parse a CSV file with the following code (Example A): require 'csv' CSV.parse('foo.csv') do |row| puts "got row: #{row.inspect}" end Rather confusingly, under Ruby 1.8.7, CSV.parse can also take a string representation of the contents of the file as its parameter, so this also works (Example B): require 'csv' CSV.parse("1,hello,red\n2,goodbye,green") do |row| puts "got row: #{row.inspect}" end However under Ruby 1.9.3, CSV.parse only expects a string representation of the contents of the CSV file, so only Example B works; Example B fails silently (interpreting the filename as a single cell CSV file, typically). The import:import_csv rake task unfortunately relied on both A and B working. This commit fixes this by adding PublicBody.import_csv_from_file, and refactoring PublicBody.import_csv to use the newly added class method, and adds a test to check for any regression in this behaviour. (This means that the usage of import_csv in the admin public body controller's import_csv action could now be changed to use PublicBody.import_csv_from_file directly from the uploaded file, which would be more efficient and cope with larger files without using lots of memory.) Fixes #1229
* | Merge remote-tracking branch 'origin/merged-rails-3-2-assset-pipeline' into ↵Louise Crow2013-11-29-5/+11
|\ \ | |/ |/| | | | | | | | | rails-3-develop Conflicts: Gemfile.lock
| * Merge branch 'feature/rails-3-2-upgrade-spike' into ↵Mark Longair2013-11-29-5/+11
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+3
| | | | | | | | | | | | | | | | | | 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.
| | * Don't specify format in template name.Louise Crow2013-11-12-4/+8
| | | | | | | | | | | | | | | In render calls, that's now deprecated in favour of using the :formats option.