We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d4edbf commit 3771e76Copy full SHA for 3771e76
1 file changed
app/views/publications/show.html.erb
@@ -11,17 +11,14 @@
11
</h2>
12
<%= render partial: 'basic_info', locals: { publication: @publication } %>
13
<dt>
14
+ <% n = @publication.publication_authors.size %>
15
<%= fa_icon('user-friends') %>
- <%= @publication.publication_authors.size == 1 ? 'Author' : 'Authors' %>
16
+ <%= n == 1 ? 'Author' : 'Authors' %>
17
</dt>
18
<dd>
19
<% @publication.publication_authors.each_with_index do |p_author, k| %>
20
<% author = p_author.author %>
- <%= '; ' if k > 0 %>
21
- <%= link_to author.full_name, author %>
22
- <% if p_author.sequence %>
23
- (<%= p_author.sequence %>)
24
- <% end %>
+ <%= link_to author.full_name, author %><%= '; ' if k < n - 1 %>
25
<% end %>
26
</dd>
27
<dt><%= fa_icon('calendar-day') %> Publication date</dt>
0 commit comments