mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-12 16:44:08 -08:00
Merge pull request #8088 from Godmartinz/Label_Woes
Barcode resizing and text adjustment
This commit is contained in:
commit
beae8efb21
|
@ -12,12 +12,9 @@
|
||||||
$settings->labels_height = $settings->labels_height - $settings->labels_display_bgutter;
|
$settings->labels_height = $settings->labels_height - $settings->labels_display_bgutter;
|
||||||
// Leave space on bottom for 1D barcode if necessary
|
// Leave space on bottom for 1D barcode if necessary
|
||||||
$qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='') ? $settings->labels_height - .3 : $settings->labels_height - .3;
|
$qr_size = ($settings->alt_barcode_enabled=='1') && ($settings->alt_barcode!='') ? $settings->labels_height - .3 : $settings->labels_height - .3;
|
||||||
// Leave space on left for QR code if necessary
|
|
||||||
$qr_txt_size = ($settings->qr_code=='1' ? $settings->labels_width - $qr_size - .1: $settings->labels_width);
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: arial, helvetica, sans-serif;
|
font-family: arial, helvetica, sans-serif;
|
||||||
width: {{ $settings->labels_pagewidth }}in;
|
width: {{ $settings->labels_pagewidth }}in;
|
||||||
|
@ -25,7 +22,6 @@
|
||||||
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
|
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
|
||||||
font-size: {{ $settings->labels_fontsize }}pt;
|
font-size: {{ $settings->labels_fontsize }}pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
width: {{ $settings->labels_width }}in;
|
width: {{ $settings->labels_width }}in;
|
||||||
height: {{ $settings->labels_height }}in;
|
height: {{ $settings->labels_height }}in;
|
||||||
|
@ -35,53 +31,52 @@
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-break {
|
.page-break {
|
||||||
page-break-after:always;
|
page-break-after:always;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.qr_img {
|
div.qr_img {
|
||||||
width: {{ $qr_size }}in;
|
width: {{ $qr_size }}in;
|
||||||
height: {{ $qr_size }}in;
|
height: {{ $qr_size }}in;
|
||||||
|
|
||||||
float: left;
|
float: left;
|
||||||
display: inline-block;
|
display: inline-flex;
|
||||||
padding-right: .04in;
|
padding-right: .15in;
|
||||||
}
|
}
|
||||||
img.qr_img {
|
img.qr_img {
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
width: 120.79%;
|
||||||
|
height: 120.79%;
|
||||||
|
margin-top: -6.9%;
|
||||||
|
margin-left: -6.9%;
|
||||||
|
padding-bottom: .04in;
|
||||||
}
|
}
|
||||||
img.barcode {
|
img.barcode {
|
||||||
display:block;
|
display:block;
|
||||||
margin-left: auto;
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
padding-top: .11in;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.qr_text {
|
.qr_text {
|
||||||
width: {{ $qr_txt_size }}in;
|
width: 100%;
|
||||||
height: {{ $qr_size }}in;
|
height: auto;
|
||||||
padding-top: .10in;
|
padding-top: {{$settings->labels_display_bgutter}}in;
|
||||||
font-family: arial, helvetica, sans-serif;
|
font-family: arial, helvetica, sans-serif;
|
||||||
|
font-size: x-small;
|
||||||
padding-right: .01in;
|
padding-right: .01in;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
display: inline-block;
|
display: inline;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.barcode_container {
|
div.barcode_container {
|
||||||
float: left;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: inline;
|
display: inline;
|
||||||
height: 50px;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.next-padding {
|
.next-padding {
|
||||||
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
|
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@media print {
|
@media print {
|
||||||
.noprint {
|
.noprint {
|
||||||
display: none !important;
|
display: none !important;
|
||||||
|
@ -91,7 +86,6 @@
|
||||||
font-size: 0;
|
font-size: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen {
|
@media screen {
|
||||||
.label {
|
.label {
|
||||||
outline: .02in black solid; /* outline doesn't occupy space like border does */
|
outline: .02in black solid; /* outline doesn't occupy space like border does */
|
||||||
|
@ -101,11 +95,9 @@
|
||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if ($snipeSettings->custom_css)
|
@if ($snipeSettings->custom_css)
|
||||||
{{ $snipeSettings->show_custom_css() }}
|
{{ $snipeSettings->show_custom_css() }}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@foreach ($assets as $asset)
|
@foreach ($assets as $asset)
|
||||||
|
|
Loading…
Reference in a new issue