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

30 lines
1.3 KiB
Text
Raw Normal View History

2016-02-12 23:52:43 +08:00
<% if table.blank? and @table.present? then table = @table end %>
2016-07-21 19:11:15 +08:00
<% timestamp = table.created_at %>
<div class="report-element report-step-attachment-element report-step-table-element" data-ts="<%= timestamp.to_i %>" data-type="step_table" data-id='{ "table_id": <%= table.id %> }' data-scroll-id="<%= table.id %>" data-name="<%= table.name %>" data-icon-class="glyphicon glyphicon-th">
2016-02-12 23:52:43 +08:00
<div class="report-element-header">
<div class="row">
<div class="pull-left attachment-icon">
<span class="glyphicon glyphicon-th"></span>
</div>
<% unless table.name.empty? then %>
<div class="pull-left table-name">
<em><%=t 'projects.reports.elements.step_table.table_name', name: table.name %></em>
</div>
<% end %>
2016-02-12 23:52:43 +08:00
<div class="pull-left 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 class="pull-right controls">
<%= render partial: 'reports/elements/element_controls.html.erb' %>
2016-02-12 23:52:43 +08:00
</div>
</div>
</div>
<div class="report-element-body">
<input type="hidden" class="hot-table-contents" value="<%= table.contents_utf_8 %>" />
<div class="hot-table-container"></div>
</div>
<div class="report-element-children">
<%= children if (defined? children and children.present?) %>
</div>
</div>