aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | Use responsive stylesheets based on feature flag.Louise Crow2014-04-24-26/+1864
| | | | | |
| | * | | | Add foundation to the sass load pathsLouise Crow2014-04-24-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | So that we can import it from a subdirectory
| | * | | | Add feature flag for responsive stylingLouise Crow2014-04-24-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | Sets viewport, uses responsive header and footer templates.
| | * | | | Add alternative header and footer templates.Louise Crow2014-04-24-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | These make markup changes required by the responsive styling.
| | * | | | Use paragraph here to make styling easierLouise Crow2014-04-24-2/+2
| | | | | |
| | * | | | Make header_left an id, not a class.Louise Crow2014-04-24-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think this was a mistake, it seems to be an id in the other places it is used.
| | * | | | Remove extra whitespaceLouise Crow2014-04-24-2/+2
| | | | | |
| | * | | | Add wrapper div to make styling easier.Louise Crow2014-04-24-17/+21
| | | | | |
| | * | | | Add a div around the main content.Louise Crow2014-04-24-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | Makes it easier to style.
| | * | | | Only display result_section divs when results exists.Louise Crow2014-04-24-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | Should make the styling more straightforward.
| | * | | | Order page elements consistently with other pages.Louise Crow2014-04-22-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'right_column' appears after content it will be to the right hand side of on other pages. It doesn't matter to the current stylesheet, which floats it anyway, but is easier to handle in responsive css if the markup is consistent.
| | * | | | Remove the quote from a comment in request correspondence.Louise Crow2014-04-22-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It gets hidden by the current stylesheet, so easier and more efficient not to render it at all.
| | * | | | Add foundation-rails gemLouise Crow2014-04-22-0/+5
| |/ / / /
| * | | | Merge branch 'issues/337-attachment-title' into rails-3-developGareth Rees2014-04-14-88/+1027
| |\ \ \ \
| | * | | | Update gubbins to call AttachmentToHTMLGareth Rees2014-04-07-14/+10
| | | | | |
| | * | | | Minor change to FoiAttachment#body_as_htmlGareth Rees2014-04-07-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | AttachmentToHTML#to_html already returns the raw html now
| | * | | | Dynamically inject AttachmentToHTML::View contentGareth Rees2014-04-07-2/+26
| | | | | |
| | * | | | Remove redundant AttachmentToHTML::HTMLGareth Rees2014-04-07-39/+0
| | | | | |
| | * | | | Update AttachmentToHTML for new View classGareth Rees2014-04-07-12/+31
| | | | | |
| | * | | | Simpler AttachmentToHTML::Adapters::CouldNotConvert interfaceGareth Rees2014-04-07-69/+24
| | | | | |
| | * | | | Simpler AttachmentToHTML::Adapters::GoogleDocsViewer interfaceGareth Rees2014-04-07-72/+23
| | | | | |
| | * | | | Simpler AttachmentToHTML::Adapters::RTF interfaceGareth Rees2014-04-07-106/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TODO: We really should be testing the full output of RTF#body, but we currently want to remain consistent with Adapters::PDF as many methods are shared between the Adapters. A more correct spec might be: expected = %Q(<font size=3><font color="#000000">thisisthebody</font></font>) adapter.body.should == expected
| | * | | | Simpler AttachmentToHTML::Adapters::PDF interfaceGareth Rees2014-04-07-102/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TODO: We really should be testing the full output of PDF#body, but inconsistencies between pdftohtml prevent sensible means of doing this. For example: adapter.body.should == %Q(\n<A name=1></a>thisisthebody<br/>\n<hr>\n) Fails because some versions (correctly!) use lower case tag names.
| | * | | | Simpler AttachmentToHTML::Adapters::Text interfaceGareth Rees2014-04-07-114/+42
| | | | | |
| | * | | | Add an AttachmentToHTML::View to deal with renderingGareth Rees2014-04-07-0/+188
| | | | | |
| | * | | | Work around a bug in unrtfGareth Rees2014-04-01-1/+37
| | | | | |
| | * | | | Get attachment body outside of chdirGareth Rees2014-04-01-24/+36
| | | | | |
| | * | | | Use AttachmentToHTML to generate FoiAttachment#body_as_htmlGareth Rees2014-03-28-87/+17
| | | | | |
| | * | | | Add AttachmentToHTML libraryGareth Rees2014-03-28-0/+1073
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extracts the attachment processing from FoiAttachment#body_to_html AttachmentToHTML contains adapters which convert - text/plain - application/pdf - application/rtf Results are returned as an AttachmentHTML::HTML instance which contains the raw HTML and other metadata about the conversion.
| * | | | | Merge branch 'issues/1416-csv-update-public-bodies' into rails-3-developGareth Rees2014-04-14-78/+166
| |\ \ \ \ \
| | * | | | | Remove unrecognised field from import_csv exampleGareth Rees2014-04-14-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `id` is not a recognised attribute when uploading from a CSV.
| | * | | | | Handle validation errors in PublicBody.import_csvGareth Rees2014-04-14-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically using save! so that anything other than an ActiveRecord::RecordInvalid doesn't get missed Note that ActiveModel::Errors#full_messages includes the attribute key in the message. This is by design, so we should consider whether we can improve the way that we use translated validation messages.
| | * | | | | Add missing validation to PublicBodyGareth Rees2014-04-14-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a unique index on public_bodies url_name, so we should have a validation for that.
| | * | | | | Clarify import_csv supported fields name attributeGareth Rees2014-04-09-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/mysociety/alaveteli/issues/1416 - Create a public body with name "Foobar" - Now try to upload this CSV: #name,request_email,short_name Foobar Test,a@example.com,foobar - The app raises the following exception: ERROR: duplicate key value violates unique constraint "index_public_bodies_on_url_name" DETAIL: Key (url_name)=(foobar) already exists. --- The reason for this is that the CSV import looks up records by their Name attribute. By attempting to rename the record, you're inadvertently creating a new Public Body, since one with the name of "Foobar Test" does not yet exist.
| | * | | | | Annotate modelsGareth Rees2014-04-09-62/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should have been run after related migrations. Could automate this to always run after migrations.
| | * | | | | Add default blank string to PublicBody@short_nameGareth Rees2014-04-09-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The validation allows a blank short_name but the schema does not.
| | * | | | | Use more semantic allow_blank validationGareth Rees2014-04-09-1/+1
| | | | | | |
| | * | | | | Make /admin/body/import_csv csv format clearerGareth Rees2014-04-09-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use code tags to highlight field names - Use pre tag to format example CSV as code
| | * | | | | Make /admin/body/import_csv supported fields clearerGareth Rees2014-04-09-2/+12
| | | |_|/ / | | |/| | | | | | | | | | | | | | | A list makes these easier to scan
| * | | | | Merge branch 'issues/1343-ip-spoofing-error' into rails-3-developGareth Rees2014-04-14-1/+16
| |\ \ \ \ \
| | * | | | | Rescue from IpSpoofAttackError when using remote IPGareth Rees2014-04-14-1/+16
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some proxies seem to be setting the Client-IP HTTP header to 127.0.0.1. Rails checks that Client-IP is contained in X-Forwarded-For and raises the error. We decided to rescue in this individual case rather than adding a middleware to strip Client-IP (http://writeheavy.com/2011/07/31/when-its-ok-to-turn-of-rails-ip-spoof-checking.html#well_thats_stupid_can_we_turn_it_off) so that we don't introduce unexpected behaviour. If we start to do anything more with request.remote_ip, then we should look at doing so. See http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection for an in-depth look at this issue.
| * | | | | Merge branch 'issues/1346-pagination-params-error' into rails-3-developGareth Rees2014-04-14-1/+9
| |\ \ \ \ \ | | |/ / / / | |/| | | |
| | * | | | Rescue from non-numeric page parameter exceptionsGareth Rees2014-04-10-1/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | will_paginate intentionally throws an ArgumentError when a non-numeric page parameter is used. Conveniently, they tag it with WillPaginate::InvalidPage, so here we rescue with a 404.
| * | | | Merge branch 'issues/1154-contact-form-submit' into rails-3-developGareth Rees2014-04-08-1/+2
| |\ \ \ \
| | * | | | Disable contact form submit after clickGareth Rees2014-04-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users sometimes repeatedly click submit if the form takes a while to submit. This disables the submit button with a message so that users know the form is submitting.
| | * | | | Require jquery_ujs in application manifestGareth Rees2014-04-04-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Allows the use of unobtrusive js on the public facing app
| * | | | | Merge branch 'issues/1360-fancybox' into rails-3-developGareth Rees2014-04-07-413/+28
| |\ \ \ \ \
| | * | | | | 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/1317-holding-pen-spam' into rails-3-developGareth Rees2014-04-07-1/+275
| |\ \ \ \ \
| | * | | | | Add link to spam_addresses from show_raw_emailGareth Rees2014-03-31-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Went with a simple option of just adding the link. We could add a form which submits the email automatically, but there are a few cases where this might be more complex: - If the To: contains more than one email - If the address is already on the spam list - Redirecting back to the correct page depending on which form was submitted - Additional help text on show_raw_email