diff options
Diffstat (limited to 'app/views')
-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 |
9 files changed, 55 insertions, 119 deletions
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 } %> |