Commit e323a4c4 authored by OskarStenberg's avatar OskarStenberg
Browse files

Bugfix

parent 04249a6f
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Labels</title>
</head>
<body>
<?php
$settings->labels_width = $settings->labels_width - $settings->labels_display_sgutter;
$settings->labels_height = $settings->labels_height - $settings->labels_display_bgutter;
// 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 - 0.1;
?>
<style>
body {
font-family: arial, helvetica, sans-serif;
width: {{ $settings->labels_pagewidth }}in;
height: {{ $settings->labels_pageheight }}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;
}
.label {
width: {{ $settings->labels_width }}in;
height: {{ $settings->labels_height }}in;
padding: 0in;
margin-right: {{ $settings->labels_display_sgutter }}in; /* the gutter */
margin-bottom: {{ $settings->labels_display_bgutter }}in;
display: inline-block;
overflow: hidden;
}
.page-break {
page-break-after:always;
}
div.qr_img {
width: {{ $qr_size }}in;
height: {{ $qr_size }}in;
float: left;
display: inline-flex;
padding-right: .15in;
}
img.qr_img {
width: 120.79%;
height: 120.79%;
margin-top: -6.9%;
margin-left: -6.9%;
padding-bottom: .04in;
}
img.barcode {
display:block;
padding-top: .11in;
width: 100%;
}
div.label-logo {
float: right;
display: inline-block;
}
img.label-logo {
height: 0.5in;
}
.qr_text {
width: {{ $settings->labels_width }}in;
height: {{ $settings->labels_height }}in;
padding-top: {{$settings->labels_display_bgutter}}in;
font-family: arial, helvetica, sans-serif;
font-size: {{$settings->labels_fontsize}}pt;
padding-right: .0001in;
overflow: hidden !important;
display: inline;
word-wrap: break-word;
word-break: break-all;
}
div.barcode_container {
width: 100%;
display: inline;
overflow: hidden;
}
.next-padding {
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
}
@media print {
.noprint {
display: none !important;
}
.next-padding {
margin: {{ $settings->labels_pmargin_top }}in {{ $settings->labels_pmargin_right }}in {{ $settings->labels_pmargin_bottom }}in {{ $settings->labels_pmargin_left }}in;
font-size: 0;
}
}
@media screen {
.label {
outline: .02in black solid; /* outline doesn't occupy space like border does */
}
.noprint {
font-size: 13px;
padding-bottom: 15px;
}
}
@if ($snipeSettings->custom_css)
{{ $snipeSettings->show_custom_css() }}
@endif
</style>
@foreach ($consumables as $consumable)
<?php $count++; ?>
<div class="label">
@if ($settings->qr_code=='1')
<div class="qr_img">
<img src="./{{ $consumable->id }}/qr_code" class="qr_img">
</div>
@endif
<div class="qr_text">
<div class="pull-left">
N: {{ $consumable->name }}
</div>
@if ($settings->label_logo)
<div class="label-logo">
<img class="label-logo" src="{{ Storage::disk('public')->url('').e($snipeSettings->label_logo) }}">
</div>
@endif
@if ($settings->qr_text!='')
<div class="pull-left">
<strong>{{ $settings->qr_text }}</strong>
<br>
</div>
@endif
@if (($settings->labels_display_company_name=='1') && ($consumable->company_id))
<div class="pull-left">
C: {{ $consumable->company_id }}
</div>
@endif
@if (($settings->labels_display_name=='1') && ($consumable->name))
<div class="pull-left">
N: {{ $consumable->name }}
</div>
@endif
@if (($settings->labels_display_model=='1') && ($consumable->category->name!=''))
<div class="pull-left">
M: {{ $consumable->category->name }}
</div>
@endif
</div>
@if ((($settings->alt_barcode_enabled=='1') && $settings->alt_barcode!=''))
<div class="barcode_container">
<img src="./{{ $consumable->id }}/barcode" class="barcode">
</div>
@endif
</div>
@if ($count % $settings->labels_per_page == 0)
<div class="page-break"></div>
<div class="next-padding">&nbsp;</div>
@endif
@endforeach
</body>
</html>
@extends('layouts/default')
{{-- Page title --}}
@section('title')
{{ trans('admin/consumables/general.view') }} {{ $consumable->name }}
@parent
@stop
{{-- Page content --}}
@section('content')
<div class="row header">
<div class="col-md-12">
<h2 class="name">
{{ trans('admin/consumables/general.view') }}
@if ($consumable->name)
({{ $consumable->name }})
@endif
</h2>
<div class="btn-group pull-right">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
<span class="caret"></span>
</button>
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a href="{{ route('consumables.edit', $consumable->id) }}">{{ trans('admin/consumables/general.edit') }}</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="user-profile">
<div class="row profile">
<div class="col-md-9 bio">
<div class="col-md-12">
@if ($consumable->manufacturer)
<div class="col-md-12" style="padding-bottom: 5px;">
<strong>{{ trans('admin/consumables/form.manufacturer') }}: </strong>
<a href="{{ route('manufacturers.edit', $consumable->manufacturer->id) }}">
{{ $consumable->manufacturer->name }}
</a>
</div>
@endif
@if ($consumable->purchase_date)
<div class="col-md-12" style="padding-bottom: 5px;">
<strong>{{ trans('admin/consumables/form.date') }}: </strong>
{{ $consumable->purchase_date }}
</div>
@endif
@if ($consumable->purchase_cost)
<div class="col-md-12" style="padding-bottom: 5px;">
<strong>{{ trans('admin/consumables/form.cost') }}:</strong>
{{ $snipeSettings->default_currency }}
{{ number_format($consumable->purchase_cost,2) }}
</div>
@endif
@if ($consumable->order_number)
<div class="col-md-12" style="padding-bottom: 5px;">
<strong>{{ trans('admin/consumables/form.order') }}:</strong>
{{ $consumable->order_number }}
</div>
@endif
@if ($consumable->supplier_id)
<div class="col-md-6" style="padding-bottom: 5px;">
<strong>{{ trans('admin/consumables/form.supplier') }}: </strong>
<a href="{{ route('suppliers.show', $consumable->supplier_id) }}">
{{ $consumable->supplier->name }}
</a>
</div>
@endif
</div>
</div> <!--/.col-md-9.bio-->
<!-- side address column -->
<div class="col-md-3">
<!-- Consumable notes -->
@if ($consumable->notes)
<h6>{{ trans('admin/consumables/form.notes') }}:</h6>
<div class="break-word">{{ nl2br(e($consumable->notes)) }}</div>
@endif
@if ($qr_code->display)
<h6>{{ trans('admin/consumables/form.qr') }}</h6>
<ul>
<li>
<img src="{{ $qr_code->url }}" />
</li>
</ul>
@endif
</div> <!-- /.col-md-3-->
</div> <!--/.row.profile-->
</div> <!--/.user-profile-->
@stop
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment