<commit_before>@extends('backend/layouts/default')

{{-- Page title --}}
@section('title')
@lang('admin/hardware/general.view') {{ $asset->asset_tag }} ::
@parent
@stop

{{-- Page content --}}
@section('content')

<div class="row header">
    <div class="col-md-12">
    	<div class="btn-group pull-right">
			<button class="btn glow">@lang('button.actions')</button>
			<button class="btn glow dropdown-toggle" data-toggle="dropdown">
				<span class="caret"></span>
			</button>
			<ul class="dropdown-menu">

				@if ($asset->status_id == 1)
					@if ($asset->assigned_to != 0)
						<li><a href="{{ route('checkin/hardware', $asset->id) }}">@lang('admin/hardware/general.checkin')</a></li>
					@endif
				@elseif ($asset->status_id == 0)
						<li><a href="{{ route('checkout/hardware', $asset->id) }}">@lang('admin/hardware/general.checkout')</a></li>
				@endif
				<li><a href="{{ route('update/hardware', $asset->id) }}">@lang('admin/hardware/general.edit')</a></li>
				<li><a href="{{ route('clone/hardware', $asset->id) }}">@lang('admin/hardware/general.clone')</a></li>
			</ul>
		</div>
		<h3>
		<h3 class="name">
		@lang('admin/hardware/general.view') {{ $asset->asset_tag }}

		{{ $asset->asset_tag }}
		@if ($asset->name)
		({{ $asset->name }})
		@endif
	</h3>
	</div>
</div>

<div class="user-profile">
<div class="row profile">
<div class="col-md-9 bio">

	<div class="col-md-12" style="min-height: 130px;">

		@if ($asset->model->manufacturer)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.manufacturer'): </strong>
			{{ $asset->model->manufacturer->name }} </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.model'):</strong>
			{{ $asset->model->name }} / {{ $asset->model->modelno }}</div>
		@endif

		@if ($asset->purchase_date)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.date'): </strong>
			{{ $asset->purchase_date }} </div>
		@endif

		@if ($asset->purchase_cost)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.cost'):</strong>
			@lang('general.currency')
			{{ number_format($asset->purchase_cost,2) }} </div>
		@endif

		@if ($asset->order_number)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.order'):</strong>
			{{ $asset->order_number }} </div>
		@endif

		@if ($asset->warranty_months)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.warranty'):</strong>
			{{ $asset->warranty_months }}
			@lang('admin/hardware/form.months')
			</div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.expires'):</strong>
			{{ $asset->warrantee_expires() }}</div>
		@endif

		@if ($asset->depreciation)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.depreciation'): </strong>
			{{ $asset->depreciation->name }}
				({{ $asset->depreciation->months }} months)</div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.depreciates_on'): </strong>
			{{ $asset->depreciated_date() }} </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.fully_depreciated'): </strong>
			{{ $asset->months_until_depreciated()->m }}
			@lang('admin/hardware/form.months'),
			{{ $asset->months_until_depreciated()->y }}
			@lang('admin/hardware/form.years')</div>
		@endif

		@if ($asset->model->eol)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.eol_rate'): </strong>
			{{ $asset->model->eol }}
			@lang('admin/hardware/form.months') </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.eol_date'): </strong>
			{{ $asset->eol_date() }}
			@if ($asset->months_until_eol())
				 ({{ $asset->months_until_eol()->y }} years,
				{{ $asset->months_until_eol()->m }} months)
			@endif
			</div>
		@endif

	</div>


		<!-- checked out assets table -->

		<table class="table table-hover">
			<thead>
				<tr>
					<th class="col-md-1"></th>
					<th class="col-md-3"><span class="line"></span>Date</th>
					<th class="col-md-2"><span class="line"></span>Admin</th>
					<th class="col-md-2"><span class="line"></span>Action</th>
					<th class="col-md-2"><span class="line"></span>User</th>
					<th class="col-md-3"><span class="line"></span>Note</th>
				</tr>
			</thead>
			<tbody><commit_msg>Nicer formatting when 0 years<commit_after>@extends('backend/layouts/default')

{{-- Page title --}}
@section('title')
@lang('admin/hardware/general.view') {{ $asset->asset_tag }} ::
@parent
@stop

{{-- Page content --}}
@section('content')

