aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/user.rb3
-rw-r--r--app/views/user/_user_listing_single.rhtml1
-rw-r--r--app/views/user/show.rhtml14
-rw-r--r--todo.txt33
4 files changed, 32 insertions, 19 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index b94fe8e34..f0416506e 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -22,7 +22,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.65 2008-08-31 12:46:53 francis Exp $
+# $Id: user.rb,v 1.66 2008-08-31 14:08:55 francis Exp $
require 'digest/sha1'
@@ -38,6 +38,7 @@ class User < ActiveRecord::Base
has_many :user_info_request_sent_alerts
has_many :post_redirects
has_many :track_things, :foreign_key => 'tracking_user_id', :order => 'created_at desc'
+ has_many :comments, :order => 'created_at desc'
attr_accessor :password_confirmation
validates_confirmation_of :password, :message =>"^Please enter the same password twice"
diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml
index 1f52aa613..1362dc780 100644
--- a/app/views/user/_user_listing_single.rhtml
+++ b/app/views/user/_user_listing_single.rhtml
@@ -8,6 +8,7 @@ end %>
<span class="bottomline">
<%= pluralize(display_user.info_requests.size, "request") %> made.
+ <%= pluralize(display_user.comments.size, "annotation") %> made.
Joined on <%= simple_date(display_user.created_at) %>.
</span>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 59d834e0a..4a5ac33f0 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -73,5 +73,19 @@
<%= render :partial => 'request/request_listing', :locals => { :info_requests => @display_user.info_requests } %>
<% end %>
+
+ <% if @display_user.comments.empty? %>
+ <h2><%= @is_you ? 'Your' : 'This person\'s' %> annotations</h2>
+ <p>None made.</p>
+ <% else %>
+ <h2>
+ <%= @is_you ? 'Your ' : "This person's " %>
+ <%=pluralize(@display_user.comments.size, "annotation") %>
+ </h2>
+
+ <% for comment in @display_user.comments %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => comment.info_request_events[0], :info_request => comment.info_request } %>
+ <% end %>
+ <% end %>
</div>
diff --git a/todo.txt b/todo.txt
index 7c50e673a..3666c5705 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,6 +1,3 @@
- for e in info_request.info_request_events.sort { |a,b| a.created_at <=> b.created_at}.reverse
-
-
Site move:
Install PostgresSQL 8.3
Move database
@@ -9,17 +6,6 @@ Site move:
Next
====
-Comments interleaved with body
- - Annotation thing too far down when much sidebar e.g. http://localhost:3000/request/heya#outgoing-199
- - Put classification box above annotation one?
-
- - Flag bad comments
- - Delete comments from admin interface
- - Check annotation email alerts are working (e.g. when subscribed to a request)
-
- - Show them on user page
- - Show them on public body pages
-
Internal review status/marker?
http://www.whatdotheyknow.com/request/search_engine_advertising_bought
http://www.whatdotheyknow.com/request/communications_from_home_office_
@@ -27,14 +13,12 @@ Internal review status/marker?
http://www.whatdotheyknow.com/request/determination_of_pricing_for_pro#incoming-2902
my own veolia request
http://www.whatdotheyknow.com/request/online_petitions_documents_from
- (search for it!)
+ http://www.whatdotheyknow.com/request/ombudsmans_case_load#comment-21
+ (search for phrase "internal review"!)
Request withdrawn by user status/marker?
Grrr - so here I wanted to clarify my request, but don't want the timer to be reset!
http://www.whatdotheyknow.com/request/online_petitions_documents_from#incoming-3248
-user/show.rhtml sidebar vs. generic sidebar? (ask Tommy)
-There is grey on grey text in header? bad idea?
-
Clear out all the need admin attention requests
Clear out all the need classifying requests
@@ -53,6 +37,17 @@ Comments etc. do not sort in right order - by date, but not by time
The form where you classify requests does not have bold highlighting on it in
the key words. It is too verbose to read.
+Comments interleaved with body
+ - Annotation thing too far down when much sidebar e.g. http://localhost:3000/request/heya#outgoing-199
+ - Put classification box above annotation one?
+
+ - Flag bad comments
+ - Delete comments from admin interface
+ - Check annotation email alerts are working (e.g. when subscribed to a request)
+
+ - Show them on user page
+
+
Later
=====
@@ -207,6 +202,8 @@ Quoting fixing TODO:
http://localhost:3000/request/cctv_data_retention_and_use#incoming-2093
http://www.whatdotheyknow.com/request/stasi_activity_at_climate_camp#incoming-3362
http://www.whatdotheyknow.com/request/total_remuneration_and_benefits#incoming-2436
+ http://www.whatdotheyknow.com/request/dual_british_and_israeli_nationa#incoming-3461
+ http://www.whatdotheyknow.com/request/council_functions_55#incoming-4099
http://www.whatdotheyknow.com/request/public_inspection_periods_for_lo_2#outgoing-1707 # square bracket in link