diff --git a/app/models/exported_plan.rb b/app/models/exported_plan.rb index 5684072..c3c07bc 100644 --- a/app/models/exported_plan.rb +++ b/app/models/exported_plan.rb @@ -128,6 +128,8 @@ value = self.send(at) if value.present? output += admin_field_t(at.to_s) + ": " + value + "\n" + else + output += admin_field_t(at.to_s) + ": " + _('-') + "\n" end end diff --git a/app/views/plans/export.html.erb b/app/views/plans/export.html.erb index 990af6c..8e79cc4 100644 --- a/app/views/plans/export.html.erb +++ b/app/views/plans/export.html.erb @@ -22,7 +22,7 @@ %>

- <%= admin_field_t(field.to_s) -%>

- <%= value.present? ? value : _('-') -%> + <%= value.present? ? value : _('-') %> <% end %> diff --git a/app/views/plans/export.pdf.erb b/app/views/plans/export.pdf.erb index c41b244..874acd4 100644 --- a/app/views/plans/export.pdf.erb +++ b/app/views/plans/export.pdf.erb @@ -21,9 +21,10 @@

<%= @plan.title %>

<% @exported_plan.admin_details.each do |field| value = @exported_plan.send(field) - if value.present? - %> -

<%= admin_field_t(field.to_s) -%> <%= value -%>

+ if value.present? %> +

<%= admin_field_t(field.to_s) -%> <%= value -%>

+ <% else %> +

<%= admin_field_t(field.to_s) -%> <%= _('-') %>

<% end %> <% end %>