Skip to content

Commit

Permalink
Add a 'view all' link to consultations.
Browse files Browse the repository at this point in the history
I've copied the mechanism used in
c9c93bb, but we can think about how
to improve this.
  • Loading branch information
lazyatom committed Feb 2, 2012
1 parent c947ee9 commit a8cfa08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/views/documents/_consultations.html.erb
Expand Up @@ -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 %>
2 changes: 1 addition & 1 deletion app/views/organisations/show.html.erb
Expand Up @@ -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">
Expand Down

0 comments on commit a8cfa08

Please sign in to comment.