mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-01 00:47:27 -08:00
Merge branch 'develop'
This commit is contained in:
commit
f7c92f61e1
|
@ -143,5 +143,24 @@ class ProfileController extends Controller
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a page with the API token generation interface.
|
||||
*
|
||||
* We created a controller method for this because closures aren't allowed
|
||||
* in the routes file if you want to be able to cache the routes.
|
||||
*
|
||||
* @author [A. Gianotto] [<snipe@snipe.net>]
|
||||
* @since [v4.0]
|
||||
* @return View
|
||||
*/
|
||||
|
||||
public function getMenuState(Request $request) {
|
||||
if ($request->input('state')=='open') {
|
||||
$request->session()->put('menu_state', 'open');
|
||||
} else {
|
||||
$request->session()->put('menu_state', 'closed');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/css/dist/all.css
vendored
BIN
public/css/dist/all.css
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/js/dist/all.js
vendored
BIN
public/js/dist/all.js
vendored
Binary file not shown.
|
@ -1,10 +1,14 @@
|
|||
{
|
||||
"/js/build/vue.js": "/js/build/vue.js?id=e9504cad01a748f9b0fa",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css?id=889dc040f2ddfca6efde",
|
||||
"/css/app.css": "/css/app.css?id=3a1e8c168fa8714043a6",
|
||||
"/css/overrides.css": "/css/overrides.css?id=3911514a8a64a4247483",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=f2d4896e67e878a47434",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=15363bc14ab0694d1275",
|
||||
"/css/build/all.css": "/css/build/all.css?id=f2d4896e67e878a47434",
|
||||
"/js/build/all.js": "/js/build/all.js?id=15363bc14ab0694d1275"
|
||||
"/js/build/vue.js": "/js/build/vue.js?id=e6804371942215bd1d7d",
|
||||
"/css/AdminLTE.css": "/css/AdminLTE.css?id=b8be19a285eaf44eec37",
|
||||
"/css/app.css": "/css/app.css?id=407edb63cc6b6dc62405",
|
||||
"/css/overrides.css": "/css/overrides.css?id=9ae1a3c861441320c5a1",
|
||||
"/js/build/vue.js.map": "/js/build/vue.js.map?id=3b3d417664a61dcce3e9",
|
||||
"/css/AdminLTE.css.map": "/css/AdminLTE.css.map?id=99f5a5a03c4155cf69f6",
|
||||
"/css/app.css.map": "/css/app.css.map?id=bdbe05e6ecd70ccfac72",
|
||||
"/css/overrides.css.map": "/css/overrides.css.map?id=898c91d4a425b01b589b",
|
||||
"/css/dist/all.css": "/css/dist/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/dist/all.js": "/js/dist/all.js?id=f14abfc2506d42ffb0f5",
|
||||
"/css/build/all.css": "/css/build/all.css?id=7c3842d2639193ac7e88",
|
||||
"/js/build/all.js": "/js/build/all.js?id=f14abfc2506d42ffb0f5"
|
||||
}
|
|
@ -180,6 +180,17 @@ $(document).ready(function () {
|
|||
}
|
||||
$('.datepicker').datepicker();
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#toggle_nav").toggle(function() {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -27,120 +27,127 @@
|
|||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="assets">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@if ($assets->count() > 0)
|
||||
@if ($assets->count() > 0)
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||
@endif
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.status') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||
@endif
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/table.status') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
|
||||
<tr>
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<td>{!! $asset->model->present()->nameUrl() !!}</td>
|
||||
<tr>
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset', 'itemId' => $asset->id])}}" method="POST" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<td>{!! $asset->model->present()->nameUrl() !!}</td>
|
||||
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
|
||||
<td><a href="{{ $asset->present()->viewUrl() }}">{{ $asset->serial }}</a></td>
|
||||
<td><a href="{{ $asset->present()->viewUrl() }}">{{ $asset->serial }}</a></td>
|
||||
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{!! $asset->assetloc->present()->nameUrl() !!}
|
||||
@endif
|
||||
</td>
|
||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||
<td>Checked out</td>
|
||||
@else
|
||||
<td>{{ trans('admin/hardware/general.requestable') }}</td>
|
||||
@endif
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{!! $asset->assetloc->present()->nameUrl() !!}
|
||||
@endif
|
||||
</td>
|
||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||
<td>Checked out</td>
|
||||
@else
|
||||
<td>{{ trans('admin/hardware/general.requestable') }}</td>
|
||||
@endif
|
||||
|
||||
<td>{{ $asset->expected_checkin }}</td>
|
||||
<td>
|
||||
@if ($asset->isRequestedBy(Auth::user()))
|
||||
{{Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
|
||||
@else
|
||||
{{Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
|
||||
@endif
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@else
|
||||
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<td>{{ $asset->expected_checkin }}</td>
|
||||
<td>
|
||||
@if ($asset->isRequestedBy(Auth::user()))
|
||||
{{Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
|
||||
@else
|
||||
{{Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
|
||||
@endif
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="models">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
@if ($models->count() > 0)
|
||||
<h4>Requestable Models</h4>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-6" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('general.quantity') }}</th>
|
||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@if ($models->count() > 0)
|
||||
<h4>Requestable Models</h4>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-6" bSortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-3" bSortable="true">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
<th class="col-md-2" bSortable="true">{{ trans('general.quantity') }}</th>
|
||||
<th class="col-md-1 actions" bSortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($models as $requestableModel)
|
||||
<tr>
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
||||
method="POST"
|
||||
accept-charset="utf-8"
|
||||
>
|
||||
{{ csrf_field() }}
|
||||
<td>{{$requestableModel->name}}</td>
|
||||
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
|
||||
<td><input type="text" name="request-quantity" value=""></td>
|
||||
<td>
|
||||
@if ($requestableModel->isRequestedBy(Auth::user()))
|
||||
{{Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
|
||||
@else
|
||||
{{Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
|
||||
@endif
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<tbody>
|
||||
@foreach($models as $requestableModel)
|
||||
<tr>
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
||||
method="POST"
|
||||
accept-charset="utf-8"
|
||||
>
|
||||
{{ csrf_field() }}
|
||||
<td>{{$requestableModel->name}}</td>
|
||||
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
|
||||
<td><input type="text" name="request-quantity" value=""></td>
|
||||
<td>
|
||||
@if ($requestableModel->isRequestedBy(Auth::user()))
|
||||
{{Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
|
||||
@else
|
||||
{{Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
|
||||
@endif
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ trans('general.no_results') }}
|
||||
@else
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div> <!-- .tab-content-->
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
<title>
|
||||
@section('title')
|
||||
@show
|
||||
|
||||
:: {{ $snipeSettings->site_name }}
|
||||
</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
|
@ -29,6 +28,7 @@
|
|||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
window.Laravel = { csrfToken: '{{ csrf_token() }}' };
|
||||
|
||||
</script>
|
||||
|
||||
<style nonce="{{ csrf_token() }}">
|
||||
|
@ -89,7 +89,7 @@
|
|||
@endif
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="hold-transition skin-blue sidebar-mini sidebar-collapse">
|
||||
<body class="sidebar-mini skin-blue {{ (session('menu_state')!='open') ? 'sidebar-mini sidebar-collapse' : '' }}">
|
||||
<div class="wrapper">
|
||||
|
||||
<header class="main-header">
|
||||
|
@ -732,11 +732,31 @@
|
|||
<script nonce="{{ csrf_token() }}">
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
})
|
||||
|
||||
$('body').bind('expanded.pushMenu', function() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "{{ route('account.menuprefs', ['state'=>'open']) }}",
|
||||
_token: "{{ csrf_token() }}"
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('body').bind('collapsed.pushMenu', function() {
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "{{ route('account.menuprefs', ['state'=>'close']) }}",
|
||||
_token: "{{ csrf_token() }}"
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
|
||||
event.preventDefault();
|
||||
$(this).ekkoLightbox();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
@if ((Session::get('topsearch')=='true') || (Request::is('/')))
|
||||
|
|
|
@ -233,6 +233,8 @@ Route::group([ 'prefix' => 'account', 'middleware' => ['auth']], function () {
|
|||
Route::get('profile', [ 'as' => 'profile', 'uses' => 'ProfileController@getIndex' ]);
|
||||
Route::post('profile', 'ProfileController@postIndex');
|
||||
|
||||
Route::get('menu', [ 'as' => 'account.menuprefs', 'uses' => 'ProfileController@getMenuState' ]);
|
||||
|
||||
Route::get('password', [ 'as' => 'account.password.index', 'uses' => 'ProfileController@password' ]);
|
||||
Route::post('password', [ 'uses' => 'ProfileController@passwordSave' ]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue