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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
<% @title = h(@public_body.name) + _(" - view and make Freedom of Information requests") %>
<div id="main_content">
<div id="header_right">
<h2><%= _('Follow this authority')%></h2>
<% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %>
<p>
<%= n_("{{count}} person is following this authority",
"{{count}} people are following this authority",
follower_count,
:count => content_tag(:span, follower_count, :id => "follow_count")) %>
</p>
<%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %>
<%= render :partial => 'more_info', :locals => { :public_body => @public_body } %>
</div>
<div id="header_left">
<p class="public-body-name-prefix"><%= _("Freedom of information requests to") %></p>
<h1><%=h(@public_body.name)%></h1>
<p class="subtitle">
<%=@public_body.type_of_authority(true)%><% if not @public_body.short_name.empty? %>,
<%= _('also called {{public_body_short_name}}', :public_body_short_name => h(@public_body.short_name))%><% end %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to _("admin"), admin_body_show_path(@public_body) %>)
<% end %>
</p>
<% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
<% if @public_body.has_notes? %>
<p><%= @public_body.notes_as_html.html_safe %></p>
<% end %>
<% if @public_body.eir_only? %>
<p><%= _('You can only request information about the environment from this authority.')%></p>
<% end %>
<% else %>
<% if @public_body.not_requestable_reason == 'not_apply' %>
<p><%= _('Freedom of Information law does not apply to this authority, so you cannot make
a request to it.')%></p>
<% elsif @public_body.not_requestable_reason == 'defunct' %>
<p><%= _('This authority no longer exists, so you cannot make a request to it.')%></p>
<% else %>
<p><%= _('For an unknown reason, it is not possible to make a request to this authority.')%></p>
<% end %>
<% end %>
<div id="stepwise_make_request">
<% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %>
<%= link_to _("Make a request to this authority"), new_request_to_body_path(:url_name => @public_body.url_name), :class => "link_button_green" %>
<% elsif @public_body.has_notes? %>
<%= @public_body.notes_as_html.html_safe %>
<% end %>
<% if @public_body.override_request_email %>
<p>
<%= _("<strong>Note:</strong> Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %>
</p>
<% end %>
</div>
</div>
<div id="foi_results_section">
<% if @public_body.info_requests.size == 0 %>
<% if @public_body.is_requestable? or @public_body.not_requestable_reason != 'defunct' %>
<% if @public_body.eir_only? %>
<h2><%= _('Environmental Information Regulations requests made using this site') %></h2>
<p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p>
<% else %>
<h2><%= _('Freedom of Information requests made using this site')%></h2>
<p><%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%></p>
<% end %>
<% end %>
<% else %>
<h2 class="foi_results">
<% if @public_body.eir_only? %>
<%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %>
<% else %>
<% if @public_body.info_requests.size > 4 %>
<%= n_('Search within the {{count}} Freedom of Information requests to {{public_body_name}}', 'Search within the {{count}} Freedom of Information requests made to {{public_body_name}}', @public_body.info_requests.size, :count => @public_body.info_requests.size, :public_body_name => @public_body.name) %>
<% else %>
<%= n_('{{count}} Freedom of Information request to {{public_body_name}}',
'{{count}} Freedom of Information requests to {{public_body_name}}',
@public_body.info_requests.size,
:count => @public_body.info_requests.size,
:public_body_name => @public_body.name) %>
<% end %>
<% end %>
<%= @page_desc %>
</h2>
<a name="results"></a>
<% if @public_body.info_requests.size > 4 %>
<%= render :partial => 'request/request_filter_form' %>
<% end %>
<% end %>
<div style="clear:both"> </div>
<% if !@xapian_requests.nil? %>
<% for result in @xapian_requests.results %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model] } %>
<% end %>
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %>
<% if @xapian_requests.results.empty? %>
<p><% _('There were no requests matching your query.') %></p>
<% else %>
<p>
<%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>
<%= link_to _('?'), help_about_path %>
</p>
<% end %>
<% else %>
<% if @public_body.eir_only? %>
<h2><%= _('Environmental Information Regulations requests made') %></h2>
<% else %>
<h2> <%= _('Freedom of Information requests made')%></h2>
<% end %>
<p> <%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%></p>
<% end %>
</div>
</div>
|