Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix regression as introduced by commit #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading