aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/similar.html.erb
blob: 0d53f691904a173c4da1080de2aa7fa468fdf924 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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) %>