diff options
Diffstat (limited to 'app/views/user/show.rhtml')
-rw-r--r-- | app/views/user/show.rhtml | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml index 17fc0c46d..63f9fe3a0 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.rhtml @@ -116,19 +116,34 @@ </div> </div> <div style="clear:both"></div> + <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %> + <div> + <%= text_field_tag(:user_query, params[:user_query]) %> + <% if @is_you %> + <%= submit_tag(_("Search your contributions")) %> + <% else %> + <%= submit_tag(_("Search contributions by this person")) %> + <% end %> + </div> + <% end %> + <% if !@xapian_requests.nil? %> <% if @xapian_requests.results.empty? %> <% if @page == 1 %> - <h2 class="foi_results" id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> </h2> + <h2 class="foi_results" id="foi_requests"><%= @is_you ? 'Freedom of Information requests made by you' : 'Freedom of Information requests made by this person' %> <%= @match_phrase %> +</h2> <p><%= @is_you ? _('You have made no Freedom of Information requests using this site.') : _('This person has made no Freedom of Information requests using this site.') %> + <%= @page_desc %> <% end %> <% else %> <h2 class="foi_results" id="foi_requests"> - <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @display_user.info_requests.size) % @display_user.info_requests.size %> + <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.results.size) % @xapian_requests.results.size : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.results.size) % @xapian_requests.results.size %> <!-- matches_estimated <%=@xapian_requests.matches_estimated%> --> - <%= @page_desc %> + <%= @match_phrase %> + <%= @page_desc %> </h2> + <% for result in @xapian_requests.results %> <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> @@ -144,7 +159,9 @@ <% if !@xapian_comments.nil? %> <% if @xapian_comments.results.empty? %> <% if @page == 1 %> - <h2><%= @is_you ? _('Your annotations') : _('This person\'s annotations') %></h2> + <h2><%= @is_you ? _('Your annotations') : _('This person\'s annotations') %> + <%= @match_phrase %> + </h2> <p><%= _('None made.')%></p> <% end %> <% else %> @@ -213,6 +230,3 @@ <% end %> <% end %> <% end %> - -</div> - |