% @title = h(@display_user.name) + (@is_you ? " (you)" : "") %>
<% if (@same_name_users.size >= 1) %>
Please go to the following requests, and let us
know if there was information in the recent responses to them.
<% for undescribed_request in @undescribed_requests %>
- <%=request_link(undescribed_request)%>
<% end %>
Thanks very much - this will help others find useful stuff. We'll
also, if you need it, give advice on what to do next about your
requests.
<% end %>
<%=@title%>
Joined WhatDoTheyKnow in <%= year_from_date(@display_user.created_at) %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to "admin", user_admin_url(@display_user) %>)
<% end %>
<%= link_to "Send message to " + h(@display_user.name), contact_user_url(:id => @display_user.id) %>
<% if @is_you %>
(just to see how it works)
<%= link_to "Change your password", signchange_url() %>
<% end %>
<% if not @is_you %>
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.
<% end %>
<% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.empty? %>
<% if @page == 1 %>
Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %>
<%= @is_you ? 'You have' : 'This person has' %>
made no Freedom of Information requests using this site.
<% end %>
<% else %>
<%= @is_you ? 'Your ' : "This person's " %>
<%=pluralize(@display_user.info_requests.size, "Freedom of Information request") %>
<%= @page_desc %>
<% for result in @xapian_requests.results %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
<% end %>
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.info_requests.size) %>
<% end %>
<% else %>
Freedom of Information requests made by <%= @is_you ? 'you' : 'this person' %>
The search index is currently offline, so we can't show the Freedom of Information requests this person has made.
<% end %>
<% if !@xapian_comments.nil? %>
<% if @xapian_comments.results.empty? %>
<% if @page == 1 %>
<%= @is_you ? 'Your' : 'This person\'s' %> annotations
None made.
<% end %>
<% else %>
<%= @is_you ? 'Your ' : "This person's " %>
<%=pluralize(@display_user.visible_comments.size, "annotation") %>
<%= @page_desc %>
<% for result in @xapian_comments.results %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
<% end %>
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @display_user.visible_comments.size) %>
<% end %>
<% end %>
<% if @is_you and not @track_things.empty? %>
Your <%=pluralize(@track_things.size, "email subscription") %>
<% if @track_things_grouped.size == 1 %>
<% form_tag :controller => 'track', :action => 'delete_all_type' do %>
<%=TrackThing.track_type_description(@track_things[0].track_type)%>
<%= hidden_field_tag 'track_type', @track_things[0].track_type %>
<%= hidden_field_tag 'user', @display_user.id %>
<%= hidden_field_tag 'r', request.request_uri %>
<% if @track_things.size > 1 %>
<%= submit_tag "unsubscribe all" %>
<% end %>
<% end %>
<% end %>
<% for track_type, track_things in @track_things_grouped %>
<% if @track_things_grouped.size > 1 %>
<% form_tag :controller => 'track', :action => 'delete_all_type' do %>
<%=TrackThing.track_type_description(track_type)%>
<%= hidden_field_tag 'track_type', track_type %>
<%= hidden_field_tag 'user', @display_user.id %>
<%= hidden_field_tag 'r', request.request_uri %>
<% if track_things.size > 1 %>
<%= submit_tag "unsubscribe all" %>
<% end %>
<% end %>
<% end %>
<% for track_thing in track_things %>
-
<% form_tag :controller => 'track', :action => 'update', :track_id => track_thing.id do %>
<%= track_thing.params[:list_description] %>
<%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %>
<%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %>
<%= submit_tag "unsubscribe" %>
<% end %>
<% end %>
<% end %>
<% end %>