Skip to content

Commit 3771e76

Browse files
committed
Update show.html.erb
1 parent 2d4edbf commit 3771e76

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

app/views/publications/show.html.erb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@
1111
</h2>
1212
<%= render partial: 'basic_info', locals: { publication: @publication } %>
1313
<dt>
14+
<% n = @publication.publication_authors.size %>
1415
<%= fa_icon('user-friends') %>
15-
<%= @publication.publication_authors.size == 1 ? 'Author' : 'Authors' %>
16+
<%= n == 1 ? 'Author' : 'Authors' %>
1617
</dt>
1718
<dd>
1819
<% @publication.publication_authors.each_with_index do |p_author, k| %>
1920
<% author = p_author.author %>
20-
<%= '; ' if k > 0 %>
21-
<%= link_to author.full_name, author %>
22-
<% if p_author.sequence %>
23-
(<%= p_author.sequence %>)
24-
<% end %>
21+
<%= link_to author.full_name, author %><%= '; ' if k < n - 1 %>
2522
<% end %>
2623
</dd>
2724
<dt><%= fa_icon('calendar-day') %> Publication date</dt>

0 commit comments

Comments
 (0)