Skip to content
Browse files

Add a 'view all' link to consultations.

I've copied the mechanism used in
c9c93bb, but we can think about how
to improve this.
  • Loading branch information...
1 parent c947ee9 commit a8cfa08e65c22c9fb525cf6e58f42cc1b378949b @lazyatom lazyatom committed
Showing with 4 additions and 1 deletion.
  1. +3 −0 app/views/documents/_consultations.html.erb
  2. +1 −1 app/views/organisations/show.html.erb
View
3 app/views/documents/_consultations.html.erb
@@ -7,6 +7,9 @@
<%= link_to consultation.title, public_document_path(consultation), title: "View #{consultation.title}" %>
<% end %>
<% end %>
+ <% if local_assigns.has_key?(:more) %>
+ <li><%= more %></li>
+ <% end %>
</ul>
</section>
<% end %>
View
2 app/views/organisations/show.html.erb
@@ -62,7 +62,7 @@
<div class="g1 related_documents"><%= render partial: "documents/publications", object: @publications %></div>
<div class="g1 related_documents"><%= render partial: "corporate_publications", object: @corporate_publications %></div>
<div class="g1 related_documents"><%= render partial: "documents/speeches", object: @speeches %></div>
- <div class="g1 related_documents"><%= render partial: "documents/consultations", object: @consultations %></div>
+ <div class="g1 related_documents"><%= render partial: "documents/consultations", object: @consultations, locals: { more: safe_join(['View all', @organisation.name, link_to('consultations', consultations_organisation_path(@organisation))], ' ') } %></div>
<% if @organisation.child_organisations.any? %>
<div class="g1 related_documents">

0 comments on commit a8cfa08

Please sign in to comment.
Something went wrong with that request. Please try again.