diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/config_helper.rb | 4 | ||||
-rwxr-xr-x | app/helpers/link_to_helper.rb | 15 | ||||
-rw-r--r-- | app/helpers/mailer_helper.rb | 2 |
4 files changed, 17 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 42f9d30f1..e3b1e57ac 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -3,7 +3,7 @@ # in the application. # # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. -# Email: francis@mysociety.org; WWW: http://www.mysociety.org/ +# Email: hello@mysociety.org; WWW: http://www.mysociety.org/ require 'languages' diff --git a/app/helpers/config_helper.rb b/app/helpers/config_helper.rb index 73e12172f..026600ff1 100644 --- a/app/helpers/config_helper.rb +++ b/app/helpers/config_helper.rb @@ -1,5 +1,5 @@ module ConfigHelper def site_name - Configuration::site_name + AlaveteliConfiguration::site_name end -end
\ No newline at end of file +end diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 3f59c55ca..238a36ce4 100755 --- a/app/helpers/link_to_helper.rb +++ b/app/helpers/link_to_helper.rb @@ -3,7 +3,7 @@ # - # # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. -# Email: francis@mysociety.org; WWW: http://www.mysociety.org/ +# Email: hello@mysociety.org; WWW: http://www.mysociety.org/ module LinkToHelper @@ -218,6 +218,9 @@ module LinkToHelper return url end + def search_link(query, variety_postfix = nil, sort_postfix = nil, advanced = nil) + link_to h(query), search_url(query) + end def search_path(query, options = {}) search_url(query, options.merge(:only_path => true)) @@ -238,7 +241,7 @@ module LinkToHelper # TODO: Remove in next release def main_url(relative_path, append = nil) warn "[DEPRECATION] main_url is deprecated. Please remove it from your theme." - url_prefix = "http://" + Configuration::domain + url_prefix = "http://" + AlaveteliConfiguration::domain url = url_prefix + relative_path if !append.nil? begin @@ -282,5 +285,13 @@ module LinkToHelper def year_from_date(date) return date.strftime("%Y").strip end + + #I18n locale switcher + + def locale_switcher(locale, params) + params['locale'] = locale + return url_for(params) + end + end diff --git a/app/helpers/mailer_helper.rb b/app/helpers/mailer_helper.rb index be2ce47aa..3d4bbac71 100644 --- a/app/helpers/mailer_helper.rb +++ b/app/helpers/mailer_helper.rb @@ -1,5 +1,5 @@ module MailerHelper def contact_from_name_and_email - "#{Configuration::contact_name} <#{Configuration::contact_email}>" + "#{AlaveteliConfiguration::contact_name} <#{AlaveteliConfiguration::contact_email}>" end end |