diff --git a/app/views/public_pages/plan_export.pdf.erb b/app/views/public_pages/plan_export.pdf.erb index af374d6..73fa294 100644 --- a/app/views/public_pages/plan_export.pdf.erb +++ b/app/views/public_pages/plan_export.pdf.erb @@ -26,27 +26,29 @@

<%= _("Creator(s): ") + @creator_text %>


<%= _("Affiliation: ") + @affiliation %>


<% if @funder.present? %> -

<%= _("Funder: ") + @funder %>


+

<%= _("Template: ") + @funder %>


<% else %>

<%= _("Template: ") + @template + @customizer %>


<% end %> <% if @plan.grant_number.present? %> -

<%= _("Grant Number: ") + @plan.grant_number %>


+

<%= _("Grant number: ") + @plan.grant_number %>


<% end %> <% if @plan.description.present? %> -

<%= _("Description: ") + @plan.description %>


+

<%= _("Project abstract: ") %>

+
<%= raw(@plan.description) %>

<% end %> -

<%= _("Last Updated: ") + @plan.updated_at.to_date.to_s %>


+

<%= _("Last modified: ") + @plan.updated_at.to_date.to_s %>


-

<%= _("Copyright information: The above plan creator(s) have agreed that others may use as much of the text of this plan as they would like in their own plans, and customise it as necessary. You do not need to credit the creator(s) as the source of the language used, but using any of the plan's text does not imply that the creator(s) endorse, or have any relationship to, your project or proposal") %>

+

<%= _("Copyright information:") %>

+

<%= _(" The above plan creator(s) have agreed that others may use as much of the text of this plan as they would like in their own plans, and customise it as necessary. You do not need to credit the creator(s) as the source of the language used, but using any of the plan's text does not imply that the creator(s) endorse, or have any relationship to, your project or proposal") %>

<% @phases.each do |phase| %>
-

<%= phase.title %>

+ +

<%= (@phases.length > 1 ? "#{@plan.title} - #{phase.title}" : @plan.title) %>

<% Section.where(phase_id: phase.id, id: @a_s_ids).order(:number).each do |section| %>

<%= section.title %>

<% Question.where(section_id: section, id: @a_q_ids).order(:number).each do |question| %>
-

<%= raw question.text %>

<% answer = @plan.answer(question.id, false) %> <% if answer.nil? %>

<%= _('Question not answered.') -%>

diff --git a/app/views/public_pages/template_export.docx.erb b/app/views/public_pages/template_export.docx.erb index b2932b6..d47507e 100644 --- a/app/views/public_pages/template_export.docx.erb +++ b/app/views/public_pages/template_export.docx.erb @@ -1,30 +1,36 @@ -
-

<%= @template.title %>

-

<%= _("A Data Management Plan created using ") + Rails.configuration.branding[:application][:name] + "." %>

-
-

<%= _("Organisation: ") + @template.org.name %>


-<% if @template.description.present? %> -

<%= _("Description: ")%><%= raw(@template.description) %>


-<% end %> -
- -<% @template.phases.each do |phase| %> - -
-

<%= phase.title %>

- <% phase.sections.each do |section| %> -

<%= section.title %>

- <% section.questions.each do |question|%> -

<%= raw question.text %>

- <% q_format = question.question_format %> - <% if q_format.option_based? %> - + <% question.annotations.each do |annotation| %> +
+

<%= annotation.type == 0 ? _('Example Answer') : _('Guidance') %>:

+ <%= raw annotation.text %> + <% end %> +
+ <% end %> <% end %> -
<% end %> - <% end %> -<% end %> + + \ No newline at end of file diff --git a/app/views/public_pages/template_export.pdf.erb b/app/views/public_pages/template_export.pdf.erb index 3252a60..076b5d9 100644 --- a/app/views/public_pages/template_export.pdf.erb +++ b/app/views/public_pages/template_export.pdf.erb @@ -18,24 +18,14 @@ -
-

<%= @template.title %>

-

<%= _("A Data Management Plan created using ") + Rails.configuration.branding[:application][:name] + "." %>

-
-
-

<%= _("Organisation: ") + @template.org.name %>


- <% if @template.description.present? %> -

<%= _("Description: ")%><%= raw(@template.description) %>

- <% end %> - <% @template.phases.each do |phase| %>
-

<%= phase.title %>

+

<%= "#{@template.org.name}: #{@template.title}" %><%= @template.phases.length > 1 ? " - #{phase.title}" : "" %>

<% phase.sections.each do |section| %>

<%= section.title %>

<% section.questions.each do |question| %>
-

<%= raw question.text %>

+

<%= raw question.text %>

<% q_format = question.question_format %> <% if q_format.option_based? %> <% end %>
+
+ <% question.annotations.each do |annotation| %> +
+

<%= annotation.type == 0 ? _('Example Answer') : _('Guidance') %>:

+
<%= raw annotation.text %>
+ <% end %> +
<% end %> <% end %> <% end %>