1
0

Readouts table improvements

This commit is contained in:
cryptogopher 2019-12-23 15:17:26 +01:00
parent df15ae746c
commit e7edfb465f
2 changed files with 8 additions and 5 deletions

View File

@ -7,11 +7,12 @@
<% total_width = 3 + @quantities.length %> <% total_width = 3 + @quantities.length %>
<th style="width:<%= 2 * 100/total_width%>%"><%= l(:field_taken_at_date) %></th> <th style="width:<%= 2 * 100/total_width%>%"><%= l(:field_taken_at_date) %></th>
<% @quantities.each do |q| %> <% @quantities.each do |q| %>
<th style="width:<%= 100/total_width %>%"><%= q.name %> <th style="width:<%= 100/total_width %>%">
<div style="float:right;"> <div style="float:right;">
<%= link_to '', toggle_column_measurement_path(@measurement, quantity_id: q.id), <%= link_to '', toggle_column_measurement_path(@measurement, quantity_id: q.id),
{class: "icon icon-close", method: :post, remote: true} %> {class: "icon icon-close", method: :post, remote: true} %>
</div> </div>
<%= q.name %>
</th> </th>
<% end %> <% end %>
<th style="width:<%= 100/total_width %>%"><%= l(:field_action) %></th> <th style="width:<%= 100/total_width %>%"><%= l(:field_action) %></th>
@ -40,8 +41,8 @@
<span class="icon icon-bullet-closed"><%= format_datetime(m) %></span> <span class="icon icon-bullet-closed"><%= format_datetime(m) %></span>
</td> </td>
<% @requested_r[index].each do |q_name, value| %> <% @requested_r[index].each do |q_name, value| %>
<td class="primary"> <td class="primary quantity">
<p class="quantity"><%= q_name %></p> <%= q_name %>
<p class="value"><%= format_value(value) %></p> <p class="value"><%= format_value(value) %></p>
</td> </td>
<% end %> <% end %>
@ -52,8 +53,8 @@
<% @extra_r[index].each_slice(@quantities.length).with_index do |values| %> <% @extra_r[index].each_slice(@quantities.length).with_index do |values| %>
<tr class="extra <%= row_class %>" style="display:none"> <tr class="extra <%= row_class %>" style="display:none">
<% values.each do |q_name, value| %> <% values.each do |q_name, value| %>
<td class="extra"> <td class="extra quantity">
<p class="quantity"><%= q_name %></p> <%= q_name %>
<p class="value"><%= format_value(value) %></p> <p class="value"><%= format_value(value) %></p>
</td> </td>
<% end %> <% end %>

View File

@ -12,6 +12,8 @@ table.list .value {text-align: right;}
table.list td.action, table.list td.action,
table.list td.date {white-space: nowrap;} table.list td.date {white-space: nowrap;}
table.list th {padding-right: 0;}
table.list th, table.list th,
table.list td.name, table.list td.name,
table.list td.quantity, table.list td.quantity,