diff options
-rw-r--r-- | app/models/public_body.rb | 2 | ||||
-rw-r--r-- | app/views/public_body/_list_sidebar_extra.rhtml | 6 | ||||
-rw-r--r-- | app/views/public_body/list.rhtml | 7 | ||||
-rw-r--r-- | lib/configuration.rb | 1 |
4 files changed, 9 insertions, 7 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index d212c371f..34bcd332c 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -511,7 +511,7 @@ class PublicBody < ActiveRecord::Base # Returns nil if configuration variable not set def override_request_email - e = MySociety::Config.get("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "") + e = Configuration::override_all_public_body_request_emails e if e != "" end diff --git a/app/views/public_body/_list_sidebar_extra.rhtml b/app/views/public_body/_list_sidebar_extra.rhtml new file mode 100644 index 000000000..6857a7eb5 --- /dev/null +++ b/app/views/public_body/_list_sidebar_extra.rhtml @@ -0,0 +1,6 @@ +<p> + <%= _('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body'] %> +</p> +<p> + <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> +</p> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index 4d905bfd3..3a64de1f7 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -25,12 +25,7 @@ <% if not first_row %> </ul> <% end %> - <p> - <%= _('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body'] %> - </p> - <p> - <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> - </p> + <%= render :partial => "list_sidebar_extra" %> </div> <% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %> diff --git a/lib/configuration.rb b/lib/configuration.rb index 03ca62343..e52f6e956 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -31,6 +31,7 @@ module Configuration :ISO_COUNTRY_CODE => 'GB', :MAX_REQUESTS_PER_USER_PER_DAY => nil, :NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24], + :OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS => '', :RAW_EMAILS_LOCATION => 'files/raw_emails', :READ_ONLY => '', :RECAPTCHA_PRIVATE_KEY => 'x', |