diff --git a/app/views/shared/export/_plan.erb b/app/views/shared/export/_plan.erb index 6410732..c5b1ea3 100644 --- a/app/views/shared/export/_plan.erb +++ b/app/views/shared/export/_plan.erb @@ -42,48 +42,50 @@ <% end %> <% section[:questions].each do |question| %> -
- <% answer = @plan.answer(question[:id], false) %> - <% blank = answer.present? ? answer.is_blank? : true %> - <% options = answer.present? ? answer.question_options : [] %> - <% if @show_sections_questions && !@public_plan %> - <% if question[:text].present?%> -

<%= raw question[:text].gsub(/(\s||<\/td>| )*(<\/tr>|)/,"") unless @show_unanswered == false && blank %>

+ <% answer = @plan.answer(question[:id], false) %> + <% blank = answer.present? ? answer.is_blank? : true %> + <% options = answer.present? ? answer.question_options : [] %> + <% unless @show_unanswered == false && blank %> +
+ <% if @show_sections_questions && !@public_plan %> + <% if question[:text].present?%> +

<%= raw question[:text].gsub(/(\s||<\/td>| )*(<\/tr>|)/,"") %>

+ <% end %> <% end %> - <% end %> - <%# case where question has not been answered sufficiently to display%> - <% if @show_unanswered && (answer.blank? || (options.blank? && blank))%> -

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

-
- <% else %> - <%# case where Question has options %> - <% if options.present?%> - - <% end %> - <%# case for RDA answer display %> - <% if question[:format].rda_metadata? && !blank %> - <% ah = answer.answer_hash %> - <% if ah['standards'].present? %> + <%# case where question has not been answered sufficiently to display%> + <% if @show_unanswered && (answer.blank? || (options.blank? && blank))%> +

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

+
+ <% else %> + <%# case where Question has options %> + <% if options.present?%> <% end %> -

<%= raw ah['text'] %>

- <%# case for displaying comments OR text %> - <% elsif !blank %> -

<%= raw answer.text %>

+ <%# case for RDA answer display %> + <% if question[:format].rda_metadata? && !blank %> + <% ah = answer.answer_hash %> + <% if ah['standards'].present? %> + + <% end %> +

<%= raw ah['text'] %>

+ <%# case for displaying comments OR text %> + <% elsif !blank %> +

<%= raw answer.text %>

+ <% end %> +
<% end %> -
- <% end %> -
- <% end %> +
+ <% end %> + <% end %> <% end %> <% end %>