| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Now part of global navigation, sits within the main menu on mobile
Removed un-needed HTML and CSS
|
| |
|
|
|
|
| |
So that we can import it from a subdirectory
|
|
|
|
| |
Sets viewport, uses responsive header and footer templates.
|
|
|
|
| |
These make markup changes required by the responsive styling.
|
| |
|
|
|
|
|
| |
I think this was a mistake, it seems to be an id in the other places it
is used.
|
| |
|
| |
|
|
|
|
| |
Makes it easier to style.
|
|
|
|
| |
Should make the styling more straightforward.
|
|
|
|
|
|
|
| |
'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.
|
|
|
|
|
| |
It gets hidden by the current stylesheet, so easier and more efficient
not to render it at all.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
AttachmentToHTML#to_html already returns the raw html now
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \ |
|
| | |
| | |
| | |
| | | |
`id` is not a recognised attribute when uploading from a CSV.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
There's a unique index on public_bodies url_name, so we should have a
validation for that.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
Should have been run after related migrations.
Could automate this to always run after migrations.
|
| | |
| | |
| | |
| | | |
The validation allows a blank short_name but the schema does not.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- Use code tags to highlight field names
- Use pre tag to format example CSV as code
|
| | |
| | |
| | |
| | | |
A list makes these easier to scan
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
|
|/ /
| |
| |
| |
| |
| | |
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.
|
|\ \ |
|