scinote-web/app/views/reports/elements/_step_table_element.html.erb

37 lines
1.3 KiB
Text
Raw Normal View History

2021-06-10 16:59:34 +08:00
<% table ||= report_element.table %>
2016-07-21 19:11:15 +08:00
<% timestamp = table.created_at %>
2021-06-10 16:59:34 +08:00
<div class="report-element report-step-attachment-element report-step-table-element">
2016-02-12 23:52:43 +08:00
<div class="report-element-header">
2022-05-31 20:40:25 +08:00
<div class="table-name">
<% if defined? export_all and export_all %>
<% file_link = @obj_filenames.dig(:tables, table.id, :file) %>
<a href="<%= file_link %>">
<em>
<%= file_link&.split('/')&.last %>
</em>
</a>
<% else %>
<% if table.try(:name) %>
<em>
<%= truncate(table.name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>
</em>
<% end %>
2022-05-31 20:40:25 +08:00
<% end %>
</div>
<div class="user-time">
<%= t('projects.reports.elements.step_table.user_time', timestamp: l(timestamp, format: :full)) %>
2016-02-12 23:52:43 +08:00
</div>
</div>
<div class="report-element-body">
2019-07-15 19:27:27 +08:00
<input type="hidden" class="hot-table-contents" value="<%= table.contents_utf_8 %>" />
<input type="hidden" class="hot-table-metadata" value="<%= table.metadata ? table.metadata.to_json : nil %>" />
2019-07-15 19:27:27 +08:00
<div class="hot-table-container"></div>
<table class="report-common-table-format"></table>
2016-02-12 23:52:43 +08:00
</div>
<% if defined?(children) %>
<div class="report-element-children">
<%= children %>
</div>
<% end %>
</div>