aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2013-07-16 16:11:57 +0100
committerMatthew Somerville <matthew@mysociety.org>2013-07-17 09:30:49 +0100
commit76acc3c8ef538e173c31294424fb09f4644248fb (patch)
treeecc3815bbe7764151e727f0aa2238791d18de572
parent1b10a1be3c223d8a802940f6730832f141dd52b9 (diff)
Say Defunct instead of Make your own request in listings.
Also don't show 'Make your own request' unless it's requestable.
-rw-r--r--app/views/public_body/_body_listing_single.html.erb10
1 files changed, 8 insertions, 2 deletions
diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb
index 8e0a64df7..91a07d09c 100644
--- a/app/views/public_body/_body_listing_single.html.erb
+++ b/app/views/public_body/_body_listing_single.html.erb
@@ -20,8 +20,14 @@
<span class="bottomline">
<%= n_('{{count}} request made.', '{{count}} requests made.', public_body.info_requests.size,
:count => public_body.info_requests.size) %>
- <% if !@include_request_link_in_authority_listing.nil? %>
- <%= link_to _("Make your own request"), public_body_path(public_body) %>.
+ <% if !public_body.is_requestable? && public_body.not_requestable_reason != 'bad_contact' %>
+ <% if public_body.not_requestable_reason == 'defunct' %>
+ <%= _('Defunct.') %>
+ <% end %>
+ <% else %>
+ <% if !@include_request_link_in_authority_listing.nil? %>
+ <%= link_to _("Make your own request"), public_body_path(public_body) %>.
+ <% end %>
<% end %>
<br>
<span class="date_added">