aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
Commit message (Collapse)AuthorAgeLines
* Reword View Requests to Browse Requests in navGareth Rees2014-08-21-1/+1
| | | | | | | User testing highlighted that it was easy to mistake "View Requests" for a Facebook-style wall rather than the list of all requests. [1] [1] https://github.com/mysociety/alaveteli/issues/1505
* Rename XXX comments with TODO:Gareth Rees2014-06-10-4/+4
| | | | Picks these up in `rake notes` and adds semantic meaning
* Fix operator precedenceLouise Crow2014-06-02-1/+1
| | | | | Was switched to && for style but in fact for control flow, and is what we want.
* Redirect to the frontpage rather than error on invalid paramsLouise Crow2014-06-02-0/+6
| | | | Fixes #1448.
* Update gubbins to call AttachmentToHTMLGareth Rees2014-04-07-13/+8
|
* Use AttachmentToHTML to generate FoiAttachment#body_as_htmlGareth Rees2014-03-28-8/+12
|
* Correctly call helpers in RequestController#describe_stateGareth Rees2014-03-13-2/+2
| | | | | | Calling simple_date threw an exception as it uses a helper internally. Only LinkToHelper is included in to the controller, so the underlying helper was not available.
* Merge branch 'feature/batch-requests' into rails-3-developLouise Crow2014-01-29-88/+196
|\ | | | | | | | | | | 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-14/+4
| |
| * 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-1/+1
| | | | | | | | | | 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/+0
| |
| * 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-2/+2
| | | | | | | | | | They're not finding by the existing object, they're finding an existing object.
| * Simple code for the happy pathLouise Crow2013-12-04-19/+21
| | | | | | | | | | 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
| |
* | Merge branch 'feature/cache-request-lists' into rails-3-developLouise Crow2014-01-28-7/+5
|\ \
| * | 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-1/+1
| |/ | | | | | | | | | | | | | | | | | | 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.
* / 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.
* Merge remote-tracking branch 'origin/merged-rails-3-2-assset-pipeline' into ↵Louise Crow2013-11-29-2/+3
|\ | | | | | | | | | | | | rails-3-develop Conflicts: Gemfile.lock
| * Don't specify format in template name.Louise Crow2013-11-12-2/+3
| | | | | | | | | | In render calls, that's now deprecated in favour of using the :formats option.
* | Cache the similar requests for 1 dayLouise Crow2013-11-25-0/+7
| |
* | Move getting similar requests to the InfoRequest model.Louise Crow2013-11-25-9/+0
|/
* Revert "No need to set permissions on file now."Louise Crow2013-09-19-0/+1
| | | | | | In fact, we do still need to set permissions. This reverts commit 56ce526acdcb1b5493bc11f14b751b5c3f02f686.
* Remove extra "is invalid" message.Louise Crow2013-09-18-1/+1
| | | | Fixes #1101.
* Merge branch 'feature/hide-individual-responses' into rails-3-developLouise Crow2013-09-17-67/+92
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Gemfile app/views/admin_request/edit_outgoing.html.erb config/packages doc/CHANGES.md doc/INSTALL.md spec/models/info_request_spec.rb spec/models/public_body_spec.rb
| * Use 403, not 410, for hidden items.Louise Crow2013-09-16-2/+2
| | | | | | | | | | As @mhl points out, this more clearly indicates that they may come back at some point.
| * No need to set permissions on file now.Louise Crow2013-09-16-1/+0
| | | | | | | | | | Either rails or the webserver will be sending it, we're not redirecting anymore.
| * Add message index to attachment filesLouise Crow2013-09-16-1/+3
| | | | | | | | | | So that files attached to different messages with the same name and url_part don't get overwritten.
| * Add public criteria for message event access methodsLouise Crow2013-09-16-1/+1
| | | | | | | | | | | | | | get_last_response_event and get_last_outgoing_event are used in various places to determine which events to link to, use in queries etc. Restrict them to refer to the last publicly visible event of the relevant type, and rename them to make that clear.
| * Shorter way of getting text template.Louise Crow2013-09-16-1/+1
| |
| * Move some download methods to InfoRequest.Louise Crow2013-09-16-10/+6
| | | | | | | | | | | | Use send_file to send zips. Also adds 'all_can_view_all_correspondence?' - is this request completely cachable, or do we need to cache different versions for different levels of privilege?
| * Restore the download for hidden requestsLouise Crow2013-09-16-4/+4
| | | | | | | | | | | | This was disabled for hidden requests as the download was by redirect, allowing people who have not been authenticated to conceivably access the download. We'll be moving to send_file instead, so can restore it.
| * Make sure that info_request gets assigned to the viewLouise Crow2013-09-16-2/+2
| | | | | | | | | | | | This should be handled by assign_variables_for_show_template. Otherwise, the make_request_summary_file method shouldn't depend on instance variables