aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/public_body/list.rhtml
blob: 5d88b1501ca41f953c3bff223c07790731da4e83 (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
51
52
53
54
<div id="body_sidebar">

    <h1><%=_('Show only...')%></h1>

    <h2><%=_('Alphabet') %></h2>
    <ul><li>
        <%= render :partial => 'alphabet' %>
    </li></ul>

    <% first_row = true %>
    <% for row in PublicBodyCategories::CATEGORIES_WITH_HEADINGS %>
        <% if row.instance_of?(Array) %>
            <li>
            <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %> 
            </li>
        <% else %>
            <% if not first_row %>
                </ul>
            <% else %>
                <% first_row = false %>
            <% end %>
            <h2><%=h row%></h2>
            <ul>
        <% end %>
    <% end %>
    </ul>

    <p>
	<%= _('<a href="%s">Are we missing a public authority?</a>.') % [help_requesting_path + '#missing_body'] %>
    </p>
    <p>
      <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %>
    </p>

</div>

<% @title = _("Public authorities - {{description}}", :description => @description) %>

<h1><%=@title%></h1>

<p class="subtitle">
    <%= @public_bodies.size %> <%= _('in total') %>
	(<%= _('<a href="%s">can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %>)
</p>

<% if @tag.size == 1 %>
    <p><%= render :partial => 'alphabet' %></p>
<% end %>
<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>
<% if @tag.size == 1 && @public_bodies.size > 0 %>
    <p><%= render :partial => 'alphabet' %></p>
<% end %>

<%= will_paginate(@public_bodies) %>