aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/frontpage.rhtml
blob: e0b1f75cf1dcdbfd141403172527389060b406a9 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<div id="frontpage_search">
    <h1>Make or explore Freedom of Information requests</h1>

    <% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>
       <p>
           First, type in the <strong>name of the UK public authority</strong> you'd 
           <br>like information from. <strong>By law, they have to respond</strong>
           (<a href="/help/about">why?</a>).
           <br>
            
           <br>
           <%= text_field_tag 'query', params[:query], { :size => 30 } %>
           <%= hidden_field_tag 'bodies', 1 %>
           <%= submit_tag "Search" %>
           <br>
           e.g. <%=link_to 'Liverpool', search_url('liverpool', 'bodies')%>, <%=link_to 'MRSA', search_url('mrsa', 'bodies')%>, <%=link_to 'Treasury', search_url('treasury', 'bodies')%>

           <br>
           <br>
           OR, <strong>search</strong> for information others have requested.
       </p>
    <% end %>
</div>

<div id="frontpage_examples">
    <% if @popular_bodies.size > 0 %>
        <div id="examples_0">
            <ul>
            <% for popular_body in @popular_bodies %>
                <li><%=public_body_link(popular_body)%> </li>
            <% end%>
            </ul>
            <p><strong>
                <%= link_to "More authorities...", list_public_bodies_default %>
            </strong></p>
        </div>
    <% end %>

    <% if @successful_requests.size > 0 %>
        <div id="examples_1">
            <ul>
            <% for request in @successful_requests %>
                <li><%=link_to h(excerpt(request.title, "", 35)), request_url(request)%> </li>
            <% end %>
            </ul>
            <p><strong><a href="/list/successful">More successful requests...</a></strong></p>
        </div>
    <% end %>
</div>