aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* use fancybox-rails to provide fancyboxGareth Rees2014-04-07-413/+28
| | | | | | http://rubygems.org/gems/fancybox-rails Provides better asset pipeline integration.
* Merge branch 'issues/1406-render-exception-error' into rails-3-developGareth Rees2014-04-02-0/+17
|\
| * URL Encode the path parameter for render_exceptionGareth Rees2014-03-31-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a request is made and path is something like /%d3 we rescue this with a custom 404 template. This gets unescaped as {"path"=>"\323"}. In the case of a RouteNotFound, ApplicationController#render_exception renders the general/exception_caught template in to the default layout, which renders the general/_locale_switcher partial. This partial calls url_for – sending the full params hash as the argument – so that a user may return to the existing page in their chosen locale. The problem is that url_for tries to construct the url with the hash {:action=>"not_found", :controller=>"general", :path=>"\323"}. ApplicationController#sanitize_params re-encodes the path parameter so that it can be passed through to url_for without trouble.
* | Update to rack-ssl 1.3.4Louise Crow2014-04-01-1/+1
| |
* | Merge branch 'issues/1389-contact-form-honeypot' into rails-3-developGareth Rees2014-03-31-32/+124
|\ \
| * | Add honeypot spam protection to contact formGareth Rees2014-03-31-1/+32
| | | | | | | | | | | | | | | Intercepts the request and redirects to the homepage if the comment field is filled in on the contact form.
| * | Improve HelpControllerSpecGareth Rees2014-03-31-1/+5
| | | | | | | | | | | | | | | - Actually assert something when getting the pages - Use named route
| * | Tidy HelpControllerSpecGareth Rees2014-03-31-29/+41
| | |
| * | Add specs for ContactValidatorGareth Rees2014-03-26-2/+47
| | |
* | | Merge branch 'issues/1405-link-to-this-box' into rails-3-developGareth Rees2014-03-31-4/+5
|\ \ \ | |_|/ |/| |
| * | Improve positioning of link-to-this popupGareth Rees2014-03-28-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current positioning forces it to overlap the sidebar, which: - Looks messy due to the opacity - Covers potentially useful information - Puts the close icon further away if the box was opened in error This commit positions it to the left of the link-to-this anchor icon, which seems to conveniently fit in to the whitespace left by the signing off of the correspondence.
| * | Require jquery.ui.positionGareth Rees2014-03-28-0/+1
|/ / | | | | | | | | | | | | | | Fixes the link-to-this popup box rendering at the bottom left of the page. Introduced by f91d66d42f517f778cac130466b7cffc7fd8b085 as we rely on jQuery UI's position method http://api.jqueryui.com/position
* | Merge branch 'issues/1403-split-factories' into rails-3-developGareth Rees2014-03-27-193/+227
|\ \ | |/ |/|
| * Split factories in to individual filesGareth Rees2014-03-25-193/+227
|/ | | | | | | | | | | | Factories are loaded automatically from: - test/factories.rb - spec/factories.rb - test/factories/*.rb - spec/factories/*.rb Keeping factories per-model helps navigation, especially when they get more complex with traits and inheritance.
* Merge branch 'ab_annotations_1' into rails-3-developGareth Rees2014-03-25-41/+173
|\
| * Add AdminHelper#comment_visibilityGareth Rees2014-03-25-1/+27
| | | | | | | | Get the canonical human-readable status of a comment
| * Add specs for AdminUserController#modify_comment_visibilityGareth Rees2014-03-25-0/+86
| |
| * Add a form for changing annotation visibilityAndrew Black2014-03-25-41/+54
| |
| * Controller code to hide/unhide annotationsAndrew Black2014-03-25-0/+7
|/ | | | The UI provides a list of comment_ids and a newstate="visible" or "hide"
* Merge branch 'feature/1313-better-translation-markup' into rails-3-developLouise Crow2014-03-24-41/+115
|\
| * Refactor event description to make it easier to translate.Louise Crow2014-03-17-22/+97
| | | | | | | | Closes #1313 and #365.
| * Only pass InfoRequestEvent to _request_listing_via_event templateLouise Crow2014-03-17-20/+19
| | | | | | | | The InfoRequest is always the one associated with the event.
| * Remove redundant h() callsLouise Crow2014-03-13-3/+3
| | | | | | | | Text will be escaped by default in Rails 3
* | Merge remote-tracking branch 'openaustralia_github/admin-typo' into ↵Louise Crow2014-03-18-1/+1
|\ \ | | | | | | | | | rails-3-develop
| * | Fix typo on request admin pageHenare Degan2014-03-18-1/+1
|/ /
* | Add encoding lineLouise Crow2014-03-14-0/+1
| |
* | Rename spec files so they're run by rake spec.Louise Crow2014-03-13-0/+0
| |
* | Merge remote-tracking branch ↵Louise Crow2014-03-13-17/+15
|\ \ | | | | | | | | | 'opennewzealand_github/feature/handle-undefined-conversion' into rails-3-develop
| * | needs _spec.rb to be run by `rake spec`Rowan Crawford2014-03-01-0/+0
| | |
| * | Fix tests for basic encodingRowan Crawford2014-03-01-10/+10
| | |
| * | Remove unused variableRowan Crawford2014-03-01-2/+0
| | |
| * | Handle UndefinedConversionError when converting to utf-8Rowan Crawford2014-03-01-5/+5
| | | | | | | | | | | | | | | | | | From: http://ruby-doc.org/core-2.0/String.html#method-i-encode Ducktypes for having encode rather than relying on RUBY_VERSION
* | | Merge branch 'rails-3-develop' of ↵Louise Crow2014-03-13-35/+64
|\ \ \ | | | | | | | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * \ \ Merge branch 'issues/662' into rails-3-developGareth Rees2014-03-13-35/+64
| |\ \ \
| | * | | Use filter to reject if user is bannedGareth Rees2014-03-13-7/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'issues/1358' into rails-3-developGareth Rees2014-03-13-11/+92
|\ \ \ \
| * | | | Use :text format if using simple_date in .text.erbGareth Rees2014-03-13-4/+4
| | | | |
| * | | | 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.
| * | | | Add formatting options to LinkToHelper#simple_dateGareth Rees2014-03-13-5/+86
|/ / / /
* | | | Merge branch 'update_vagrantfile' into rails-3-developGareth Rees2014-03-13-26/+101
|\ \ \ \
| * | | | Add Vagrant alaveteli-themes shareGareth Rees2014-03-12-0/+9
| | | | |
| * | | | Improve Vagrantfile usage instructionsGareth Rees2014-03-12-7/+46
| | | | |
| * | | | Highlight Vagrantfile customisation optionsGareth Rees2014-03-11-1/+4
| | | | |
| * | | | Move Vagrantfile to repo rootGareth Rees2014-03-11-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a better workflow http://mysociety.github.io/installation-standards.html#silver # Host # Note that --recursive must be specified to include commonlib # submodule $ git clone --recursive git@github.com:mysociety/alaveteli.git $ cd alaveteli && vagrant up $ vagrant ssh # Guest $ cd /home/vagrant/alaveteli && bundle exec rake spec