Skip to content

Commit 22738d1

Browse files
committed
Additional index canonicals provided
1 parent 4e7f48b commit 22738d1

4 files changed

Lines changed: 22 additions & 3 deletions

File tree

app/views/genomes/index.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
2+
<%
3+
npar = {}
4+
ppar = { page: params[:page] || 1 }.merge(npar)
5+
%>
6+
<% provide(:canonical_url, canonical_url(ppar)) %>
17
<%= download_buttons(
2-
[[genomes_url(format: :json), 'file-code', 'JSON']]
8+
[[genomes_url(ppar.merge(format: :json)), 'file-code', 'JSON']]
39
) %>
410

511
<h1>

app/views/publications/index.html.erb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
<%
2+
npar = {}
3+
npar[:sort] = @sort if @sort.present?
4+
ppar = { page: params[:page] || 1 }.merge(npar)
5+
%>
6+
<% provide(:canonical_url, canonical_url(ppar)) %>
17
<%= download_buttons(
2-
[[publications_url(format: :json), 'file-code', 'JSON']]
8+
[[publications_url(ppar.merge(format: :json)), 'file-code', 'JSON']]
39
) %>
410

511
<h1>
@@ -13,7 +19,8 @@
1319
<b>Sort by</b>
1420
<% %w[date names].map do |sort| %>
1521
<span class="text-muted"></span>
16-
<%= sort == @sort ? sort : link_to(sort, publications_path(sort: sort)) %>
22+
<%= sort == @sort ?
23+
sort : link_to(sort, publications_path(sort: sort)) %>
1724
<% end %>
1825
<br/>
1926
<b>Browse by</b>

app/views/publications/show.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<% provide(:title, @publication.title) %>
2+
<% provide(:canonical_url, canonical_url) %>
23
<%= download_buttons(
34
[[publication_url(@publication, format: :json), 'file-code', 'JSON']]) %>
45
<h1><%= @publication.title_html %></h1>

app/views/strains/index.html.erb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<%
2+
npar = {}
3+
ppar = { page: params[:page] || 1 }.merge(npar)
4+
%>
5+
<% provide(:canonical_url, canonical_url(ppar)) %>
16
<div class="text-right pt-4 float-right"><%= list_type_selector %></div>
27
<h1>
38
Strains

0 commit comments

Comments
 (0)