aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/similar.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/request/similar.html.erb')
-rw-r--r--app/views/request/similar.html.erb23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb
new file mode 100644
index 000000000..0d53f6919
--- /dev/null
+++ b/app/views/request/similar.html.erb
@@ -0,0 +1,23 @@
+<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %>
+<h1><%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %></h1>
+
+<!-- Important terms: <%= @xapian_object.important_terms.join(" ") %> -->
+
+<% if @xapian_object.results.empty? %>
+ <p><%= _('No similar requests found.')%></p>
+<% else %>
+ <!--
+ <p class="subtitle">
+ <%= @xapian_object.matches_estimated %> in total
+ </p>
+ -->
+ <% for result in @xapian_object.results %>
+ <% if result[:model].class.to_s == 'InfoRequestEvent' %>
+ <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
+ <% else %>
+ <p><strong><%= _('Unexpected search result type ')%><%=result[:model].class.to_s%></strong></p>
+ <% end %>
+ <% end %>
+<% end %>
+
+<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %>