aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
Commit message (Collapse)AuthorAgeLines
* Controller code to hide/unhide annotationsAndrew Black2014-03-25-0/+6
| | | | The UI provides a list of comment_ids and a newstate="visible" or "hide"
* Merge branch 'rails-3-develop' of ↵Louise Crow2014-03-13-26/+41
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Use filter to reject if user is bannedGareth Rees2014-03-13-7/+9
| | | | | | | | | | | | | | | | | | Extract checking whether a user is banned from making Comments on an InfoRequest to a filter in CommentController. Removes responsibility from the #new method. Adds a missing spec.
| * Use filter to reject unless comments allowedGareth Rees2014-03-13-9/+11
| | | | | | | | | | | | | | Extract checking whether comments are allowed on an InfoRequest to a filter in CommentController. Removes responsibility from the #new method.
| * Extract create_track_thing from CommentControllerGareth Rees2014-03-13-1/+5
| | | | | | | | | | Use a before_filter to make @track_thing available to all filters called on the same action and remove responsibility from the #new method
| * Extract find_info_request from CommentControllerGareth Rees2014-03-13-12/+17
| | | | | | | | | | Use a before_filter to make @info_request available to all filters called on the same action
| * Graceful failure of new_comment routeGareth Rees2014-03-13-4/+6
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/mysociety/alaveteli/issues/662 If /annotate/request/:url_title is accessed when comments are disabled an exception is incorrectly thrown. Conditionals should be used for control flow, so now the action redirects to the info_request path and displays a notice.
* | Merge branch 'feature/1345-other-country-fallback' into rails-3-developLouise Crow2014-03-13-2/+9
|\ \ | |/ |/|
| * Handle the case where the current locale isn't in site listLouise Crow2014-03-13-2/+9
| | | | | | | | | | | | We only really want to redirect people to live sites, so pre-launch sites don't belong in WorldFOIWebsites. Handle the case where the current locale isn't there. Closes #1345.
* | 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-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