mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 22:19:41 -08:00
987536930c
* Fix some n+1 problems * Use route in notification dropdown to make sure we link to correct page * Work on better UI support for checkout to non-user. Fix links on index bootstrap table, work towards eliminating assignedUser * Remove Asset::assigneduser() relationship. Instead add a checkedOutToUser() method and/or port to using assignedTo() * Adjust string to fit new reality * Fix #3780. Move the consumables getDataView method to the ApiController. Not entirely RESTful, but it's a weird method that probably doesn't need its own controller and the functionality would be strange to stack on the userscontroller... * Fix file uploads to assets and restore the delete route. * Add asset maintence edit action to index. * Suppliers asset list should link to the related asset, not to the supplier with same ID. * Asset models page should use polymorphic formatter on assigned to to better handle assorted item types. * Comment out more assigneduser fallacy until we figure out the query builder approach to searching for location text.
113 lines
3.6 KiB
PHP
113 lines
3.6 KiB
PHP
@extends('layouts/default')
|
|
|
|
{{-- Page title --}}
|
|
@section('title')
|
|
{{ $consumable->name }}
|
|
{{ trans('general.consumable') }}
|
|
@parent
|
|
@stop
|
|
|
|
@section('header_right')
|
|
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
|
{{ trans('general.back') }}</a>
|
|
@stop
|
|
|
|
|
|
{{-- Page content --}}
|
|
@section('content')
|
|
|
|
<div class="row">
|
|
<div class="col-md-9">
|
|
<div class="box box-default">
|
|
@if ($consumable->id)
|
|
<div class="box-header with-border">
|
|
<div class="box-heading">
|
|
<h3 class="box-title"> {{ $consumable->name }}</h3>
|
|
</div>
|
|
</div><!-- /.box-header -->
|
|
@endif
|
|
|
|
<div class="box-body">
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="table table-responsive">
|
|
<table
|
|
name="consumable_users"
|
|
class="table table-striped snipe-table"
|
|
id="table"
|
|
data-url="{{route('api.consumables.showUsers', $consumable->id)}}"
|
|
data-cookie="true"
|
|
data-click-to-select="true"
|
|
data-cookie-id-table="consumableDetailTable-{{ config('version.hash_version') }}"
|
|
>
|
|
<thead>
|
|
<tr>
|
|
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
|
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
|
|
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="admin">{{ trans('general.admin') }}</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
</div> <!-- /.col-md-12-->
|
|
|
|
</div>
|
|
</div>
|
|
</div> <!-- /.box.box-default-->
|
|
</div> <!-- /.col-md-9-->
|
|
<div class="col-md-3">
|
|
|
|
<h4>{{ trans('admin/consumables/general.about_consumables_title') }}</h4>
|
|
<p>{{ trans('admin/consumables/general.about_consumables_text') }} </p>
|
|
|
|
@if ($consumable->purchase_date)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('general.purchase_date') }}: </strong>
|
|
{{ $consumable->purchase_date }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($consumable->purchase_cost)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('general.purchase_cost') }}:</strong>
|
|
{{ $snipeSettings->default_currency }}
|
|
{{ \App\Helpers\Helper::formatCurrencyOutput($consumable->purchase_cost) }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($consumable->item_no)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('admin/consumables/general.item_no') }}:</strong>
|
|
{{ $consumable->item_no }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($consumable->model_number)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('general.model_no') }}:</strong>
|
|
{{ $consumable->model_number }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($consumable->manufacturer)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('general.manufacturer') }}:</strong>
|
|
{{ $consumable->manufacturer->name }}
|
|
</div>
|
|
@endif
|
|
|
|
@if ($consumable->order_number)
|
|
<div class="col-md-12" style="padding-bottom: 5px;">
|
|
<strong>{{ trans('general.order_number') }}:</strong>
|
|
{{ $consumable->order_number }}
|
|
</div>
|
|
@endif
|
|
</div> <!-- /.col-md-3-->
|
|
</div> <!-- /.row-->
|
|
|
|
@stop
|
|
|
|
@section('moar_scripts')
|
|
@include ('partials.bootstrap-table', ['exportFile' => 'consumable' . $consumable->name . '-export', 'search' => false])
|
|
@stop
|