<div class="row header">
    <div class="col-md-12">
    	<div class="btn-group pull-right">
			<button class="btn glow">@lang('button.actions')</button>
			<button class="btn glow dropdown-toggle" data-toggle="dropdown">
				<span class="caret"></span>
			</button>
			<ul class="dropdown-menu">

				@if ($asset->status_id == 1)
					@if ($asset->assigned_to != 0)
						<li><a href="{{ route('checkin/hardware', $asset->id) }}">@lang('admin/hardware/general.checkin')</a></li>
					@endif
				@elseif ($asset->status_id == 0)
						<li><a href="{{ route('checkout/hardware', $asset->id) }}">@lang('admin/hardware/general.checkout')</a></li>
				@endif
				<li><a href="{{ route('update/hardware', $asset->id) }}">@lang('admin/hardware/general.edit')</a></li>
				<li><a href="{{ route('clone/hardware', $asset->id) }}">@lang('admin/hardware/general.clone')</a></li>
			</ul>
		</div>
		<h3>
		<h3 class="name">
		@lang('admin/hardware/general.view') {{ $asset->asset_tag }}

		{{ $asset->asset_tag }}
		@if ($asset->name)
		({{ $asset->name }})
		@endif
	</h3>
	</div>
</div>

<div class="user-profile">
<div class="row profile">
<div class="col-md-9 bio">

	<div class="col-md-12" style="min-height: 130px;">

		@if ($asset->model->manufacturer)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.manufacturer'): </strong>
			{{ $asset->model->manufacturer->name }} </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.model'):</strong>
			{{ $asset->model->name }} / {{ $asset->model->modelno }}</div>
		@endif

		@if ($asset->purchase_date)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.date'): </strong>
			{{ $asset->purchase_date }} </div>
		@endif

		@if ($asset->purchase_cost)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.cost'):</strong>
			@lang('general.currency')
			{{ number_format($asset->purchase_cost,2) }} </div>
		@endif

		@if ($asset->order_number)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.order'):</strong>
			{{ $asset->order_number }} </div>
		@endif

		@if ($asset->warranty_months)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.warranty'):</strong>
			{{ $asset->warranty_months }}
			@lang('admin/hardware/form.months')
			</div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.expires'):</strong>
			{{ $asset->warrantee_expires() }}</div>
		@endif

		@if ($asset->depreciation)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.depreciation'): </strong>
			{{ $asset->depreciation->name }}
				({{ $asset->depreciation->months }}
				@lang('admin/hardware/form.months')
				)</div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.depreciates_on'): </strong>
			{{ $asset->depreciated_date() }} </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.fully_depreciated'): </strong>
			{{ $asset->months_until_depreciated()->m }}
			@lang('admin/hardware/form.months')
			 @if ($asset->months_until_depreciated()->y > 0)
			, {{ $asset->months_until_depreciated()->y }}
			@lang('admin/hardware/form.years')
			 @endif
			 </div>
		@endif

		@if ($asset->model->eol)
			<div class="col-md-6"><strong>@lang('admin/hardware/form.eol_rate'): </strong>
			{{ $asset->model->eol }}
			@lang('admin/hardware/form.months') </div>
			<div class="col-md-6"><strong>@lang('admin/hardware/form.eol_date'): </strong>
			{{ $asset->eol_date() }}
			@if ($asset->months_until_eol())
				 (
				 @if ($asset->months_until_eol()->y > 0)
				 {{ $asset->months_until_eol()->y }}
				  @lang('admin/hardware/form.years'),
				 @endif

				{{ $asset->months_until_eol()->m }}
				@lang('admin/hardware/form.months')
				)
			@endif
			</div>
		@endif

	</div>


		<!-- checked out assets table -->

		<table class="table table-hover">
			<thead>
				<tr>
					<th class="col-md-1"></th>
					<th class="col-md-3"><span class="line"></span>Date</th>
					<th class="col-md-2"><span class="line"></span>Admin</th>
					<th class="col-md-2"><span class="line"></span>Action</th>
					<th class="col-md-2"><span class="line"></span>User</th>
					<th class="col-md-3"><span class="line"></span>Note</th>
				</tr>
			</thead>
			<tbody>
{'fraction_non_alphanumeric': 0.2503499766682221, 'fraction_numerical': 0.008049463369108726, 'mean_word_length': 4.075784487862641, 'pattern_counts': {'":': 0, '<': 233, '<?xml version=': 0, '>': 339, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5513786', 'n_tokens_mistral': 3653, 'n_tokens_neox': 3158, 'n_words': 433}