diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/link_to_helper.rb | 19 |
2 files changed, 18 insertions, 9 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ce78011a0..e40313d1f 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_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: application_helper.rb,v 1.15 2008-01-21 19:12:46 francis Exp $ +# $Id: application_helper.rb,v 1.16 2008-01-29 03:05:47 francis Exp $ module ApplicationHelper # URL generating functions are needed by all controllers (for redirects) @@ -41,11 +41,5 @@ module ApplicationHelper '' end end - - # Basic date format - def simple_date(date) - return date.strftime("%e %B %Y") - end - end diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index cfa61ec4d..79bdcd904 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.11 2008-01-22 18:51:21 francis Exp $ +# $Id: link_to_helper.rb,v 1.12 2008-01-29 03:05:47 francis Exp $ module LinkToHelper @@ -52,11 +52,11 @@ module LinkToHelper end - def info_request_link(info_request) link_to h(info_request.title), show_request_url(:id => info_request) end + # Simplified links to our objects # XXX See controllers/user_controller.rb controllers/body_controller.rb for inverse # XXX consolidate somehow with stuff in helpers/application_helper.rb @@ -72,6 +72,15 @@ module LinkToHelper return admin_url_prefix + relative_path end + # About page URLs + def about_url + return help_general_url :action => 'about' + end + def unhappy_url + return help_general_url :action => 'unhappy' + end + + # Where stylesheets used by admin page sit under def admin_public_url(relative_path) admin_url_prefix = MySociety::Config.get("ADMIN_PUBLIC_URL", "/") @@ -82,6 +91,12 @@ module LinkToHelper url_prefix = "http://" + MySociety::Config.get("DOMAIN", '127.0.0.1:3000') return url_prefix + relative_path end + + # Basic date format + def simple_date(date) + return date.strftime("%e %B %Y") + end + end |