| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
| |
Move HTML to view from controller, use same elements for other country
popup and everypage - partly so they don't display on top of each other
anymore. Don't position them over existing content, position them at the
top of the page. Use consistent styling, and keep the javascript
unobtrusive.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On WDTK, /body/all-authorities was using lots of memory - this
commit reduces that by (a) fetching the public bodies in batches,
rather than keeping them all in memory at one time and
(b) writing the CSV to a file and then returning it with
X-Sendfile (or equivalent), rather than returning the whole file
from memory with send_data.
There's a FIXME to do with the layout of download directories; if
that's changed, the example nginx config, etc. will need to be
updated too.
This commit also adds a basic test for reasonable CSV being
returned and switches from FasterCSV to CSV in order to fix this
NotImplementedError under Ruby 1.9:
Please switch to Ruby 1.9's standard CSV library.
It's FasterCSV plus support for Ruby 1.9's m17n encoding engine.
(The CSV version seems to still work fine under 1.8.7.)
|
|\ |
|
| |
| |
| |
| | |
Contributes to #1118.
|
| |
| |
| |
| |
| |
| | |
This simplifies the statistics action of the PublicBodyController
and makes it easier to test the functionality now in the
simplify_stats_for_graphs method.
|
|/ |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The 'if data' needs to be earlier to avoid an error if one of the
statistics columns hasn't been filled in by the
stats:update_public_bodies_stats rake task yet.
Thanks to Louise Crow for pointing this out in code review.
|
|\|
| |
| |
| | |
rails-3-develop
|
| | |
|
| |
| |
| |
| |
| |
| | |
Now that there are rotated names on the x axis we shouldn't need
to worry about them overlapping, which was the reason for limiting
the number to 8 in the first place.
|
| |
| |
| |
| |
| |
| |
| | |
Previously, the JSON included all the columns from the public
body table, which was unnecessary and included the public body's
email address. Instead, just include the name and URL of the
public body.
|
|\ \
| |/
|/| |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Under Ruby 1.8, it was previously impossible to use one of the "first
letter" alphabet links on the public body listing page if the first
letter was outside [A-Za-z] since the test for the parameter only
being a single letter wasn't aware of the possibly of multi-byte
characters. In addition, upcasing of letters outside [A-Za-z] didn't
work because String#upcase in Ruby 1.8 isn't Unicode-aware.
This commit fixes these two problems, so that non-US-ASCII first
letter links will work under Ruby 1.8.
(Fixes #1112.)
|
|
|
|
|
|
| |
In fact, we do still need to set permissions.
This reverts commit 56ce526acdcb1b5493bc11f14b751b5c3f02f686.
|
|
|
|
| |
Fixes #1101.
|
|\ |
|
| |
| |
| |
| | |
Fixes #1082.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Gemfile
app/views/admin_request/edit_outgoing.html.erb
config/packages
doc/CHANGES.md
doc/INSTALL.md
spec/models/info_request_spec.rb
spec/models/public_body_spec.rb
|
| | |
| | |
| | |
| | |
| | | |
As @mhl points out, this more clearly indicates that they may come back
at some point.
|
| | |
| | |
| | |
| | |
| | | |
Either rails or the webserver will be sending it, we're not redirecting
anymore.
|
| | |
| | |
| | |
| | |
| | | |
So that files attached to different messages with the same name and
url_part don't get overwritten.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
get_last_response_event and get_last_outgoing_event are used in various
places to determine which events to link to, use in queries etc.
Restrict them to refer to the last publicly visible event of the
relevant type, and rename them to make that clear.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use send_file to send zips. Also adds 'all_can_view_all_correspondence?'
- is this request completely cachable, or do we need to cache different
versions for different levels of privilege?
|
| | |
| | |
| | |
| | |
| | |
| | | |
This was disabled for hidden requests as the download was by redirect,
allowing people who have not been authenticated to conceivably access
the download. We'll be moving to send_file instead, so can restore it.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This should be handled by assign_variables_for_show_template. Otherwise,
the make_request_summary_file method shouldn't depend on instance
variables
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds a spec for what we want to see - no message text in
correspondence.txt, and no attachments. Refactors the
simple_correspondence templates to make it clearer that these are doing
the same job as the html.erb ones, for text.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Render the show template within the current thread rather than making
another request - we're going to need to use the current session in
order to know what do include in the zip file, now that we have more
fine-grained visibility of messages. Also, this will mean we can use
this functionality in single threaded contexts, and test it more easily.
Don't display profile photos as this would require another process, and
hide other icons so we don't need to include them. Use render_to_string
as a more standard way of rendering templates to a string for further
manipulation.
|
| | |
| | |
| | |
| | |
| | |
| | | |
So we can reuse them when rendering the show template to a file. Lots of
the sidebar prep isn't going to be needed for that view, so make that
optional in the template.
|
| | |
| | |
| | |
| | |
| | | |
Split into those that come from request params and those that come from
the model
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
We'll use this for saving the changes to the prominence of an incoming
message in a relatively RESTful url structure.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Make specs that depend on multiple controllers and models interacting
integration specs.
|
| | |
| | |
| | |
| | | |
Eventually this should use standard RESTful routing.
|
| | |
| | |
| | |
| | |
| | | |
The labels on the public body statistics graphs weren't marked as
being translatable. Fixes #1079.
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
app/controllers/public_body_controller.rb
config/general.yml-example
lib/configuration.rb
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This introduces some raw SQL statement for the fallback case, but we
can't see an easy way to avoid that in this case.
This commit also adds some tests that assert the sorting and
non-duplication properties of the listing.
Thanks to Louise Crow for working out the SQL expression for
falling back to the default locale.
|