aboutsummaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/application_helper.rb5
-rwxr-xr-x[-rw-r--r--]app/helpers/link_to_helper.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index e46404a72..9bdcb98cd 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -6,6 +6,7 @@
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
# $Id: application_helper.rb,v 1.22 2008-07-09 07:24:50 francis Exp $
+require 'languages'
module ApplicationHelper
# URL generating functions are needed by all controllers (for redirects),
@@ -66,6 +67,10 @@ module ApplicationHelper
t = highlight_words(t, words, html)
return t
end
+
+ def locale_name(locale)
+ return LanguageNames::get_language_name(locale)
+ end
# Use our own algorithm for finding path of cache
def foi_cache(name = {}, options = nil, &block)
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 85913b12e..935912a61 100644..100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -162,7 +162,7 @@ module LinkToHelper
# Admin pages
def admin_url(relative_path)
- admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", "/admin/")
+ admin_url_prefix = admin_general_index_path+"/"
return admin_url_prefix + relative_path
end
@@ -203,6 +203,6 @@ module LinkToHelper
params['locale'] = locale
return url_for(params)
end
-
+
end