aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
Commit message (Collapse)AuthorAgeLines
* Extract logic from controllerGareth Rees2015-05-07-13/+6
|
* Merge branch 'add-widget' into rails-3-developLouise Crow2015-04-28-2/+63
|\
| * Use a boolean operator - 'and' and 'or' are for control flow.Louise Crow2015-04-28-1/+1
| |
| * Use || - 'and' and 'or' are for control flow, not logical operatorsLouise Crow2015-04-28-1/+1
| |
| * Move existing track logic to controllerLouise Crow2015-04-28-0/+4
| |
| * Move vote calculation to controller.Louise Crow2015-04-28-0/+1
| |
| * Clean up first_or_create call.Louise Crow2015-04-28-1/+3
| |
| * Don't show the widget pages for requests without normal prominence.Louise Crow2015-04-28-1/+7
| |
| * Don't set 'same origin' policy for widget iframes.Louise Crow2015-04-27-0/+1
| | | | | | | | | | Whilst this is a good security precaution in general, we want people to display these widgets in iframes on other sites.
| * Allow widgets to be controlled with a feature flag.Louise Crow2015-04-27-1/+7
| |
| * Use resource-based RESTful routing and separate controllerLouise Crow2015-04-27-28/+43
| |
| * Add some specs for the vote tracking action.Louise Crow2015-04-27-3/+3
| |
| * Add controller for non-logged in "voting"Jody McIntyre2015-04-27-1/+9
| |
| * Send widget_vote cookie when user not logged inJody McIntyre2015-04-27-0/+4
| |
| * Add widget for info requestsJody McIntyre2015-04-23-0/+14
| |
* | Merge branch 'hotfix/0.21.0.23' into rails-3-developGareth Rees2015-04-27-1/+2
|\ \
| * | Reduce N+1 queries in RequestGameController#playGareth Rees2015-04-27-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminates the following Bullet warnings: 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:public_body] Add to your finder: :includes => [:public_body] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:16:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call' 2015-04-21 11:42:26[WARN] /categorise/play N+1 Query detected user: vagrant InfoRequest => [:user] Add to your finder: :includes => [:user] N+1 Query method call stack /home/vagrant/alaveteli/app/views/request/_request_listing_single.html.erb:17:in `_app_views_request__request_listing_single_html_erb__949797960_70091194573720' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:46:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `each' /home/vagrant/alaveteli/app/views/request_game/play.html.erb:45:in `_app_views_request_game_play_html_erb___279307748_70091194720080' /home/vagrant/alaveteli/app/controllers/application_controller.rb:111:in `record_memory' /home/vagrant/alaveteli/lib/whatdotheyknow/strip_empty_sessions.rb:14:in `call'
* | | Merge remote-tracking branch 'openaustralia_github/email-missing-defunct' ↵Louise Crow2015-04-24-2/+1
|\ \ \ | |/ / |/| | | | | into rails-3-develop
| * | Don't include defunct authorities in list of missing emailsHenare Degan2015-04-21-1/+1
| | | | | | | | | | | | Fixes #2358
| * | Simplify queryHenare Degan2015-04-21-2/+1
| |/
* / Don't redirect to signin on expiration of a non remember-me sessionLouise Crow2015-04-23-1/+0
|/ | | | In practice, it's just confusing if you've been away from the site.
* Only use CSRF protection for logged-in users.Louise Crow2015-04-10-1/+12
|
* Limit the number of pages of requests shown for public bodies.Louise Crow2015-04-07-1/+9
| | | | Needs to be restored as part of https://github.com/mysociety/alaveteli/issues/2137.
* Merge branch 'add-frontpage-autodetect-feed' into rails-3-developLouise Crow2015-03-26-0/+5
|\
| * Add an autodetect feed for the frontpage list of requestsLouise Crow2015-03-19-0/+5
| | | | | | | | Closes Â#434.
* | Fix translating Public Body HeadingsGareth Rees2015-03-18-30/+33
| | | | | | | | | | Fixes submission of form containing both existing and new translations
* | Fix translating Public Body CategoriesGareth Rees2015-03-18-18/+26
| |
* | Fix translating Public BodiesGareth Rees2015-03-18-8/+4
|/
* WIP commit of public body page redesignMartin Wright2015-03-02-0/+3
|
* Merge branch 'rails-3-develop' of ↵Louise Crow2015-02-24-0/+12
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Fully prevent banned users editing their photoGareth Rees2015-02-24-0/+6
| |
| * Add specs to AboutMeValidatorGareth Rees2015-02-24-0/+6
| |
* | Allow custom states to be tested.Louise Crow2015-02-09-5/+3
|/ | | | | | Since https://github.com/mysociety/alaveteli/commit/80ad2d4c31075ffc994e8c48ea25e6e3c486c364 no themes have been loaded by tests unless explicitly specified, so I think it's safe to remove the code added in https://github.com/mysociety/alaveteli/commit/3dfc53f6b82b3c5da79a4c710d45b859f61f4f5f
* Merge branch 'hotfix/0.20.0.7' into rails-3-developLouise Crow2015-02-05-4/+13
|\ | | | | | | | | Conflicts: config/initializers/alaveteli.rb
| * Remove unused variableLouise Crow2015-02-03-4/+1
| |
| * Do not allow requests for search results after the first 500Louise Crow2015-02-03-0/+12
| | | | | | | | | | | | | | The pages for these search results are extremely slow to load. This is not an ideal solution by any means. Really we want to dig into why high offsets are so slow, and whether there's anything we can do to fix that.
* | Merge branch 'hotfix/0.20.0.6' into rails-3-developLouise Crow2015-02-05-0/+10
|\ \ | | | | | | | | | | | | Conflicts: spec/models/public_body_spec.rb
| * | Build available locales in the controllerGareth Rees2015-02-03-0/+10
| |/ | | | | | | | | Removes logic from views and obsoletes AdminPublicBodyHelper#public_body_form_object
* | Merge branch '2051-back-to-search' into rails-3-developGareth Rees2015-01-13-0/+6
|\ \
| * | Add a “Back to search results” linkGareth Rees2015-01-13-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store the search parameters in the flash when a search is made via the select_authority_path page. Stores the parameters for both POST and AJAX typeahead searches. The presence of stored search params renders the link on the PublicBodyController#show template. “keep”s the search params in PublicBodyController#show so that if the user clicks the browser’s back button the “Back to search results” link can still be rendered on the next search result they click. “keep”s all flash keys in ServicesController#other_country_message as it’s called through AJAX and ends up sweeping the flash. [1] [1] More details about this: http://mikenaberezny.com/2007/09/08/keep-the-flash-and-test-it-too/
* | | Use a partial to render batch sent messageGareth Rees2015-01-13-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dropped the law_used_full interpolation: So I think there are two significant bits of context here. One is that the law_used_full attribute is derived from law_used, which in turn is set on InfoRequest initialisation based on the tags applied to the public body. So different requests in a batch could have different values for law_used_full - some of them might be to bodies that only accept environmental information requests. So using the value from the batch template is not really a good proxy for the whole collection. The second is that, in any case, the distinction between the two types of request is a UK-specific feature which should be moved to the UK theme (#2085). Given these two factors, I think the cleanest thing might be to drop law_used_full from this descriptive text, and just have it say "Your requests will be sent shortly", without specifying what law will be used. – Louise Crow (@crowbot)
* | | Use a partial to render request sent messageGareth Rees2015-01-13-7/+1
|/ /
* | Merge branch 'hotfix/0.20.0.2' into rails-3-developLouise Crow2015-01-07-3/+6
|\|
| * Sanitize the contents of HTML attachments before displayLouise Crow2014-12-22-0/+4
| |
| * Fix unvalidated redirectsGareth Rees2014-12-22-3/+3
| |
* | Fix bad merge in 92ba5052a21519af59c2aa904e1e28d9081179fbLouise Crow2014-12-19-51/+0
| |
* | Escape responder name before marking notice as safeLouise Crow2014-12-19-1/+52
| |
* | Merge branch 'brakeman_fixes' into rails-3-developLouise Crow2014-12-18-14/+11
|\ \
| * | Line lengthGareth Rees2014-12-18-1/+9
| | |
| * | Add global protect_from_forgeryGareth Rees2014-12-18-13/+2
| | | | | | | | | | | | | | | | | | | | | Grepping the git logs didn’t bring up a good reason for this to be excluded. Seems like it came along after the app was initially created so it never got fully added for fear of regressions. The specs pass for this commit.