Replace Handson table in reports with simple table [SCI-3636] (#1895)

* Replace handsone table in reports with simple table

* Add result tables
This commit is contained in:
aignatov-bio 2019-07-08 13:19:12 +02:00 committed by GitHub
parent bdd1ca2a65
commit 01a01157d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 54 additions and 6 deletions

View file

@ -68,6 +68,28 @@ label {
}
}
.report-common-table-format {
width: 100%;
tr {
td,
th {
border: 1px solid $color-silver;
padding: 5px;
span {
display: inline-block;
min-height: 19px;
}
}
th {
background: $color-concrete;
}
}
}
/* New page content */
#report-new {

View file

@ -28,8 +28,20 @@
</div>
<div class="report-element-body">
<% if rows_json[:data].count > 0 %>
<input type="hidden" class="hot-table-contents hot-samples" value='<%= rows_json.to_json.force_encoding(Encoding::UTF_8) %>' />
<div class="hot-table-container"></div>
<table class="report-common-table-format">
<tr>
<% rows_json[:headers].each do |cell| %>
<th><span><%= cell %></span></th>
<% end %>
</tr>
<% rows_json[:data].each do |row| %>
<tr>
<% row.each do |cell| %>
<td><span><%= cell %></span></td>
<% end %>
</tr>
<% end %>
</table>
<% else %>
<div class="row">
<div class="col-xs-12">

View file

@ -34,8 +34,15 @@
</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>
<table class="report-common-table-format">
<% JSON.parse(table.contents_utf_8)['data'].each do |row| %>
<tr>
<% row.each do |cell| %>
<td><span><%= cell %></span></td>
<% end %>
</tr>
<% end %>
</table>
</div>
<div class="report-element-children">
<%= children if (defined? children and children.present?) %>

View file

@ -29,8 +29,15 @@
</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>
<table class="report-common-table-format">
<% JSON.parse(table.contents_utf_8)['data'].each do |row| %>
<tr>
<% row.each do |cell| %>
<td><span><%= cell %></span></td>
<% end %>
</tr>
<% end %>
</table>
</div>
<div class="report-element-children">
<%= children if (defined? children and children.present?) %>