Skip to content

Commit

Permalink
fix regression as introduced by commit 6b54456
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasfranck committed Nov 29, 2024
1 parent 6843ed9 commit c063f09
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions app/views/branded/shared/export/_plan_coversheet.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,13 @@
<div class="cover-page">
<p><b><%= _("Title: ") %></b><%= @hash[:title] %></p><br>

<p><strong><%= _("Creator:") %></strong><%= @hash[:attribution] %></p><br>

<%# Added contributors to coverage of plans.
# Users will see both roles and contributor names if the role is filled %>
<%# Roles are ranked by PI -> DM -> PA -> Other (if any) %>
<% if @hash[:investigation].present? %>
<p><b><%= _("Principal Investigator: ") %></b><%= @hash[:investigation].map(&:name).join(', ') %></p><br>
<% end %>
<% if @hash[:data_curation].present? %>
<p><b><%= _("Data Manager: ") %></b><%= @hash[:data_curation].map(&:name).join(', ') %></p><br>
<% end %>
<% if @hash[:pa].present? %>
<p><b><%= _("Project Administrator: ") %></b><%= @hash[:pa].map(&:name).join(', ') %></p><br>
<% end %>
<p>
<% owner_and_coowners = @plan.owner_and_coowners %>
<b><%= owner_and_coowners.size > 1 ? _("Creators: ") : _("Creator: ") %></b>
<%= owner_and_coowners.map { |u| u.name_with_orcid }
.join(", ")
.html_safe %>
</p><br>

<p><b><%= _("Affiliation: ") %></b><%= @hash[:affiliation] %></p><br>

Expand Down Expand Up @@ -49,6 +42,16 @@

<% end %>

<% admins = @plan.contributors.project_administration.all %>
<% if admins.size > 0 %>
<p>
<b>Project Administrator:</b>
<%= admins.map { |c| c.to_user.name_with_orcid }
.join(", ")
.html_safe %>
</p><br>
<% end %>

<% if @plan.description.present? %>
<p><b><%= _("Project abstract: ") %></b></p>
<div style="margin-left: 15px;"><%= sanitize(@plan.description) %></div><br>
Expand Down

0 comments on commit c063f09

Please sign in to comment.