increase QrCode size; remove serial number from blank contract
This commit is contained in:
@@ -44,6 +44,14 @@ u {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qr-code {
|
||||||
|
margin-right: -30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.do-not-copy-warning {
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.heading-table td {
|
.heading-table td {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ class BlankContract
|
|||||||
end
|
end
|
||||||
|
|
||||||
def to_pdf
|
def to_pdf
|
||||||
kit = PDFKit.new(as_html)
|
kit = PDFKit.new(as_html, margin_right: 1, margin_left: 1, margin_top: 10, margin_bottom: 1)
|
||||||
kit.to_file("tmp/#{filename}")
|
kit.to_file("tmp/#{filename}")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class QrCode
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_base64_png(width = 100, height = 100)
|
def to_base64_png(width = 200, height = 200)
|
||||||
_qr_code.as_png.resize(width, height).to_data_url
|
_qr_code.as_png.resize(width, height).to_data_url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
<div class="page">
|
<div class="page">
|
||||||
<% has_logo = local_assigns[:logo] %>
|
<% has_logo = local_assigns[:logo] %>
|
||||||
<table class="heading-table">
|
<table class="heading-table">
|
||||||
|
<tr>
|
||||||
|
<td> </td>
|
||||||
|
<td class="do-not-copy-warning"><strong><%= t '.do_not_copy_warning' %></strong></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<% if has_logo %>
|
<% if has_logo %>
|
||||||
@@ -11,17 +15,9 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<img src="<%= qr_codes[copy_index] %>" />
|
<img class="qr-code" src="<%= qr_codes[copy_index] %>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td class="serial-number"><%= serial_numbers[copy_index] %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td><strong><%= t '.do_not_copy_warning' %></strong></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
<hr>
|
<hr>
|
||||||
<% if contract_template.body.present? %>
|
<% if contract_template.body.present? %>
|
||||||
|
|||||||
Reference in New Issue
Block a user