aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/helpers/link_to_helper.rb8
-rw-r--r--app/views/request/_request_listing_via_event.rhtml18
-rw-r--r--todo.txt9
3 files changed, 23 insertions, 12 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 16aa59117..4cba2b663 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.48 2008-11-07 00:47:23 francis Exp $
+# $Id: link_to_helper.rb,v 1.49 2008-12-17 13:01:35 francis Exp $
module LinkToHelper
@@ -60,6 +60,9 @@ module LinkToHelper
def public_body_link(public_body)
link_to h(public_body.name), public_body_url(public_body)
end
+ def public_body_link_absolute(public_body) # e.g. for in RSS
+ link_to h(public_body.name), main_url(public_body_url(public_body))
+ end
def public_body_admin_url(public_body)
return admin_url('body/show/' + public_body.id.to_s)
end
@@ -77,6 +80,9 @@ module LinkToHelper
def user_link(user)
link_to h(user.name), user_url(user)
end
+ def user_link_absolute(user)
+ link_to h(user.name), main_url(user_url(user))
+ end
def user_or_you_link(user)
if @user && user == @user
link_to h("you"), user_url(user)
diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml
index d59ba1bd7..8ffb738ce 100644
--- a/app/views/request/_request_listing_via_event.rhtml
+++ b/app/views/request/_request_listing_via_event.rhtml
@@ -25,23 +25,23 @@ end %>
</strong><br>
<% if event.event_type == 'sent' %>
- Request sent to <%= public_body_link(info_request.public_body) %>
- by <%= user_link(info_request.user) %>
+ Request sent to <%= public_body_link_absolute(info_request.public_body) %>
+ by <%= user_link_absolute(info_request.user) %>
on <%= simple_date(event.created_at) %>.
<% elsif event.event_type == 'followup_sent' %>
<%=event.display_status %>
- sent to <%= public_body_link(info_request.public_body) %>
- by <%= user_link(info_request.user) %>
+ sent to <%= public_body_link_absolute(info_request.public_body) %>
+ by <%= user_link_absolute(info_request.user) %>
on <%= simple_date(event.created_at) %>.
<% elsif event.event_type == 'response' %>
<%=event.display_status %>
- by <%= public_body_link(info_request.public_body) %>
- to <%= user_link(info_request.user) %>
+ by <%= public_body_link_absolute(info_request.public_body) %>
+ to <%= user_link_absolute(info_request.user) %>
on <%= simple_date(event.created_at) %>.
<% elsif event.event_type == 'comment' %>
- Request to <%= public_body_link(info_request.public_body) %>
- by <%= user_link(info_request.user) %>.
- Annotated by <%= user_link(event.comment.user) %>
+ Request to <%= public_body_link_absolute(info_request.public_body) %>
+ by <%= user_link_absolute(info_request.user) %>.
+ Annotated by <%= user_link_absolute(event.comment.user) %>
on <%= simple_date(event.created_at) %>.
<% else %>
<% raise "unknown event type indexed " + event.event_type %>
diff --git a/todo.txt b/todo.txt
index 841b80378..b6e333d04 100644
--- a/todo.txt
+++ b/todo.txt
@@ -23,13 +23,16 @@ Awaiting internal review overdue state?
Next
====
+Annotations are word wrapping the URL ugh
+
Write code to make sure the Return-Path is never foi@sandwich.org.uk (even if the
Rails code breaks for Sendmail case in future botched Rails upgrades :)
-
Later
=====
+Update annotation help text for new states like internal_review and gone_postal
+
Test data dumper that removes sensitive data, but lets trusted people play with
whole database on their own machine without risk of compromise (for Tony)
- can avoid rebuilding emails, attachments etc. sanitized provided we don't
@@ -110,7 +113,9 @@ Another one knackered, and isn't copy protected, but is like the output of
converted via pdf2ps ones I suspect (i.e. very scanned):
http://www.whatdotheyknow.com/request/sale_of_public_land#incoming-8146
http://www.whatdotheyknow.com/request/childrens_database_compliance_wi#incoming-8088
-File a bug in pdftohtml :)
+Weird formatting one:
+ http://www.whatdotheyknow.com/request/risk_log#incoming-8090
+File bugs in pdftohtml :)
Make tables prettier in view as HTMl, just normal thick borders.
http://www.whatdotheyknow.com/request/1610/response/8093/attach/html/3/2008.10.29%20Reply.doc.html