| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
This is the most rudimentary possible way to give them access to the batch request urls, pending #1239
|
| |
|
|
|
|
| |
Add or remove all buttons, ajax search as you type.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
They're not finding by the existing object, they're finding an existing
object.
|
|
|
|
|
| |
Create the batch and associate new requests with it, send the outgoing
messages, and redirect to a page for the new batch.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add validation, preview as in single request creation. Add comments
noting further work to be done in this action.
|
|
|
|
|
|
| |
Give it basic access control, and add some conditionals to the 'new'
template around bits that use @info_request.public_body so that they
render something different if @batch is assigned.
|
|
|
|
| |
Should retain a list of selected public bodies across searches.
|
| |
|
| |
|
|
|
|
| |
Make it updatable via the user admin page.
|
| |
|
|\
| |
| |
| |
| | |
This has already been cherry-picked into the wdtk branch, but
it should also be merged into rails-3-develop
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We're trying to switch to an upstream version of globalize, which now
has Henare's change to allowed blank values without them being
converted to nil - however, there is another intermediate change that
was introduced which means that the name is only written back to the
original table if the locale matches the default locale. This is
described in more depth here:
https://github.com/globalize/globalize/pull/183
This change broke the make_single_language_example helper, but this
commit fixes that by also setting the default locale before creating
the example public bodies.
|
|/ |
|
|\ |
|
| |
| |
| |
| |
| | |
This is for the case where there are no results and the user was
explicitly searching for authorities.
|
| |
| |
| |
| | |
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.
|
|/ |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We were seeing errors in xapian_create_job that indicated that the
current transaction had been aborted but not rolled-back. It seems
that this happened because sometimes xapian_create_job was called
from within another transaction (e.g. from the transaction block in
AdminIncomingMessageController#redeliver). The default behaviour
of nested transactions in Rails is for them to behave as if all
but the outermost transaction blocks had no effect; this means
that the exception thrown in the inner transaction block in
xapian_create_job wasn't causing a rollback, and it was then being
caught before propagating up to the outermost transaction. Thus
the transaction was never being rolled-back so any subsequent
operation on this database connection would error.
This commit fixes this problem by using the :requires_new => true
option to transaction, which asks ActiveRecord to fake genuinely
nested transcations using SAVEPOINT.
Fixes #1124.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.)
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a public body called "Åčçèñtéd Authority" in the
Czech locale (cs) so that we can create tests that exercise,
for example, searching based on an initial letter that has a
multi-byte representation in UTF-8.
An old test for "add mass tags" in the admin needed to be updated
since it implicitly assumed that all the public bodies in the
fixtures had translations in the :en locale.
The tests for loading CSV files of public bodies also needed to
be updated, since they were assuming that public body names
only contained letters in [A-Za-z ]. Since Unicode character
classes aren't easily available in Ruby 1.8 and it makes little
difference to the test, the character class is replaced by '.'.
|
|
|
|
| |
Fixes #1101.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Make it an integration spec so we don't need to touch the internals so
much.
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Add another spec for the same behaviour when an incoming message is
hidden.
|
| | |
|