| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As the code stood, the list method in PublicBodyController would only
return results that had translations of the public body in the default
locale. This has a variety of problems if you're viewing pages in the
non-default locale - for example, the "first letter" links wouldn't
bring up the public bodies that began with that letter in the current
locale, only those that began with it in the default locale.
Ideally, every public body would be translated into every available
locale for the site, but there are cases where deployers wish to have
public body listings also include those from the default locale, in
case there are untralsated public bodies:
https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ
This commit makes the default behaviour to look for public body
listings only in the current locale, but if the new configuration
option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public
body listings will be looked for in both the current locale and the
default locale.
Fixes #1000
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the list method of PublicBodyController, capitalize
the SQL keywords consistenly and don't include extraneous
whitespace in the strings. (On the former point,
previously only some were - the convention is a matter of
some debate, but in this case the you editor's not doing
to do syntax highlighting of SQL so having the keywords
capitalized helps its readibility, I think.)
I wouldn't normally do this kind of cosmetic tidying up,
since it affects the tidiness of diffs and merges, but in
this case I'm going to change all these lines in the
next commit anyway, so that reasoning doesn't apply.
|
| |
| |
| |
| |
| |
| |
| |
| | |
It seems to be difficult to customize the display of the
tick labels (see the body-statistics-rotated-label branch
for an as-yet-not-working alternative) so for the moment
just reduce the number of public bodies shown per graph
from 10 to 8.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Move the calculation of statistics on public bodies into
the PublicBody model, so that there's less logic in the
controller.
|
| |
| |
| |
| | |
This adds the MINIMUM_REQUESTS_FOR_STATISTICS config option.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The statistics on the status of the requests to a particular
public body are too slow to calculate on-the-fly, so this
commit adds:
* Extra columns on public_bodies to store counts of
the successful, not held, and overdue request counts
for each public body.
* A rake task which should be run periodically to update
the overdue request count column.
If Javascript is not available, the summary statistics are
shown as tables. If Javascript is available, graphs are
drawn with Flot.
|
|
|
|
| |
with a 406, not a 500 caused by a missing template.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Gemfile
Gemfile.lock
app/controllers/admin_request_controller.rb
app/controllers/admin_track_controller.rb
app/controllers/request_controller.rb
app/controllers/services_controller.rb
app/helpers/link_to_helper.rb
app/mailers/request_mailer.rb
app/models/application_mailer.rb
app/models/info_request.rb
app/views/admin_censor_rule/edit.html.erb
app/views/admin_censor_rule/new.html.erb
app/views/admin_public_body/_form.html.erb
app/views/admin_public_body/_locale_selector.html.erb
app/views/admin_public_body/_one_list.html.erb
app/views/admin_public_body/edit.html.erb
app/views/admin_public_body/list.html.erb
app/views/admin_public_body/new.html.erb
app/views/admin_request/_incoming_message_actions.html.erb
app/views/admin_request/edit.html.erb
app/views/admin_request/edit_comment.html.erb
app/views/admin_request/edit_outgoing.html.erb
app/views/admin_request/list.html.erb
app/views/admin_request/list_old_unclassified.html.erb
app/views/admin_request/show.html.erb
app/views/admin_track/_some_tracks.html.erb
app/views/admin_track/list.html.erb
app/views/admin_user/edit.html.erb
app/views/admin_user/list.html.erb
app/views/admin_user/show.html.erb
app/views/general/_footer.html.erb
app/views/general/exception_caught.html.erb
app/views/help/contact.html.erb
app/views/layouts/default.html.erb
app/views/public_body/_alphabet.html.erb
app/views/request/_request_listing_single.html.erb
app/views/request/_sidebar.html.erb
app/views/request/new.html.erb
app/views/request/show.html.erb
app/views/request_mailer/external_response.rhtml
app/views/request_mailer/fake_response.rhtml
config/environment.rb
config/environments/production.rb
config/routes.rb
spec/controllers/admin_censor_rule_controller_spec.rb
spec/controllers/request_controller_spec.rb
spec/controllers/track_controller_spec.rb
spec/helpers/link_to_helper_spec.rb
spec/mailers/request_mailer_spec.rb
spec/models/info_request_spec.rb
spec/spec_helper.rb
spec/views/public_body/show.html.erb_spec.rb
spec/views/request/show.html.erb_spec.rb
vendor/plugins/rails_xss/lib/rails_xss/erubis.rb
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
develop
Conflicts:
app/controllers/admin_request_controller.rb
app/models/request_mailer.rb
app/views/admin_general/index.rhtml
app/views/admin_general/stats.rhtml
app/views/admin_public_body/_one_list.rhtml
app/views/admin_public_body/_tags.rhtml
app/views/admin_public_body/show.rhtml
app/views/admin_request/show.rhtml
app/views/admin_user/show.rhtml
app/views/layouts/admin.rhtml
app/views/public_body/show.rhtml
app/views/request/new.rhtml
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
I think Globalize is supposed to pick up the locale from I18n anyway so I don't know if these are needed.
I think I still haven't done the right thing but it's time to move on.
|
|/ |
|
| |
|
| |
|
|
|
|
| |
translations.
|
|
|
|
| |
wombleton:feature/440_sparkly_admin_css)
|
|
|
|
| |
At the same time, cause the tests not to rely on WDTK data. Fixes #396
|
|
|
|
| |
Closes #328
|
| |
|
|
|
|
| |
one page and having massive page download sizes
|
|
|
|
| |
Fixes #310.
|
|
|
|
| |
in the current locale, show all those that have entries in the default locale. When there is no translation present for a locale, it will fall back to the default translation. Fixes #280.
|
| |
|
| |
|
| |
|
|
|
|
| |
The existing bug wasn't catched by the tests, because it only fails when running in dev: otherwise all the classes are loaded before the search is done, and acts_as_xapian can find the provided 'request_collapse' argument, even if the PublicBody class doesn't define it, since all the init options end up together in acts_as_xapian.
|
|
|
|
| |
simultaneously. Fixes #178
|
| |
|
| |
|
|\ |
|
| | |
|