aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/request/list.rhtml
blob: 28dc55cdffa5ff02e4d28733cfc8a659efaaab0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<div id="header_left">
  <h1><%=@title%></h1>
  <%= render :partial => 'request/request_filter_form' %>
</div>

<div id="header_right">
  <h2>Track these requests</h2>
  <% if @track_thing %>
      <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %>
  <% end %>
</div>

<div style="clear:both"></div>

<div class="results_section">
  <% view_cache :ttl => 5.minutes, :tag => [@view, @page, I18n.locale] do %>
      <% if @list_results.empty? %>
          <p> <%= _('No requests of this sort yet.')%></p>
      <% else %>
          <h2 class="foi_results"><%= _('{{count}} FOI requests found', :count => @list_results.size) %></h2>
          <div class="results_block">
            <% for result in @list_results%>
                <% if result.class.to_s == 'InfoRequestEvent' %>
                    <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %>
                <% else %>
                    <p><strong><%= _('Unexpected search result type') %> <%=result.class.to_s%></strong></p>
                <% end %>
            <% end %>
          </div>
      <% end %>

      <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @matches_estimated) %>
  <% end %>
</div>