mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
74516da01a
Update reports for plate templates and add headers to docx tables [SCI-8375]
36 lines
1.3 KiB
Text
36 lines
1.3 KiB
Text
<% table ||= report_element.table %>
|
|
<% timestamp = table.created_at %>
|
|
<div class="report-element report-step-attachment-element report-step-table-element">
|
|
<div class="report-element-header">
|
|
<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 %>
|
|
<% end %>
|
|
</div>
|
|
<div class="user-time">
|
|
<%= t("projects.reports.elements.#{table_type}.user_time", timestamp: l(timestamp, format: :full)) %>
|
|
</div>
|
|
</div>
|
|
<div class="report-element-body">
|
|
<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 %>" />
|
|
<div class="hot-table-container"></div>
|
|
<table class="report-common-table-format"></table>
|
|
</div>
|
|
<% if defined?(children) %>
|
|
<div class="report-element-children">
|
|
<%= children %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|