diff options
-rw-r--r-- | app/controllers/track_controller.rb | 118 | ||||
-rw-r--r-- | app/models/track_thing.rb | 26 | ||||
-rw-r--r-- | app/views/body/show.rhtml | 4 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 8 | ||||
-rw-r--r-- | app/views/help/about.rhtml | 11 | ||||
-rw-r--r-- | app/views/request/list.rhtml | 4 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 12 | ||||
-rw-r--r-- | app/views/track/_tracking_people_and_link.rhtml | 53 | ||||
-rw-r--r-- | app/views/track/track_set.rhtml | 33 | ||||
-rw-r--r-- | app/views/user/_user_listing_single.rhtml | 3 | ||||
-rw-r--r-- | app/views/user/show.rhtml | 46 | ||||
-rw-r--r-- | public/stylesheets/main.css | 2 | ||||
-rw-r--r-- | todo.txt | 38 |
13 files changed, 130 insertions, 228 deletions
diff --git a/app/controllers/track_controller.rb b/app/controllers/track_controller.rb index 11975b725..fc1cdc6db 100644 --- a/app/controllers/track_controller.rb +++ b/app/controllers/track_controller.rb @@ -5,7 +5,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: track_controller.rb,v 1.23 2008-07-18 22:22:58 francis Exp $ +# $Id: track_controller.rb,v 1.24 2008-08-08 20:44:54 francis Exp $ class TrackController < ApplicationController @@ -18,12 +18,8 @@ class TrackController < ApplicationController ret = self.track_set if ret - if @track_thing.track_medium == 'feed' - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id - else - flash[:notice] = "You are " + ret + " tracking this request!" - redirect_to request_url(@info_request) - end + flash[:notice] = "You are " + ret + " tracking this request!" + redirect_to request_url(@info_request) end end @@ -43,30 +39,26 @@ class TrackController < ApplicationController ret = self.track_set if ret - if @track_thing.track_medium == 'feed' - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id - else - if @view.nil? - if ret == 'already' - flash[:notice] = "You are already being told about any new requests!" - elsif ret == 'now' - flash[:notice] = "You will now be told about any new requests!" - else - raise "unknown ret '" + ret + "'" - end - elsif @view == 'successful' - if ret == 'already' - flash[:notice] = "You are already being told about any successful requests!" - elsif ret == 'now' - flash[:notice] = "You will now be told about any successful requests!" - else - raise "unknown ret '" + ret + "'" - end - else - raise "unknown request list view " + @view.to_s + if @view.nil? + if ret == 'already' + flash[:notice] = "You are already being told about any new requests!" + elsif ret == 'now' + flash[:notice] = "You will now be told about any new requests!" + else + raise "unknown ret '" + ret + "'" end - redirect_to request_list_url(:view => @view) + elsif @view == 'successful' + if ret == 'already' + flash[:notice] = "You are already being told about any successful requests!" + elsif ret == 'now' + flash[:notice] = "You will now be told about any successful requests!" + else + raise "unknown ret '" + ret + "'" + end + else + raise "unknown request list view " + @view.to_s end + redirect_to request_list_url(:view => @view) end end @@ -79,12 +71,8 @@ class TrackController < ApplicationController ret = self.track_set if ret - if @track_thing.track_medium == 'feed' - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id - else - flash[:notice] = "You are " + ret + " tracking this public authority!" - redirect_to public_body_url(@public_body) - end + flash[:notice] = "You are " + ret + " tracking this public authority!" + redirect_to public_body_url(@public_body) end end @@ -97,12 +85,8 @@ class TrackController < ApplicationController ret = self.track_set if ret - if @track_thing.track_medium == 'feed' - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id - else - flash[:notice] = "You are " + ret + " tracking this person!" - redirect_to user_url(@track_user) - end + flash[:notice] = "You are " + ret + " tracking this person!" + redirect_to user_url(@track_user) end end @@ -118,17 +102,11 @@ class TrackController < ApplicationController ret = self.track_set if ret - if @track_thing.track_medium == 'feed' - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => @track_thing.id - else - flash[:notice] = "You are " + ret + " tracking the search '" + CGI.escapeHTML(@query) + "' !" - redirect_to search_url(@query) - end + flash[:notice] = "You are " + ret + " tracking the search '" + CGI.escapeHTML(@query) + "' !" + redirect_to search_url(@query) end end - - # Generic request tracker - set @track_thing before calling def track_set if @user @@ -138,22 +116,11 @@ class TrackController < ApplicationController end end - @track_thing.track_medium = 'email_daily' - - @title = @track_thing.params[:set_title] - if params[:track_thing] - @track_thing.track_medium = params[:track_thing][:track_medium] - end - - if not params[:submitted_track] or not @track_thing.valid? - render :template => 'track/track_set' - return false - end - if not authenticated?(@track_thing.params) return false end + @track_thing.track_medium = 'email_daily' @track_thing.tracking_user_id = @user.id @track_thing.save! @@ -163,6 +130,9 @@ class TrackController < ApplicationController # Atom feed (like RSS) for the track def atom_feed @track_thing = TrackThing.find(params[:track_id].to_i) + if @track_thing.track_medium != 'feed' + raise "can only view feeds for feed tracks, not email ones" + end atom_feed_internal end def atom_feed_internal @@ -185,23 +155,21 @@ class TrackController < ApplicationController return end - new_medium = params[:track_thing][:track_medium] + STDOUT.puts(params.to_yaml) + new_medium = params[:track_medium] if new_medium == 'delete' track_thing.destroy - flash[:notice] = "You will no longer be updated about " + track_thing.params[:list_description] - redirect_to user_url(track_thing.tracking_user) - elsif new_medium == 'email_daily' - track_thing.track_medium = new_medium - track_thing.created_at = Time.now() # as created_at is used to limit the alerts to start with - track_thing.save! - flash[:notice] = "You are now tracking " + track_thing.params[:list_description] + " by email" - redirect_to user_url(track_thing.tracking_user) - elsif new_medium == 'feed' - track_thing.track_medium = new_medium - track_thing.save! - redirect_to :controller => 'track', :action => 'atom_feed', :track_id => track_thing.id + flash[:notice] = "You will no longer be emailed updates about " + track_thing.params[:list_description] + redirect_to params[:r] + # Reuse code like this if we let medium change again. + #elsif new_medium == 'email_daily' + # track_thing.track_medium = new_medium + # track_thing.created_at = Time.now() # as created_at is used to limit the alerts to start with + # track_thing.save! + # flash[:notice] = "You are now tracking " + track_thing.params[:list_description] + " by email daily" + # redirect_to user_url(track_thing.tracking_user) else - raise "unknown medium " + new_medium + raise "new medium not handled " + new_medium end end diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb index 632f55f1c..98b1b43f3 100644 --- a/app/models/track_thing.rb +++ b/app/models/track_thing.rb @@ -21,7 +21,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: track_thing.rb,v 1.28 2008-08-07 00:24:52 francis Exp $ +# $Id: track_thing.rb,v 1.29 2008-08-08 20:44:54 francis Exp $ class TrackThing < ActiveRecord::Base belongs_to :tracking_user, :class_name => 'User' @@ -102,8 +102,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like to track the request '" + CGI.escapeHTML(self.info_request.title) + "'?", :list_description => "'<a href=\"/request/" + CGI.escapeHTML(self.info_request.url_title) + "\">" + CGI.escapeHTML(self.info_request.title) + "</a>', a request", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how - :verb_on_page => "Track updates to this request", - :verb_on_page_already => "tracking this request", + :verb_on_page => "Email me updates to this request", + :verb_on_page_already => "You are subscribed to this request", # Email :title_in_email => "New updates for the request '" + self.info_request.title + "'", :title_in_rss => "New updates for the request '" + self.info_request.title + "'", @@ -119,8 +119,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like to be told about any new requests?", :list_description => "any <a href=\"/list\">new requests</a>", - :verb_on_page => "Be told about any new requests", - :verb_on_page_already => "being told about any new requests", + :verb_on_page => "Email me when there are new requests", + :verb_on_page_already => "You are being emailed when there are new requests", # Email :title_in_email => "New Freedom of Information requests", :title_in_rss => "New Freedom of Information requests", @@ -136,8 +136,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like to be told when any request succeeds?", :list_description => "any <a href=\"/list/successful\">successful requests</a>", - :verb_on_page => "Be told when any request succeeds", - :verb_on_page_already => "being told when any request succeeds", + :verb_on_page => "Email me new successful responses", + :verb_on_page_already => "You are being emailed about any new successful responses", # Email :title_in_email => "Successful Freedom of Information requests", :title_in_rss => "Successful Freedom of Information requests", @@ -156,8 +156,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like to track the public authority '" + CGI.escapeHTML(self.public_body.name) + "'?", :list_description => "'<a href=\"/body/" + CGI.escapeHTML(self.public_body.url_name) + "\">" + CGI.escapeHTML(self.public_body.name) + "</a>', a public authority", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how - :verb_on_page => "Be told about requests to " + CGI.escapeHTML(self.public_body.name), - :verb_on_page_already => "being told about requests to " + CGI.escapeHTML(self.public_body.name), + :verb_on_page => "Email me about requests to " + CGI.escapeHTML(self.public_body.name), + :verb_on_page_already => "You are being emailed about requests to " + CGI.escapeHTML(self.public_body.name), # Email :title_in_email => self.public_body.law_only_short + " requests to '" + self.public_body.name + "'", :title_in_rss => self.public_body.law_only_short + " requests to '" + self.public_body.name + "'", @@ -173,8 +173,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like track the person '" + CGI.escapeHTML(self.tracked_user.name) + "'?", :list_description => "'<a href=\"/user/" + CGI.escapeHTML(self.tracked_user.url_name) + "\">" + CGI.escapeHTML(self.tracked_user.name) + "</a>', a person", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how - :verb_on_page => "Be told about requests by this person", - :verb_on_page_already => "being told about requests by this person", + :verb_on_page => "Email me about requests by this person", + :verb_on_page_already => "You are being emailed about requests by this person", # Email :title_in_email => "FOI requests by '" + self.tracked_user.name + "'", :title_in_rss => "FOI requests by '" + self.tracked_user.name + "'", @@ -190,8 +190,8 @@ class TrackThing < ActiveRecord::Base # Website :set_title => "How would you like to be updated about new requests and responses matching '" + CGI.escapeHTML(self.track_query) + "'?", :list_description => "'<a href=\"/search/" + CGI.escapeHTML(self.track_query) + "/newest\">" + CGI.escapeHTML(self.track_query) + "</a>' in new requests/responses", # XXX yeuch, sometimes I just want to call view helpers from the model, sorry! can't work out how - :verb_on_page => "Track new requests and responses matching '" + CGI.escapeHTML(self.track_query) + "'", - :verb_on_page_already => "tracking '" + CGI.escapeHTML(self.track_query) + "'", + :verb_on_page => "Email me about requests/responses matching '" + CGI.escapeHTML(self.track_query) + "'", + :verb_on_page_already => "Being emailed about '" + CGI.escapeHTML(self.track_query) + "'", # Email :title_in_email => "Requests or responses matching '" + self.track_query + "'", :title_in_rss => "Requests or responses matching '" + self.track_query + "'", diff --git a/app/views/body/show.rhtml b/app/views/body/show.rhtml index e90dee5f5..f585c60dc 100644 --- a/app/views/body/show.rhtml +++ b/app/views/body/show.rhtml @@ -1,8 +1,8 @@ <% @title = "Information freed from '" + h(@public_body.name) + "'" %> <div id="request_sidebar"> - <h2>People tracking this authority</h2> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false, :list_people => true } %> + <h2>Track this authority</h2> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> </div> <h1><%=h(@public_body.name)%></h1> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 03002c166..c6bb6af52 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -4,7 +4,7 @@ if @track_thing and TrackThing.find_tracking_people(@track_thing).size > 0 %> <div id="request_sidebar"> <h2>People tracking this search</h2> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :list_people => true, :own_request => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> </div> <% end %> @@ -47,7 +47,7 @@ <% end %> <% if @track_thing %> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :list_people => false, :own_request => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> <% end %> <% if @xapian_bodies.results.size > 0 %> @@ -74,7 +74,7 @@ <h1><%= "FOI requests " + ((@page-1)*@requests_per_page+1).to_s + "-" + [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s + " of " + @xapian_requests.matches_estimated.to_s + " for '" + h(@query) + "'" %></h1> <% if @track_thing %> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :list_people => false, :own_request => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> <% end %> <% for result in @xapian_requests.results %> @@ -83,7 +83,7 @@ <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> <% if @track_thing %> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false, :list_people => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> <% end %> <% end %> <% end %> diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml index 7280464fb..e87b60774 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.rhtml @@ -1,7 +1,7 @@ <% @title = "About" %> <div id="about_sidebar"> -<h1 id="contact">Contact Us</h1> +<h1 id="contact">Contact us</h1> <p>If your question isn't answered here, or you just wanted to let us know something about the site, <a href="/help/contact">contact us</a>. </p> @@ -182,15 +182,6 @@ address should be treated as the return address." </p> </dd> -<dt id="tracking">Why does the list of things that I'm tracking appear publically on the site?</dt> - -<dd>This helps you find others who are researching the same area of government, -so you can form groups to investigate or campaign together. It also helps us -show requests which are related to other requests. If you've ever used a -"social bookmarking" website such as Delicious, Digg or reddit, think of it like -that. -</dd> - </dl> <h1 id="officers">FOI officer questions</h1> diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml index 084f0577f..c3f3b4380 100644 --- a/app/views/request/list.rhtml +++ b/app/views/request/list.rhtml @@ -12,7 +12,7 @@ <h1><%=@title%></h1> <% if @track_thing %> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false, :list_people => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> <% end %> <% if @xapian_object.results.empty? %> @@ -30,5 +30,5 @@ <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_object.matches_estimated) %> <% if @track_thing %> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false, :list_people => false } %> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> <% end %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index 0ce1306a7..dce327349 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -7,13 +7,13 @@ <% end %> <div id="request_sidebar"> - <h2>People tracking this request</h2> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user, :list_people => true } %> + <h2>Track this request</h2> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => @info_request.user == @user } %> - <h2>Act on this request</h2> - <p> - <img src="/images/writetothem.png" alt=""> <a href="http://www.writetothem.com">Write to your politician</a> about it - <br><img src="/images/pledgebank.png" alt=""> <a href="http://www.pledgebank.com">Pledge with others</a> to act on it + <h2>Act on what you've learnt</h2> + <p> + <img src="/images/writetothem.png" alt=""> <a href="http://www.writetothem.com">Write to your politician</a> + <br><img src="/images/pledgebank.png" alt=""> <a href="http://www.pledgebank.com">Join others with a pledge</a> </p> <% if @xapian_similar.results.size > 0 %> diff --git a/app/views/track/_tracking_people_and_link.rhtml b/app/views/track/_tracking_people_and_link.rhtml index 3c8953336..a104010b7 100644 --- a/app/views/track/_tracking_people_and_link.rhtml +++ b/app/views/track/_tracking_people_and_link.rhtml @@ -1,45 +1,26 @@ -<% - existing_track = TrackThing.find_by_existing_track(@user, track_thing) - tracking_people = [] - if list_people - tracking_people = TrackThing.find_tracking_people(track_thing) +<% + if @user + existing_track = TrackThing.find_by_existing_track(@user, track_thing) end %> -<% if (not list_people) or tracking_people.size > 0 %> - <% if tracking_people.size > 0 %> - <ul> - <% for u in tracking_people %> - <li><%=user_link(u)%></li> - <% end %> - </ul> + +<% if own_request %> + <p>This is your own request, so you will be automatically emailed when new responses arrive.</p> +<% elsif existing_track %> + <% form_tag :controller => 'track', :action => 'update', :track_id => existing_track.id do %> + <p> + <%= track_thing.params[:verb_on_page_already] %> + <%= hidden_field_tag 'track_medium', "delete" %> + <%= hidden_field_tag 'r', request.request_uri %> + <%= submit_tag "unsubscribe" %> + </p> <% end %> - <p> - <% if existing_track %> - You are already <%= track_thing.params[:verb_on_page_already] %> - (<%= link_to "alter your subscriptions", user_url(@user) %>). - <% else %> - <% if own_request %> - <p>You will be emailed when there are updates to your own request.</p> - <p>You may also <%= link_to "get an RSS feed", do_track_url(track_thing) %> - <img src="/images/feed-16.png" alt="" class="rss"></p> - <% else %> - <%= link_to track_thing.params[:verb_on_page], do_track_url(track_thing) %> - (by email or RSS feed <img src="/images/feed-16.png" alt="" class="rss">) - <% end %> - <% end %> - </p> <% else %> - <% if own_request %> - <p>You will be emailed when there are updates to your own request.</p> - <p>You may also get an <%= link_to 'RSS feed', do_track_url(track_thing) %> - <img src="/images/feed-16.png" alt="" class="rss"></p> - <% else %> - <p>Be the first to <%= link_to MySociety::Format.lcfirst(track_thing.params[:verb_on_page]), do_track_url(track_thing) %> - (by email or RSS feed <img src="/images/feed-16.png" alt="" class="rss">)</p> - <% end %> + <div class="feed_link"><%= link_to '<img src="/images/email-16.png" alt="" class="rss">', do_track_url(track_thing) %> + <%= link_to track_thing.params[:verb_on_page], do_track_url(track_thing) %></div> <% end %> -<div class="feed_link"><%= link_to '<img src="/images/feed-16.png" alt="" class="rss">', do_track_url(track_thing, 'feed') %> <%= link_to 'RSS feed', do_track_url(track_thing, 'feed') %></div> +<div class="feed_link"><%= link_to '<img src="/images/feed-16.png" alt="" class="rss">', do_track_url(track_thing, 'feed') %> <%= link_to 'RSS feed of updates', do_track_url(track_thing, 'feed') %></div> diff --git a/app/views/track/track_set.rhtml b/app/views/track/track_set.rhtml deleted file mode 100644 index 452938c12..000000000 --- a/app/views/track/track_set.rhtml +++ /dev/null @@ -1,33 +0,0 @@ -<div id="track_set"> - -<% form_tag({:id => "track_set_form"}) do %> - <%= foi_error_messages_for :track_thing %> - - <div class="form_note"> - <h1><%=@title %></h1> - </div> - - <div class="form_note"> - <!--<%= radio_button "track_thing", "track_medium", "email_immediate" %> - <label for="track_track_medium_email">Send me emails shortly after there are updates</label> - <br> --> - <%= radio_button "track_thing", "track_medium", "email_daily" %> - <label for="track_thing_track_medium_email_daily">Send me emails at most once a day</label> - <br> - <%= radio_button "track_thing", "track_medium", "feed" %> - <label for="track_thing_track_medium_feed">Give me a feed to use in my news reader (RSS <img src="/images/feed-14.png" alt="" class="rss">)</label> - </div> - - <p class="form_note"> - <strong>Lack of privacy note:</strong> It will appear publically on your user page that - you are tracking this (<a href="/help/about/#tracking">why?</a>). - </p> - - <div class="form_button"> - <%= hidden_field_tag 'submitted_track', 1 %> - <%= submit_tag "Subscribe" %> - </div> -<% end %> - -</div> - diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml index 932ebc898..1f52aa613 100644 --- a/app/views/user/_user_listing_single.rhtml +++ b/app/views/user/_user_listing_single.rhtml @@ -8,8 +8,7 @@ end %> <span class="bottomline"> <%= pluralize(display_user.info_requests.size, "request") %> made. - <%= pluralize(display_user.track_things.size, "thing") %> tracked. Joined on <%= simple_date(display_user.created_at) %>. </span> -</div>
\ No newline at end of file +</div> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 99a7a5325..8e0c175af 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -1,19 +1,18 @@ <% @title = h(@display_user.name) + (@is_you ? " (you)" : "") %> <% if (@same_name_users.size >= 1) %> - <p>This is <strong>just one person</strong> who uses this site and has this name, you may - mean a different one: - <% for @same_name_user in @same_name_users %> + <p>There is <strong>more than one person</strong> who uses this site and has this name. + One of them is shown below, you may mean a different one: <% for @same_name_user in @same_name_users %> <%= user_link(@same_name_user) %> <% end %> <% end%> <div id="request_sidebar"> - <h2>People tracking this person</h2> - <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false, :list_people => true } %> + <h2>Track this person</h2> + <%= render :partial => 'track/tracking_people_and_link', :locals => { :track_thing => @track_thing, :own_request => false } %> </div> -<div class="single_user" id="user-<%=@display_user.id.to_s%>"> +<div class="single_user"> <h1><%=@title%></h1> <p class="subtitle">Joined WhatDoTheyKnow on <%= simple_date(@display_user.created_at) %></p> @@ -22,39 +21,38 @@ <% if @is_you %> (just to see how it works) <br><%= link_to "Change your password", signchange_url() %> - <% else %> <% end %> </p> - <% if not @display_user.track_things.empty? %> + <% if not @is_you %> + <p> + If you are <%=h @display_user.name %>, <%= link_to "sign in", signin_url(:r => request.request_uri) %> to change your password or alter your subscriptions. + </p> + <% end %> + + <% track_things = TrackThing.find(:all, :conditions => ["tracking_user_id = ? and track_medium = ?", @display_user.id, 'email_daily']) %> + <% if @is_you and not track_things.empty? %> <h2> - <%= @is_you ? 'You are' : 'This person is' %> tracking - <%=pluralize(@display_user.track_things.size, "thing") %> + Your <%=pluralize(track_things.size, "email subscription") %> </h2> <ul> - <% for track_thing in @display_user.track_things %> + <% for track_thing in track_things %> <li> <% if @is_you %> <% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %> - <%= track_thing.params[:list_description] %> by - <!-- (<%= link_to "view latest updates", :controller => 'general', :action => 'search', :query => track_thing.track_query %>) --> - <%= select 'track_thing', "track_medium", { "Email daily" => "email_daily", "RSS feed" => "feed", "Cancel updates" => "delete"}, { :selected => track_thing.track_medium } %> - <%= submit_tag "Update" %> - <!-- <% if track_thing.track_medium == 'feed' %> - (<%= link_to "Feed", :controller => 'track', :action => 'atom_feed', :track_id => track_thing.id %> - <img src="/images/feed-14.png" alt="" class="rss">) - <% end %> --> + <%= track_thing.params[:list_description] %> + <%= hidden_field_tag 'track_medium', "delete" %> + <%= hidden_field_tag 'r', request.request_uri %> + <%= submit_tag "unsubscribe" %> <% end %> + <!-- (<%= link_to "view latest updates", :controller => 'general', :action => 'search', :query => track_thing.track_query %>) --> <% else %> <%= track_thing.params[:list_description] %> <% end %> </li> <% end %> </ul> - <% if not @is_you %> - <p>If you are <%=h @display_user.name %>, <%= link_to "sign in", signin_url(:r => request.request_uri) %> to alter these settings.</p> - <% end %> <% end %> <% if @display_user.info_requests.empty? %> @@ -64,8 +62,8 @@ <% else %> <h2> - <%= @is_you ? 'You have' : 'This person has' %> - made <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %> + <%= @is_you ? 'Your ' : "This person's " %> + <%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %> </h2> <%= render :partial => 'request/request_listing', :locals => { :info_requests => @display_user.info_requests } %> diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 676f1ddeb..6ac6250a4 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -597,7 +597,7 @@ div.pagination { text-align: center; padding-top: 0.3em;} { float: right; clear: none; - width: 9em; + width: 10em; margin: 0 0 0 0.6em; font-size: 0.9em; } @@ -1,8 +1,18 @@ RSS move: - Can remove "if @track_thing.track_medium == 'feed'" bits from track controller - views/user/show.rhtml feed + Spacing on http://localhost:3000/search/hello + Rename tracking_people_and_link + Redo styling a bit of action icons so consistent + Add some tests + In controllers/track_controller.rb fiddle with wording of now/already +http://www.whatdotheyknow.com/request/communications_about_whatdotheyk + Mask all emails from binary attachments +Say "followup sent to" rather than "sent to" http://www.whatdotheyknow.com/feed/user/richard_jackson +Make links in notes clickable + http://www.whatdotheyknow.com/body/hesa +Spacing on green boxes is rubbish + Site move: Install PostgresSQL 8.3 Move database @@ -15,33 +25,18 @@ Internal review: http://www.whatdotheyknow.com/request/search_engine_advertising_bought http://www.whatdotheyknow.com/request/communications_from_home_office_ http://www.whatdotheyknow.com/request/crime_investigation_following_al - -http://www.whatdotheyknow.com/request/details_of_grant_awarded_to_vi_g_ - I received a reply on 4 April from Alison McCarthy to my request for -information about a development grant (SIC Code 7220) to Vero International -Software UK Limited which is unfortunately not satisfactory. - I requested all details about this grant in terms of its application and -any reports done afterwards. In order to facilitate my understanding as to the -degree of accountability regarding this grants, I need to see all documents -held by the Regional Development Agency which could possibly provide evidence -that the project outlined actually existed, and that the money wasn't simply -absorbed into shareholder profit. - It would be entirely fair to redact all trade secrets and confidential -information from the documents as they are disclosed, but I do not believe it -is reasonable to withhold disclosure of even their titles, dates and number of -pages. +http://www.whatdotheyknow.com/request/determination_of_pricing_for_pro#incoming-2902 +(search for it!) Next ==== -Clear out all the need admin attention requests -Clear out all the need classifying requests - Internal review status/marker? Request withdrawn by user status/marker? Comments interleaved with body + - Email people when comments on their own request Redo the RSS feeds - Look at Rob's TWFY.nz interface @@ -57,6 +52,9 @@ There is grey on grey text in header? bad idea? Make it clearer people should ask for documents http://www.whatdotheyknow.com/request/unusual_markings_in_the_uk_skies +Clear out all the need admin attention requests +Clear out all the need classifying requests + Later ===== |