aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb9
-rw-r--r--config/crontab-example1
-rw-r--r--config/general.yml-example6
-rw-r--r--config/initializers/alaveteli.rb1
-rw-r--r--config/routes.rb11
5 files changed, 28 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb
index 3c749a531..6b7d1b976 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -77,6 +77,12 @@ module Alaveteli
require "#{Rails.root}/lib/whatdotheyknow/strip_empty_sessions"
config.middleware.insert_before ::ActionDispatch::Cookies, WhatDoTheyKnow::StripEmptySessions, :key => '_wdtk_cookie_session', :path => "/", :httponly => true
+ # Allow the generation of full URLs in emails
+ config.action_mailer.default_url_options = { :host => AlaveteliConfiguration::domain }
+ if AlaveteliConfiguration::force_ssl
+ config.action_mailer.default_url_options[:protocol] = "https"
+ end
+
# Enable the asset pipeline
config.assets.enabled = true
@@ -97,6 +103,9 @@ module Alaveteli
'jquery.fancybox-1.3.4.css',
'jquery.Jcrop.css',
'excanvas.min.js',
+ 'select-authorities.js',
+ 'jquery_ujs.js',
+ 'new-request.js',
'fonts.css',
'print.css',
'admin.css',
diff --git a/config/crontab-example b/config/crontab-example
index 366624998..64d0c45c9 100644
--- a/config/crontab-example
+++ b/config/crontab-example
@@ -12,6 +12,7 @@ MAILTO=cron-!!(*= $site *)!!@mysociety.org
# Every 10 minutes
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-alert-tracks check
5,15,25,35,45,55 * * * * !!(*= $user *)!! /etc/init.d/foi-purge-varnish check
+0,10,20,30,40,50 * * * * !!(*= $user *)!! run-with-lockfile -n /data/vhost/!!(*= $vhost *)!!/send-batch-requests.lock /data/vhost/!!(*= $vhost *)!!/!!(*= $vcspath *)!!/script/send-batch-requests || echo "stalled?"
# Once an hour
09 * * * * !!(*= $user *)!! run-with-lockfile -n !!(*= $vhost_dir *)!!/alert-comment-on-request.lock !!(*= $vhost_dir *)!!/!!(*= $vcspath *)!!/script/alert-comment-on-request || echo "stalled?"
diff --git a/config/general.yml-example b/config/general.yml-example
index 2bead2021..2b68721a5 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -243,3 +243,9 @@ SHARED_DIRECTORIES:
- lib/acts_as_xapian/xapiandbs/
- vendor/bundle
- public/assets
+
+# Allow some users to make batch requests to multiple authorities. Once
+# this is set to true, you can enable batch requests for an individual
+# user via the user admin page.
+
+ALLOW_BATCH_REQUESTS: false
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb
index cabe96efa..6df1823a5 100644
--- a/config/initializers/alaveteli.rb
+++ b/config/initializers/alaveteli.rb
@@ -51,6 +51,7 @@ require 'alaveteli_file_types'
require 'alaveteli_localization'
require 'message_prominence'
require 'theme'
+require 'xapian_queries'
AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales,
AlaveteliConfiguration::default_locale)
diff --git a/config/routes.rb b/config/routes.rb
index cadb7ec54..87a62c0bf 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -35,9 +35,11 @@ Alaveteli::Application.routes.draw do
match '/list' => 'request#list', :as => :request_list
match '/select_authority' => 'request#select_authority', :as => :select_authority
+ match '/select_authorities' => 'request#select_authorities', :as => :select_authorities
match '/new' => 'request#new', :as => :new_request
match '/new/:url_name' => 'request#new', :as => :new_request_to_body
+ match '/new_batch' => 'request#new_batch', :as => :new_batch
match '/request/search_ahead' => 'request#search_typeahead', :as => :search_ahead
@@ -63,6 +65,8 @@ Alaveteli::Application.routes.draw do
resource :report, :only => [:new, :create]
end
+ resources :info_request_batch, :only => :show
+
#### User controller
# Use /profile for things to do with the currently signed in user.
# Use /user/XXXX for things that anyone can see about that user.
@@ -108,6 +112,8 @@ Alaveteli::Application.routes.draw do
match '/body_statistics' => 'public_body#statistics', :as => :public_bodies_statistics
####
+ resource :change_request, :only => [:new, :create], :controller => 'public_body_change_requests'
+
#### Comment controller
match '/annotate/request/:url_title' => 'comment#new', :as => :new_comment, :type => 'request'
####
@@ -172,6 +178,11 @@ Alaveteli::Application.routes.draw do
match '/admin/body/mass_tag_add' => 'admin_public_body#mass_tag_add', :as => :admin_body_mass_tag_add
####
+ #### AdminPublicBodyChangeRequest controller
+ match '/admin/change_request/edit/:id' => 'admin_public_body_change_requests#edit', :as => :admin_change_request_edit
+ match '/admin/change_request/update/:id' => 'admin_public_body_change_requests#update', :as => :admin_change_request_update
+ ####
+
#### AdminGeneral controller
match '/admin' => 'admin_general#index', :as => :admin_general_index
match '/admin/timeline' => 'admin_general#timeline', :as => :admin_timeline