aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/helpers/link_to_helper.rb8
-rw-r--r--app/views/layouts/admin.rhtml4
2 files changed, 9 insertions, 3 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index b26c7d020..381d45122 100644
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -5,7 +5,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: link_to_helper.rb,v 1.8 2008-01-04 10:56:22 francis Exp $
+# $Id: link_to_helper.rb,v 1.9 2008-01-21 18:53:41 francis Exp $
module LinkToHelper
@@ -72,6 +72,12 @@ module LinkToHelper
return admin_url_prefix + relative_path
end
+ # Where stylesheets used by admin page sit under
+ def admin_public_url(relative_path)
+ admin_url_prefix = MySociety::Config.get("ADMIN_PUBLIC_URL", "/")
+ return admin_url_prefix + relative_path
+ end
+
def main_url(relative_path)
url_prefix = "http://" + MySociety::Config.get("DOMAIN", '127.0.0.1:3000')
return url_prefix + relative_path
diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml
index c405e8851..0a1b1c298 100644
--- a/app/views/layouts/admin.rhtml
+++ b/app/views/layouts/admin.rhtml
@@ -8,8 +8,8 @@
<%
# Have to do explicit tag for stylesheet, to get absolute path on main server
%>
- <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => main_url(stylesheet_path('admin')) }) %>
- <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => main_url(stylesheet_path('scaffold')) }) %>
+ <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => admin_public_url(stylesheet_path('admin')) }) %>
+ <%= tag("link", { "rel" => "Stylesheet", "type" => "text/css", "media" => "screen", "href" => admin_public_url(stylesheet_path('scaffold')) }) %>
</head>
<body>