aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/link_to_helper.rb8
-rw-r--r--app/views/layouts/admin.rhtml4
-rw-r--r--config/general-example4
-rw-r--r--todo.txt3
4 files changed, 14 insertions, 5 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>
diff --git a/config/general-example b/config/general-example
index c812f3384..18c09847d 100644
--- a/config/general-example
+++ b/config/general-example
@@ -19,7 +19,7 @@
* Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
* Email: francis@mysociety.org; WWW: http://www.mysociety.org
*
- * $Id: general-example,v 1.8 2007-12-11 12:07:10 francis Exp $
+ * $Id: general-example,v 1.9 2008-01-21 18:53:41 francis Exp $
*
*/
@@ -38,6 +38,6 @@ define('OPTION_INCOMING_EMAIL_SECRET', 'xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx'
// Administration
define('OPTION_CONTACT_EMAIL', 'admin@localhost');
define('OPTION_ADMIN_BASE_URL', '/admin/');
-
+define('OPTION_ADMIN_PUBLIC_URL', '/'); // where /stylesheets sits under for admin pages
?>
diff --git a/todo.txt b/todo.txt
index 1d481a71c..9e1df184d 100644
--- a/todo.txt
+++ b/todo.txt
@@ -145,6 +145,9 @@ http://community.foe.co.uk/tools/right_to_know/tips.html
Change to Rails 2, may as well do it now rather than later.
http://www.slashdotdash.net/articles/2007/12/03/rails-2-upgrade-notes
+See if occasional fastcgi errors then go away
+[Mon Jan 21 10:38:45 2008] [error] [client 81.107.40.81] FastCGI: incomplete headers (0 bytes) rec
+eived from server "/data/vhost/foi.mysociety.org/docs/dispatch.fcgi"
Show public body email address on their public page, with a link to say "this isn't right!"