diff options
-rw-r--r-- | app/helpers/link_to_helper.rb | 21 | ||||
-rw-r--r-- | app/views/admin_public_body/show.rhtml | 2 | ||||
-rw-r--r-- | app/views/admin_request/show.rhtml | 2 | ||||
-rw-r--r-- | todo.txt | 6 |
4 files changed, 24 insertions, 7 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb index 8eeed45b5..0a1a5b188 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.3 2007-12-14 13:24:04 francis Exp $ +# $Id: link_to_helper.rb,v 1.4 2007-12-18 17:39:55 francis Exp $ module LinkToHelper @@ -13,15 +13,21 @@ module LinkToHelper # XXX consolidate with simplify_url_part in controllers/application.rb so # ones with calls to simplify_url_part are only in one place + def request_url(info_request) + return show_request_url(:id => info_request, :only_path => true) + end def request_link(info_request) - link_to h(info_request.title), show_request_url(:id => info_request) + link_to h(info_request.title), request_url(info_request) end + def public_body_url(public_body) + return show_public_body_url(:simple_short_name => simplify_url_part(public_body.short_name), :only_path => true) + end def public_body_link_short(public_body) - link_to h(public_body.short_name), show_public_body_url(:simple_short_name => simplify_url_part(public_body.short_name)) + link_to h(public_body.short_name), public_body_url(public_body_url) end def public_body_link(public_body) - link_to h(public_body.name), show_public_body_url(:simple_short_name => simplify_url_part(public_body.short_name)) + link_to h(public_body.name), public_body_url(public_body) end def user_link(user) @@ -46,6 +52,11 @@ module LinkToHelper admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", "/admin/") 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 + end + end diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml index 473269806..a8c8dfa5e 100644 --- a/app/views/admin_public_body/show.rhtml +++ b/app/views/admin_public_body/show.rhtml @@ -7,10 +7,10 @@ <b><%= column.human_name %>:</b> <%=h @public_body.send(column.name) %> <br/> <% end %> -<b>Public link:</b> <%= public_body_link(@public_body) %> <br> </p> <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %> +| <%= link_to 'Public page', main_url(public_body_url(@public_body)) %> <h2>History</h2> <table border="1"> diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml index 4352a9522..cdaa280c9 100644 --- a/app/views/admin_request/show.rhtml +++ b/app/views/admin_request/show.rhtml @@ -8,9 +8,9 @@ <br/> <% end %> <b>Public body:</b> <%=h @info_request.public_body.name %> <br> -<b>Public link:</b> <%= request_link(@info_request) %> <br> </p> +<%= link_to 'Public page', main_url(request_url(@info_request)) %> <h2>Outgoing messages</h2> @@ -2,9 +2,14 @@ Please send me a copy of the contract signed with Veolia for refuse and recycling collection. +"Fundamental Savings Review" + Next ==== +Admin doesn't have stylesheets +Admin links to main site don't work + Cope with bouncing requests Either rotate log files, or merge with Apache ones @@ -87,6 +92,7 @@ http://www.ico.gov.uk/Home/tools_and_resources/decision_notices.aspx thanks :) I won't do it now as there are more important things, I was just accidentally impressed Lucene for search (ask Louise for plugin) +Have a look at http://swish-e.org/ Read wiki page lots http://www.mysociety.org/moin.cgi/FreedomOfInformation |