aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_public_body_controller.rb
Commit message (Collapse)AuthorAgeLines
* Fix translating Public BodiesGareth Rees2015-03-18-8/+4
|
* Merge branch 'hotfix/0.20.0.6' into rails-3-developLouise Crow2015-02-05-0/+10
|\ | | | | | | | | Conflicts: spec/models/public_body_spec.rb
| * Build available locales in the controllerGareth Rees2015-02-03-0/+10
| | | | | | | | | | Removes logic from views and obsoletes AdminPublicBodyHelper#public_body_form_object
* | Move show method to use RESTful routingLouise Crow2014-12-18-3/+3
| |
* | Use RESTful routing for indexLouise Crow2014-12-18-63/+59
|/
* Replace existing PublicBodyCategories functionality with db models ↵lizconlan2014-09-22-2/+0
| | | | PublicBodyCategory and PublicBodyHeading
* Populate admin public body forms based on a change request.Louise Crow2014-01-13-3/+39
| | | | | Also add editable text for an email to be sent to the person requesting the change.
* Fix the command-line CSV importer under Ruby 1.9Mark Longair2013-12-03-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Ruby 1.8.7, you can parse a CSV file with the following code (Example A): require 'csv' CSV.parse('foo.csv') do |row| puts "got row: #{row.inspect}" end Rather confusingly, under Ruby 1.8.7, CSV.parse can also take a string representation of the contents of the file as its parameter, so this also works (Example B): require 'csv' CSV.parse("1,hello,red\n2,goodbye,green") do |row| puts "got row: #{row.inspect}" end However under Ruby 1.9.3, CSV.parse only expects a string representation of the contents of the CSV file, so only Example B works; Example B fails silently (interpreting the filename as a single cell CSV file, typically). The import:import_csv rake task unfortunately relied on both A and B working. This commit fixes this by adding PublicBody.import_csv_from_file, and refactoring PublicBody.import_csv to use the newly added class method, and adds a test to check for any regression in this behaviour. (This means that the usage of import_csv in the admin public body controller's import_csv action could now be changed to use PublicBody.import_csv_from_file directly from the uploaded file, which would be more efficient and cope with larger files without using lots of memory.) Fixes #1229
* Fix locales used to find public bodies in AdminPublicBodyControllerMark Longair2013-09-10-2/+3
| | | | | | | | | The locale returned from locale_from_params may be dash-separated, (the I18n module convention) whereas those in the public_body_translations table are underscore-separated. The AdminPublicBodyController was looking for dash-separated locales in that table, so ensure that dashes are substituted for underscores before using them in a query.
* Try to convert csv files of public bodies into utf-8 before importing them.Louise Crow2013-08-14-1/+1
|
* Add pagination to the list of requests on the admin page for a public bodyLouise Crow2013-06-20-0/+3
|
* Change email address in header of source code to hello@mysociety.orgMatthew Landauer2013-03-26-1/+1
|
* Merge remote-tracking branch 'mysociety/develop' into rails-3-developHenare Degan2013-03-14-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Stop using admin_url to generate absolute url for the admin interfaceMatthew Landauer2013-02-15-2/+2
| |
* | Convert query to more activerecord 3 formMatthew Landauer2013-01-30-4/+2
| |
* | The with_locale has been removed in Globalize3Henare Degan2012-12-11-5/+5
| | | | | | | | | | | | 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.
* | Switch to new method nameHenare Degan2012-12-11-5/+5
|/
* Redirect calls to admin_http_auth_user to more generic wrapper ↵Louise Crow2012-10-30-4/+4
| | | | admin_current_user
* Remove svn tags that are out of date as we are now using gitMatthew Landauer2012-10-09-2/+0
|
* Merge branch 'release/0.6.3' into developLouise Crow2012-08-22-30/+67
|\ | | | | | | | | | | | | | | Conflicts: app/controllers/admin_public_body_controller.rb app/views/admin_public_body/import_csv.rhtml spec/controllers/admin_public_body_controller_spec.rb spec/models/info_request_spec.rb
| * Rework the temporary storing of a csv file of public body info between a dry ↵Louise Crow2012-08-20-29/+67
| | | | | | | | run and real load. Use a temp file, not the session for the data. Also fixes #503.
| * Fix bug preventing CSV upload. Fixes #525 (needs tests!)Seb Bacon2012-07-19-7/+7
| |
* | Default to dry run and don't raise an error when this page is visited normallyHenare Degan2012-08-11-7/+2
|/
* After a dry-run, cause the public body "import" button to use the data ↵Seb Bacon2012-06-12-9/+13
| | | | uploaded in the dry-run. Fixes #507
* Remove trailing whitespace (to make a cleaner forthcoming merge with ↵Seb Bacon2012-05-15-16/+16
| | | | wombleton:feature/440_sparkly_admin_css)
* Fixes #393 - Route the mass_assign_tags action so it does what it says on ↵Henare Degan2012-01-31-1/+1
| | | | the tin
* Controller tests were failing for these actions - switching to more concise ↵Henare Degan2012-01-31-2/+2
| | | | URL helpers seemed to fix things up
* No tabs for indentationRobin Houston2012-01-26-1/+1
|
* Match public bodies by tag regardless of localeSeb Bacon2012-01-09-1/+1
|
* Add support for add/replace tags when importing public bodies from CSV. ↵David Cabo2011-09-19-2/+2
| | | | Fixes #60
* Wrap categories loading into singleton and add support for multiple locales ↵David Cabo2011-09-19-0/+2
| | | | simultaneously. Fixes #178
* Make tag optional when importing public bodies through CSV (issue #60)David Cabo2011-09-13-31/+26
|
* Refactor fixes to #142 and #143, new implementation much simpler to understandDavid Cabo2011-08-23-56/+16
|
* Support editing of public bodies simultaneously in all locales (closes #143)David Cabo2011-08-23-22/+38
|
* Extend "new public body" form to support multiple locales (closes #142)David Cabo2011-08-23-9/+25
|
* Extend CSV import to support additional fields (short name, home page...)David Cabo2011-08-23-1/+1
|
* Create public bodies in multiple locales when importing from CSVDavid Cabo2011-08-11-3/+3
|
* initial merge of Kosovan branch; still need to get tests passing, factor out ↵Seb Bacon2011-07-06-34/+33
|\ | | | | | | Kosovan-specific code
| * I18n fixFaton Selishta2011-06-02-5/+7
| |
* | ensure all with_locale calls end with explicit renderSeb Bacon2011-06-13-33/+39
|/
* further test fixageSeb Bacon2011-04-01-38/+59
|
* Remove unused :FOI site testharness2010-09-10-2/+2
|
* Dry run button for database uploadFrancis Irving2009-12-17-7/+19
|
* Change not to !Francis Irving2009-12-17-1/+1
|
* Show correctly what happens with pagination when mass adding tags.francis2009-08-26-3/+7
| | | | | Keep page number are on when mass adding tags. Display count of number of matches.
* Put tags (with links) in column on list of bodies admin interface tables.francis2009-08-26-2/+29
| | | | Interface to mass add tags to all bodies in admin search result.
* Show some stats on number of publication schemes entered.tony2009-03-24-1/+5
|
* Admin page to list most popular authorities without Publication Scheme infotony2009-03-10-1/+13
|
* Always give full stack trace for admin interfacefrancis2009-01-29-5/+2
|
* Only show destroy button if there are no requests.francis2008-08-14-1/+8
|