templates/pane.html.erb in proforma-html-renderer-1.0.0 vs templates/pane.html.erb in proforma-html-renderer-1.0.1
- old
+ new
@@ -8,14 +8,16 @@
["font-weight: #{options.bold_weight}"].tap do |styles|
styles << "width: #{column.label_width}%" if column.label_width
end.join(';')
end
- def value_cell_style(column)
+ def value_cell_style(column, last)
return unless column
- [].tap do |styles|
+ right_padding = last ? 0 : 20
+
+ ["padding-right: #{right_padding}px"].tap do |styles|
styles << "text-align: #{column.align}" if !column.align.to_s.empty?
styles << "width: #{column.value_width}%" if column.value_width
end.join(';')
end
%>
@@ -26,10 +28,10 @@
<tr>
<% (0...col_count).each do |col_index| -%>
<% column = object.columns[col_index] -%>
<% line = column&.lines[row_index] -%>
<td style="<%= label_cell_style(column) -%>"><%= line&.label %></td>
- <td style="<%= value_cell_style(column) -%>"><%= line&.value %></td>
+ <td style="<%= value_cell_style(column, col_index >= col_count-1) -%>"><%= line&.value %></td>
<% end -%>
<tr>
<% end -%>
</tbody>
</table>