diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-01-23 13:56:55 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-02-20 11:59:04 +0000 |
commit | 11b09a64ff1d4b8bc4f3ff32b700ba5fbd000aab (patch) | |
tree | 762ed9f58390d0aa96f9cfe81ee9803ff2e4ce2a | |
parent | 6bd64b7225eb5626bcbd1ef554995ff717756d33 (diff) |
Use new style when we do display a request link.
Move reasons for not having a link to a similar position to the link,
after the rest of the text.
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb index c27057605..771027622 100644 --- a/app/views/public_body/_body_listing_single.html.erb +++ b/app/views/public_body/_body_listing_single.html.erb @@ -20,24 +20,25 @@ <span class="bottomline"> <%= n_('{{count}} request made.', '{{count}} requests made.', public_body.info_requests.size, :count => public_body.info_requests.size) %> - <% if !public_body.is_requestable? && public_body.not_requestable_reason != 'bad_contact' %> - <% if public_body.not_requestable_reason == 'not_apply' %> - <%= _('FOI law does not apply to this authority.')%> - <% elsif 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"> <%= _("Added on {{date}}", :date => simple_date(public_body.created_at)) %>. </span> + <br> + <% if !public_body.is_requestable? && public_body.not_requestable_reason != 'bad_contact' %> + <% if public_body.not_requestable_reason == 'not_apply' %> + <%= _('FOI law does not apply to this authority.')%> + <% elsif public_body.not_requestable_reason == 'defunct' %> + <%= _('Defunct.')%> + <% end %> + <% end %> </span> - <div class="make-request-quick-button"> - <a class="link_button_green" href="#">Make a request</a> - </div> + <% if @include_request_link_in_authority_listing %> + <% if public_body.is_requestable? || public_body.not_requestable_reason == 'bad_contact' %> + <div class="make-request-quick-button"> + <%= link_to _("Make a request"), new_request_to_body_path(:url_name => public_body.url_name), :class => "link_button_green" %> + </div> + <% end %> + <% end %> </div> |