Minor fix for assets & tables naming in export all PDF

This commit is contained in:
Matej Zrimšek 2018-09-06 19:14:50 +02:00
parent 0ebce8e283
commit 6f77c4772c
2 changed files with 2 additions and 2 deletions

View file

@ -66,7 +66,7 @@ module ReportsHelper
obj_name = if element['type_of'] == 'result_asset'
Asset.find(element[:result_id]).file_file_name
else
Table.find(element[:result_id]).result.name
locals[:name] = Result.find(element[:result_id]).name
end
obj_folder_name = 'Results attachments'
parent_module = parent

View file

@ -10,7 +10,7 @@
<% if defined? path and path.present? %>
<a href="<%= path %>">
<em><%=t 'projects.reports.elements.step_table.table_name',
name: truncate(table && table.name ? "#{table.name}.csv" : "#{table.step.name}.csv",
name: truncate(table && table.name.present? ? "#{table.name}.csv" : "#{table.step.name}.csv",
length: Constants::FILENAME_TRUNCATION_LENGTH) %></em>
</a>
<% else %>