mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Reformat all view files. (#3105)
* Reformat all view files. Check for matching tags and rearrange to make everything line up. * Fix regression on asset create where the log was no longer saved.
This commit is contained in:
parent
cafafe851c
commit
13cf11368f
|
@ -55,7 +55,7 @@ class CategoriesController extends Controller
|
|||
// Show the page
|
||||
$category_types= Helper::categoryTypeList();
|
||||
return View::make('categories/edit')->with('item', new Category)
|
||||
->with('category_types', $category_types);
|
||||
->with('category_types', $category_types);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ class Asset extends Depreciable
|
|||
|
||||
|
||||
if ($this->save()) {
|
||||
$this->logCheckout($note);
|
||||
$log = $this->logCheckout($note);
|
||||
if ((($this->requireAcceptance()=='1') || ($this->getEula())) && ($user->email!='')) {
|
||||
$this->checkOutNotifyMail($log->id, $user, $checkout_at, $expected_checkin, $note);
|
||||
}
|
||||
|
|
|
@ -193,14 +193,13 @@ class AssetPresenter extends Presenter
|
|||
**/
|
||||
public function name()
|
||||
{
|
||||
|
||||
if (empty($this->name)) {
|
||||
if (isset($this->model)) {
|
||||
return $this->model->name.' ('.$this->asset_tag.')';
|
||||
}
|
||||
return $this->asset_tag;
|
||||
} else {
|
||||
return $this->name;
|
||||
return $this->name.' ('.$this->asset_tag.')';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class ConsumablePresenter extends Presenter
|
|||
* Link to this consumables name
|
||||
* @return string
|
||||
*/
|
||||
private function nameUrl()
|
||||
public function nameUrl()
|
||||
{
|
||||
return (string)link_to_route('consumables.show', $this->name, $this->id);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ class UserPresenter extends Presenter
|
|||
$result = [
|
||||
'id' => $this->id,
|
||||
'checkbox' => ($status!='deleted') ? '<div class="text-center hidden-xs hidden-sm"><input type="checkbox" name="edit_user['.e($this->id).']" class="one_required"></div>' : '',
|
||||
'name' => $this->fullName(),
|
||||
'name' => $this->nameUrl(),
|
||||
'jobtitle' => $this->jobtitle,
|
||||
'email' => $this->emailLink(),
|
||||
'username' => $this->username,
|
||||
|
|
|
@ -24,12 +24,10 @@
|
|||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
|
||||
|
||||
@if ($accessory->name)
|
||||
<!-- accessory name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->name }}</p>
|
||||
</div>
|
||||
|
@ -40,13 +38,15 @@
|
|||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $accessory->note) }}</textarea>
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">
|
||||
{{ Input::old('note', $accessory->note) }}
|
||||
</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i>{{ trans('general.checkin') }}</button>
|
||||
|
@ -54,7 +54,7 @@
|
|||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .col-md-10.column -->
|
||||
</div> <!-- .row.form-wrapper -->
|
||||
|
||||
@stop
|
||||
|
|
|
@ -32,28 +32,30 @@
|
|||
@if ($accessory->name)
|
||||
<!-- accessory name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/accessories/general.accessory_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->name }}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/accessories/general.accessory_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($accessory->category->name)
|
||||
<!-- accessory name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/accessories/general.accessory_category') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->category->name }}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/accessories/general.accessory_category') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $accessory->category->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- User -->
|
||||
|
||||
<div class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="assigned_to" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<label for="assigned_to" class="col-md-3 control-label">
|
||||
{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i>
|
||||
</label>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $accessory->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
@ -70,7 +72,6 @@
|
|||
|
||||
@if ($accessory->getEula())
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="hint-block">{{ trans('admin/categories/general.required_eula') }}</p>
|
||||
</div>
|
||||
|
@ -81,10 +82,10 @@
|
|||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .box.box-default -->
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- .col-md-9-->
|
||||
</div> <!-- .row -->
|
||||
|
||||
|
||||
@stop
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
@ -33,9 +32,11 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', [
|
||||
|
@ -44,6 +45,3 @@
|
|||
'columns' => \App\Presenters\AccessoryPresenter::dataTableLayout()
|
||||
])
|
||||
@stop
|
||||
|
||||
|
||||
@stop
|
||||
|
|
|
@ -20,19 +20,24 @@
|
|||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" role="menu" aria-labelledby="dropdownMenu1">
|
||||
@if ($accessory->assigned_to != '')
|
||||
@can('checkin', \App\Models\Accessory::class)
|
||||
<li role="presentation"><a href="{{ route('checkin/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkin') }}</a></li>
|
||||
@endcan
|
||||
@else
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<li role="presentation"><a href="{{ route('checkout/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkout') }}</a></li>
|
||||
@endcan
|
||||
@endif
|
||||
@can('update', \App\Models\Accessory::class)
|
||||
<li role="presentation"><a href="{{ route('accessories.edit', $accessory->id) }}">{{ trans('admin/accessories/general.edit') }}</a></li>
|
||||
@endcan
|
||||
|
||||
@if ($accessory->assigned_to != '')
|
||||
@can('checkin', \App\Models\Accessory::class)
|
||||
<li role="presentation">
|
||||
<a href="{{ route('checkin/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkin') }}</a>
|
||||
</li>
|
||||
@endcan
|
||||
@else
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<li role="presentation">
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}">{{ trans('admin/accessories/general.checkout') }}</a>
|
||||
</li>
|
||||
@endcan
|
||||
@endif
|
||||
@can('update', \App\Models\Accessory::class)
|
||||
<li role="presentation">
|
||||
<a href="{{ route('accessories.edit', $accessory->id) }}">{{ trans('admin/accessories/general.edit') }}</a>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
|
@ -46,46 +51,45 @@
|
|||
<div class="col-md-9">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="accessory_users"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.accessories.view', $accessory->id) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="accessoryUsersTable">
|
||||
|
||||
<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="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="accessory_users"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.accessories.view', $accessory->id) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="accessoryUsersTable"
|
||||
>
|
||||
<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="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
<h4>{{ trans('admin/accessories/general.about_accessories_title') }}</h4>
|
||||
<p>{{ trans('admin/accessories/general.about_accessories_text') }} </p>
|
||||
<div class="text-center">
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
@can('checkout', \App\Models\Accessory::class)
|
||||
<a href="{{ route('checkout/accessory', $accessory->id) }}" style="margin-right:5px;" class="btn btn-info btn-sm" {{ (($accessory->numRemaining() > 0 ) ? '' : ' disabled') }}>{{ trans('general.checkout') }}</a>
|
||||
@endcan
|
||||
@endcan
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'accessory' . $accessory->name . '-export', 'search' => false])
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -29,73 +29,68 @@
|
|||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="logId" value="{{ $findlog->id }}" />
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="logId" value="{{ $findlog->id }}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2">
|
||||
<div class="panel box box-default">
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
|
||||
I accept
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="panel box box-default">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="asset_acceptance" id="declined" value="declined">
|
||||
I decline
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
@if ($item->getEula())
|
||||
<div class="col-md-12" style="padding-top: 20px">
|
||||
<div id="eula_div">
|
||||
{!! $item->getEula() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<div class="col-md-12 col-sm-12 text-center" style="padding-top: 20px">
|
||||
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
|
||||
I accept
|
||||
</label>
|
||||
<h3>Sign below to indicate that you agree to the terms of service:</h3>
|
||||
|
||||
<div id="signature-pad" class="m-signature-pad col-md-12 col-sm-12">
|
||||
<div class="m-signature-pad--body col-md-12 col-sm-12">
|
||||
<canvas></canvas>
|
||||
<input type="hidden" name="signature_output" id="signature_output">
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="asset_acceptance" id="declined" value="declined">
|
||||
I decline
|
||||
</label>
|
||||
<div class="col-md-12 col-sm-12 text-center">
|
||||
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .col-md-12.text-center-->
|
||||
@endif
|
||||
|
||||
@if ($item->getEula())
|
||||
<div class="col-md-12" style="padding-top: 20px">
|
||||
<div id="eula_div">
|
||||
{!! $item->getEula() !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div><!-- / col-md-12 -->
|
||||
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<div class="col-md-12 col-sm-12 text-center" style="padding-top: 20px">
|
||||
|
||||
<h3>Sign below to indicate that you agree to the terms of service:</h3>
|
||||
|
||||
<div id="signature-pad" class="m-signature-pad col-md-12 col-sm-12">
|
||||
<div class="m-signature-pad--body col-md-12 col-sm-12">
|
||||
<canvas></canvas>
|
||||
<input type="hidden" name="signature_output" id="signature_output">
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 text-center">
|
||||
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
</div><!-- / col-md-7 col-sm-12 -->
|
||||
|
||||
</div> <!-- / box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.submit') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div> <!-- / box-default -->
|
||||
</div> <!-- / box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.submit') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div> <!-- / box-default -->
|
||||
</div> <!-- / col -->
|
||||
</div> <!-- / row -->
|
||||
|
||||
</div> <!-- / row -->
|
||||
</form>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
<script src="{{ asset('assets/js/signature_pad.min.js') }}"></script>
|
||||
|
@ -138,6 +133,4 @@
|
|||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
@stop
|
|
@ -8,7 +8,6 @@ Change your Password
|
|||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
<div class="row header">
|
||||
|
||||
<div class="col-md-12">
|
||||
<h3>{{ trans('general.changepassword') }}</h3>
|
||||
</div>
|
||||
|
@ -22,7 +21,7 @@ Change your Password
|
|||
<!-- Old Password -->
|
||||
<div class="form-group {{ $errors->has('old_password') ? ' has-error' : '' }}">
|
||||
<label for="old_password" class="col-md-2 control-label">Old Password
|
||||
<i class='fa fa-asterisk'></i>
|
||||
<i class='fa fa-asterisk'></i>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="password" name="old_password" id="old_password" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
|
@ -42,7 +41,7 @@ Change your Password
|
|||
|
||||
<div class="form-group {{ $errors->has('password_confirm') ? ' has-error' : '' }}">
|
||||
<label for="password_confirm" class="col-md-2 control-label">New Password
|
||||
<i class='fa fa-asterisk'></i>
|
||||
<i class='fa fa-asterisk'></i>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="password" name="password_confirm" id="password_confirm" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
|
@ -57,12 +56,13 @@ Change your Password
|
|||
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('view-assets') }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" {{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('view-assets') }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" {{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -18,131 +18,123 @@
|
|||
|
||||
<!-- First Name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? ' has-error' : '' }}">
|
||||
<label for="first_name" class="col-md-3 control-label">{{ trans('general.first_name') }}
|
||||
</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="first_name" class="col-md-3 control-label">{{ trans('general.first_name') }}
|
||||
</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Last Name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? ' has-error' : '' }}">
|
||||
<label for="last_name" class="col-md-3 control-label">{{ trans('general.last_name') }}
|
||||
|
||||
</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="last_name" class="col-md-3 control-label">
|
||||
{{ trans('general.last_name') }}
|
||||
</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="location_id">{{ trans('general.location') }}
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<div class="field-box">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $user->location_id), array('class'=>'select2', 'style'=>'width:300px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="location_id">
|
||||
{{ trans('general.location') }}
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<div class="field-box">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $user->location_id), array('class'=>'select2', 'style'=>'width:300px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Language -->
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-9">
|
||||
{!! Form::locales('locale', Input::old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-9">
|
||||
{!! Form::locales('locale', Input::old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Website URL -->
|
||||
<!-- Website URL -->
|
||||
<div class="form-group {{ $errors->has('website') ? ' has-error' : '' }}">
|
||||
<label for="website" class="col-md-3 control-label">{{ trans('general.website') }}</label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="text" name="website" id="website" value="{{ Input::old('website', $user->website) }}" />
|
||||
{!! $errors->first('website', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="website" class="col-md-3 control-label">{{ trans('general.website') }}</label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="text" name="website" id="website" value="{{ Input::old('website', $user->website) }}" />
|
||||
{!! $errors->first('website', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Gravatar Email -->
|
||||
<div class="form-group {{ $errors->has('gravatar') ? ' has-error' : '' }}">
|
||||
<label for="gravatar" class="col-md-3 control-label">{{ trans('general.gravatar_email') }}
|
||||
<small>(Private)</small></label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="text" name="gravatar" id="gravatar" value="{{ Input::old('gravatar', $user->gravatar) }}" />
|
||||
{!! $errors->first('gravatar', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
<p><img src="//secure.gravatar.com/avatar/{{ md5(strtolower(trim($user->gravatar))) }}" width="30" height="30" />
|
||||
<a href="http://gravatar.com"><small>Change your avatar at Gravatar.com</small></a>.
|
||||
<label for="gravatar" class="col-md-3 control-label">{{ trans('general.gravatar_email') }}
|
||||
<small>(Private)</small>
|
||||
</label>
|
||||
<div class="col-md-5">
|
||||
<input class="form-control" type="text" name="gravatar" id="gravatar" value="{{ Input::old('gravatar', $user->gravatar) }}" />
|
||||
{!! $errors->first('gravatar', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
<p>
|
||||
<img src="//secure.gravatar.com/avatar/{{ md5(strtolower(trim($user->gravatar))) }}" width="30" height="30" />
|
||||
<a href="http://gravatar.com"><small>Change your avatar at Gravatar.com</small></a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Avatar -->
|
||||
<!-- Avatar -->
|
||||
@if ($user->avatar)
|
||||
<div class="form-group {{ $errors->has('avatar_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="avatar_delete">{{ trans('general.avatar_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('avatar_delete') }}
|
||||
<img src="{{ url('/') }}/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
|
||||
{!! $errors->first('avatar_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<div class="form-group {{ $errors->has('avatar_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="avatar_delete">{{ trans('general.avatar_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('avatar_delete') }}
|
||||
<img src="{{ url('/') }}/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
|
||||
{!! $errors->first('avatar_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="avatar">{{ trans('general.avatar_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::file('avatar') }}
|
||||
{!! $errors->first('avatar', '<span class="alert-msg">:message</span>') !!}
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="avatar">{{ trans('general.avatar_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::file('avatar') }}
|
||||
{!! $errors->first('avatar', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Two factor opt in -->
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<!-- Two factor opt in -->
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
@can('self.two_factor')
|
||||
<label for="avatar">{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),array('class' => 'minimal')) }}
|
||||
@else
|
||||
<label for="avatar">{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),['class' => 'disabled minimal', 'disabled' => 'disabled']) }}
|
||||
@endcan
|
||||
|
||||
<div class="form-group {{ $errors->has('avatar') ? 'has-error' : '' }}">
|
||||
{{ trans('admin/settings/general.two_factor_enabled_text') }}</label>
|
||||
@can('self.two_factor')
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_warning') }}</p>
|
||||
@else
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_edit_not_allowed') }}</p>
|
||||
@endcan
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
|
||||
@can('self.two_factor')
|
||||
<label for="avatar">{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),array('class' => 'minimal')) }}
|
||||
@else
|
||||
<label for="avatar">{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),['class' => 'disabled minimal', 'disabled' => 'disabled']) }}
|
||||
@endcan
|
||||
|
||||
{{ trans('admin/settings/general.two_factor_enabled_text') }}</label>
|
||||
@can('self.two_factor')
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_warning') }}</p>
|
||||
@else
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_enabled_edit_not_allowed') }}</p>
|
||||
@endcan
|
||||
@if (config('app.lock_passwords'))
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div> <!-- .box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-ok icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div> <!-- .box-footer-->
|
||||
</div> <!-- .box-default -->
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
||||
|
|
|
@ -66,15 +66,13 @@
|
|||
{{ $asset->defaultLoc->name }}
|
||||
@endif
|
||||
</td>
|
||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||
@if ($asset->assigned_to != '' && $asset->assigned_to > 0)
|
||||
<td>Checked out</td>
|
||||
@else
|
||||
<td>{{ trans('admin/hardware/general.requestable') }}</td>
|
||||
<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'])}}
|
||||
|
@ -89,7 +87,6 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info alert-block">
|
||||
|
@ -97,8 +94,6 @@
|
|||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
@ -114,13 +109,12 @@
|
|||
<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>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($models as $requestableModel)
|
||||
|
||||
<tr>
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
||||
<form action="{{route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}"
|
||||
method="POST"
|
||||
accept-charset="utf-8"
|
||||
>
|
||||
|
@ -155,10 +149,9 @@
|
|||
</div> <!-- .nav-tabs-custom -->
|
||||
</div> <!-- .col-md-12> -->
|
||||
</div> <!-- .row -->
|
||||
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
||||
|
|
|
@ -9,215 +9,6 @@ View Assets for {{ $user->present()->fullName() }}
|
|||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('admin/users/general.assets_user', array('name' => $user->first_name)) }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out assets table -->
|
||||
@if (count($user->assets) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.name') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1') {{ $asset->model->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
<td>
|
||||
|
||||
@if (($asset->image) && ($asset->image!=''))
|
||||
<img src="{{ url('/') }}/uploads/assets/{{ $asset->image }}" height="50" width="50">
|
||||
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<img src="{{ url('/') }}/uploads/models/{{ $asset->model->image }}" height="50" width="50">
|
||||
@endif
|
||||
|
||||
</td>
|
||||
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('admin/users/general.software_user', array('name' => $user->first_name)) }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->licenses) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>{{ $license->name }}</td>
|
||||
<td>
|
||||
|
||||
@can('viewKeys', $license)
|
||||
|
||||
{{ mb_strimwidth($license->serial, 0, 50, "...") }}
|
||||
@else
|
||||
---
|
||||
@endcan
|
||||
</td>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.consumables') }} </h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out consumables table -->
|
||||
@if (count($user->consumables) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-12">{{ trans('general.name') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td>{{ $consumable->name }}</td>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.accessories') }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->accessories) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-12">Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td>{{ $accessory->name }}</td>
|
||||
</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>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
@ -225,77 +16,143 @@ View Assets for {{ $user->present()->fullName() }}
|
|||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> History</h3>
|
||||
<h3 class="box-title"> {{ trans('admin/users/general.assets_user', array('name' => $user->first_name)) }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
@if (count($userlog) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="example">
|
||||
<thead>
|
||||
<!-- checked out assets table -->
|
||||
@if (count($user->assets) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.action') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.asset') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.by') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-4">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.name') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($userlog as $log)
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
@if ($log->itemType()=="asset")
|
||||
<i class="fa fa-barcode"></i>
|
||||
@elseif ($log->itemType()=="accessory")
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
@elseif ($log->itemType()=="consumable")
|
||||
<i class="fa fa-tint"></i>
|
||||
@elseif ($log->itemType()=="license")
|
||||
<i class="fa fa-floppy-o"></i>
|
||||
@else
|
||||
<i class="fa fa-times"></i>
|
||||
@endif
|
||||
<td>
|
||||
@if ($asset->physical=='1')
|
||||
{{ $asset->model->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
<td>
|
||||
@if (($asset->image) && ($asset->image!=''))
|
||||
<img src="{{ url('/') }}/uploads/assets/{{ $asset->image }}" height="50" width="50">
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{{ strtolower(trans('general.'.str_replace(' ','_',$log->action_type))) }}
|
||||
</td>
|
||||
<td>
|
||||
@if (($log->item) && ($log->itemType()=="asset"))
|
||||
@if ($log->item->deleted_at=='')
|
||||
{{ $log->item->present()->name() }}
|
||||
@else
|
||||
<del>{{ $log->item->present()->name() }}</del> (deleted)
|
||||
@endif
|
||||
|
||||
@elseif ($log->item)
|
||||
@if ($log->item->deleted_at=='')
|
||||
{{ $log->item->name }}
|
||||
@else
|
||||
<del>{{ $log->item->name }}</del> (deleted)
|
||||
@endif
|
||||
@else
|
||||
{{ trans('general.bad_data') }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->user)
|
||||
{{ $log->user->present()->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<img src="{{ url('/') }}/uploads/models/{{ $asset->model->image }}" height="50" width="50">
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- .table-responsive-->
|
||||
@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> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('admin/users/general.software_user', array('name' => $user->first_name)) }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->licenses) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>{{ $license->name }}</td>
|
||||
<td>
|
||||
@can('viewKeys', $license)
|
||||
{{ mb_strimwidth($license->serial, 0, 50, "...") }}
|
||||
@else
|
||||
---
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- .table-responsive-->
|
||||
@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> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.consumables') }} </h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out consumables table -->
|
||||
@if (count($user->consumables) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-12">{{ trans('general.name') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td>{{ $consumable->name }}</td>
|
||||
</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>
|
||||
|
@ -303,9 +160,140 @@ View Assets for {{ $user->present()->fullName() }}
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.accessories') }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->accessories) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-12">Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td>{{ $accessory->name }}</td>
|
||||
</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> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> History</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
@if (count($userlog) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.action') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.asset') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.by') }}</th>
|
||||
<th class="col-md-3">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($userlog as $log)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
@if ($log->itemType()=="asset")
|
||||
<i class="fa fa-barcode"></i>
|
||||
@elseif ($log->itemType()=="accessory")
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
@elseif ($log->itemType()=="consumable")
|
||||
<i class="fa fa-tint"></i>
|
||||
@elseif ($log->itemType()=="license")
|
||||
<i class="fa fa-floppy-o"></i>
|
||||
@else
|
||||
<i class="fa fa-times"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ strtolower(trans('general.'.str_replace(' ','_',$log->action_type))) }}
|
||||
</td>
|
||||
<td>
|
||||
@if (($log->item) && ($log->itemType()=="asset"))
|
||||
@if ($log->item->deleted_at=='')
|
||||
{{ $log->item->present()->name() }}
|
||||
@else
|
||||
<del>{{ $log->item->present()->name() }}</del> (deleted)
|
||||
@endif
|
||||
|
||||
@elseif ($log->item)
|
||||
@if ($log->item->deleted_at=='')
|
||||
{{ $log->item->name }}
|
||||
@else
|
||||
<del>{{ $log->item->name }}</del> (deleted)
|
||||
@endif
|
||||
@else
|
||||
{{ trans('general.bad_data') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->user)
|
||||
{{ $log->user->present()->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!--.table-responsive-->
|
||||
|
||||
@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> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
<div class="col-md-12">
|
||||
|
||||
@if ($requestedItems->count() > 0)
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
|
@ -33,9 +32,7 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@foreach ($requestedItems as $request)
|
||||
|
||||
<tr>
|
||||
|
||||
<form action="#" method="POST" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<td>{{ $request->itemType() }}</td>
|
||||
|
@ -64,7 +61,6 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info alert-block">
|
||||
|
@ -72,13 +68,7 @@
|
|||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
</div>
|
||||
</div> <!-- .col-md-12> -->
|
||||
</div> <!-- .row -->
|
||||
|
||||
|
||||
|
||||
@stop
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@if ($item->id)
|
||||
{{ trans('admin/asset_maintenances/form.update') }}
|
||||
@else
|
||||
{{ trans('admin/asset_maintenances/form.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@if ($item->id)
|
||||
{{ trans('admin/asset_maintenances/form.update') }}
|
||||
@else
|
||||
{{ trans('admin/asset_maintenances/form.create') }}
|
||||
@endif
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
|
@ -20,114 +20,113 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
@if ($item->id)
|
||||
<form class="form-horizontal" method="post" action="{{ route('maintenances.update', $item->id) }}" autocomplete="off">
|
||||
{{ method_field('PUT') }}
|
||||
@else
|
||||
<form class="form-horizontal" method="post" action="{{ route('maintenances.store') }}" autocomplete="off">
|
||||
@endif
|
||||
@if ($item->id)
|
||||
<form class="form-horizontal" method="post" action="{{ route('maintenances.update', $item->id) }}" autocomplete="off">
|
||||
{{ method_field('PUT') }}
|
||||
@else
|
||||
<form class="form-horizontal" method="post" action="{{ route('maintenances.store') }}" autocomplete="off">
|
||||
@endif
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
|
||||
<h3 class="box-title">
|
||||
@if ($item)
|
||||
{{ $item->name }}
|
||||
@endif
|
||||
</h3>
|
||||
</h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Asset -->
|
||||
<div class="form-group {{ $errors->has('asset_id') ? ' has-error' : '' }}">
|
||||
<label for="asset_id" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/table.asset_name') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_id')) ? ' required' : '' }}">
|
||||
@if ($selectedAsset == null)
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $item->asset_id), ['class'=>'select2', 'style'=>'min-width:350px']) }}
|
||||
@else
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $selectedAsset), ['class'=>'select2', 'style'=>'min-width:350px', 'enabled' => 'false']) }}
|
||||
@endif
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<!-- Asset -->
|
||||
<div class="form-group {{ $errors->has('asset_id') ? ' has-error' : '' }}">
|
||||
<label for="asset_id" class="col-md-3 control-label">
|
||||
{{ trans('admin/asset_maintenances/table.asset_name') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_id')) ? ' required' : '' }}">
|
||||
@if ($selectedAsset == null)
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $item->asset_id), ['class'=>'select2', 'style'=>'min-width:350px']) }}
|
||||
@else
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $selectedAsset), ['class'=>'select2', 'style'=>'min-width:350px', 'enabled' => 'false']) }}
|
||||
@endif
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div> <!-- .form-group -->
|
||||
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.maintenance_type')
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.maintenance_type')
|
||||
|
||||
|
||||
|
||||
<!-- Title -->
|
||||
<div class="form-group {{ $errors->has('title') ? ' has-error' : '' }}">
|
||||
<label for="title" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.title') }}
|
||||
</label>
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'title')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="title" id="title" value="{{ Input::old('title', $item->title) }}" />
|
||||
{!! $errors->first('title', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<!-- Title -->
|
||||
<div class="form-group {{ $errors->has('title') ? ' has-error' : '' }}">
|
||||
<label for="title" class="col-md-3 control-label">
|
||||
{{ trans('admin/asset_maintenances/form.title') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'title')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="title" id="title" value="{{ Input::old('title', $item->title) }}" />
|
||||
{!! $errors->first('title', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- Start Date -->
|
||||
<div class="form-group {{ $errors->has('start_date') ? ' has-error' : '' }}">
|
||||
<label for="start_date" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.start_date') }}
|
||||
</label>
|
||||
<div class="input-group col-md-2{{ (\App\Helpers\Helper::checkIfRequired($item, 'start_date')) ? ' required' : '' }}">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="start_date" id="start_date" value="{{ Input::old('start_date', $item->start_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('start_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Completion Date -->
|
||||
<div class="form-group {{ $errors->has('completion_date') ? ' has-error' : '' }}">
|
||||
<label for="start_date" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.completion_date') }}</label>
|
||||
<div class="input-group col-md-2">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="completion_date" id="completion_date" value="{{ Input::old('completion_date', $item->completion_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('completion_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" {{ Input::old('is_warranty', $item->is_warranty) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/asset_maintenances/form.is_warranty') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset Maintenance Cost -->
|
||||
<div class="form-group {{ $errors->has('cost') ? ' has-error' : '' }}">
|
||||
<label for="cost" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.cost') }}</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
|
||||
<input class="col-md-2 form-control" type="text" name="cost" id="cost" value="{{ Input::old('cost', \App\Helpers\Helper::formatCurrencyOutput($item->cost)) }}" />
|
||||
{!! $errors->first('cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $item->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Start Date -->
|
||||
<div class="form-group {{ $errors->has('start_date') ? ' has-error' : '' }}">
|
||||
<label for="start_date" class="col-md-3 control-label">
|
||||
{{ trans('admin/asset_maintenances/form.start_date') }}
|
||||
</label>
|
||||
<div class="input-group col-md-2{{ (\App\Helpers\Helper::checkIfRequired($item, 'start_date')) ? ' required' : '' }}">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="start_date" id="start_date" value="{{ Input::old('start_date', $item->start_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('start_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Completion Date -->
|
||||
<div class="form-group {{ $errors->has('completion_date') ? ' has-error' : '' }}">
|
||||
<label for="start_date" class="col-md-3 control-label">
|
||||
{{ trans('admin/asset_maintenances/form.completion_date') }}
|
||||
</label>
|
||||
<div class="input-group col-md-2">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="completion_date" id="completion_date" value="{{ Input::old('completion_date', $item->completion_date) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('completion_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-3 col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="is_warranty" id="is_warranty" {{ Input::old('is_warranty', $item->is_warranty) == '1' ? ' checked="checked"' : '' }}> {{ trans('admin/asset_maintenances/form.is_warranty') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset Maintenance Cost -->
|
||||
<div class="form-group {{ $errors->has('cost') ? ' has-error' : '' }}">
|
||||
<label for="cost" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.cost') }}</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
|
||||
<input class="col-md-2 form-control" type="text" name="cost" id="cost" value="{{ Input::old('cost', \App\Helpers\Helper::formatCurrencyOutput($item->cost)) }}" />
|
||||
{!! $errors->first('cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? ' has-error' : '' }}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/asset_maintenances/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $item->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .box-body -->
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/asset_maintenances/general.asset_maintenances') }}
|
||||
@parent
|
||||
{{ trans('admin/asset_maintenances/general.asset_maintenances') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
|
@ -13,28 +13,24 @@
|
|||
@endcan
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="maintenances"
|
||||
id="table"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.asset_maintenances.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maintenancesTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
data-cookie-id-table="maintenancesTable-{{ config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="companyName" data-sortable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="false" data-field="asset_name">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
|
@ -47,16 +43,17 @@
|
|||
<th data-searchable="true" data-sortable="true" data-field="cost" class="text-right">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="user_id">{{ trans('general.admin') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="notes" data-visible="false">{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
@endcan
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
|
|
@ -5,99 +5,99 @@ use Carbon\Carbon;
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/asset_maintenances/general.view') }} {{ $assetMaintenance->title }}
|
||||
@parent
|
||||
{{ trans('admin/asset_maintenances/general.view') }} {{ $assetMaintenance->title }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<h3 class="title">
|
||||
{{ trans('admin/asset_maintenances/general.view') }}
|
||||
{{ " - " . $assetMaintenance->title }}
|
||||
</h3>
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<h3 class="title">
|
||||
{{ trans('admin/asset_maintenances/general.view') }}
|
||||
{{ " - " . $assetMaintenance->title }}
|
||||
</h3>
|
||||
|
||||
<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('maintenances.update', $assetMaintenance->id) }}">{{ trans('admin/asset_maintenances/general.edit') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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('maintenances.update', $assetMaintenance->id) }}">{{ trans('admin/asset_maintenances/general.edit') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-profile ">
|
||||
<div class="row profile">
|
||||
<div class="col-md-9 bio">
|
||||
<!-- 1st Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}: </strong>
|
||||
{{ $assetMaintenance->asset_maintenance_type }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 1st Row End -->
|
||||
<!-- 2nd Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/table.asset_name') }}: </strong>
|
||||
<a href="{{ route('hardware.show', $assetMaintenance->asset_id) }}">
|
||||
{{ $assetMaintenance->asset->name }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('general.supplier') }}: </strong>
|
||||
<a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">
|
||||
{{ $assetMaintenance->supplier->name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 2nd Row End -->
|
||||
<!-- 3rd Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.start_date') }}: </strong>
|
||||
<?php $startDate = Carbon::parse($assetMaintenance->start_date); ?>
|
||||
{{ $startDate->toDateString() }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.completion_date') }}: </strong>
|
||||
{{ $completionDate = $assetMaintenance->completion_date }}
|
||||
{{ $completionDate ? $completionDate : trans('admin/asset_maintenances/message.asset_maintenance_incomplete') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}: </strong>
|
||||
{{ $assetMaintenance->asset_maintenance_time }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 3rd Row End -->
|
||||
<!-- 4th Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.cost') }}: </strong>
|
||||
{{ sprintf( trans( 'general.currency' ) . '%01.2f', $assetMaintenance->cost) }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.is_warranty') }}: </strong>
|
||||
{{ $assetMaintenance->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 4th Row End -->
|
||||
<!-- 5th Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.notes') }}: </strong>
|
||||
{{ $assetMaintenance->notes }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 5th Row End -->
|
||||
</div> <!-- col-md-9 bio end -->
|
||||
</div> <!-- row profile end -->
|
||||
</div> <!-- user-profile end -->
|
||||
<div class="user-profile ">
|
||||
<div class="row profile">
|
||||
<div class="col-md-9 bio">
|
||||
<!-- 1st Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}: </strong>
|
||||
{{ $assetMaintenance->asset_maintenance_type }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 1st Row End -->
|
||||
|
||||
<!-- 2nd Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/table.asset_name') }}: </strong>
|
||||
<a href="{{ route('hardware.show', $assetMaintenance->asset_id) }}">
|
||||
{{ $assetMaintenance->asset->name }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('general.supplier') }}: </strong>
|
||||
<a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">
|
||||
{{ $assetMaintenance->supplier->name }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 2nd Row End -->
|
||||
<!-- 3rd Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.start_date') }}: </strong>
|
||||
<?php $startDate = Carbon::parse($assetMaintenance->start_date); ?>
|
||||
{{ $startDate->toDateString() }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.completion_date') }}: </strong>
|
||||
{{ $completionDate = $assetMaintenance->completion_date }}
|
||||
{{ $completionDate ? $completionDate : trans('admin/asset_maintenances/message.asset_maintenance_incomplete') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}: </strong>
|
||||
{{ $assetMaintenance->asset_maintenance_time }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 3rd Row End -->
|
||||
<!-- 4th Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.cost') }}: </strong>
|
||||
{{ sprintf( trans( 'general.currency' ) . '%01.2f', $assetMaintenance->cost) }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-3" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.is_warranty') }}: </strong>
|
||||
{{ $assetMaintenance->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 4th Row End -->
|
||||
<!-- 5th Row Begin -->
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>{{ trans('admin/asset_maintenances/form.notes') }}: </strong>
|
||||
{{ $assetMaintenance->notes }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 5th Row End -->
|
||||
</div> <!-- col-md-9 bio end -->
|
||||
</div> <!-- row profile end -->
|
||||
</div> <!-- user-profile end -->
|
||||
@stop
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.category_name')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/categories/general.`name')])
|
||||
|
||||
<!-- Type -->
|
||||
<div class="form-group {{ $errors->has('category_type') ? ' has-error' : '' }}">
|
||||
|
@ -66,7 +66,6 @@
|
|||
@section('content')
|
||||
@parent
|
||||
|
||||
|
||||
@if ($snipeSettings->default_eula_text!='')
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="eulaModal" tabindex="-1" role="dialog" aria-labelledby="eulaModalLabel" aria-hidden="true">
|
||||
|
|
|
@ -15,21 +15,20 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
class="table table-striped snipe-table"
|
||||
name="categories"
|
||||
id="table"
|
||||
data-url="{{route('api.categories.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="categoriesTable-{{ config('version.hash_version') }}">
|
||||
class="table table-striped snipe-table"
|
||||
name="categories"
|
||||
id="table"
|
||||
data-url="{{route('api.categories.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="categoriesTable-{{ config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
|
@ -42,12 +41,9 @@
|
|||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -10,56 +10,53 @@
|
|||
|
||||
@section('header_right')
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('categories.edit', ['category' => $category->id]) }}">{{ trans('admin/categories/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('categories.create') }}">{{ trans('general.create') }}</a></li>
|
||||
</ul>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('categories.edit', ['category' => $category->id]) }}">{{ trans('admin/categories/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('categories.create') }}">{{ trans('general.create') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<table
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="category_assets"
|
||||
class="snipe-table"
|
||||
id="table"
|
||||
data-url="{{ route('api.categories.'.$category->category_type.'.view', [$category->id, $category->category_type]) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="categoryAssetsTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="companyName" data-visible="false">
|
||||
{{ trans('admin/companies/table.title') }}
|
||||
</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
@if ($category->category_type=='asset')
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="change" data-switchable="false">{{ trans('admin/hardware/table.change') }}</th>
|
||||
@endif
|
||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-switchable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
data-cookie-id-table="categoryAssetsTable"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="companyName" data-visible="false">
|
||||
{{ trans('admin/companies/table.title') }}
|
||||
</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
@if ($category->category_type=='asset')
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="change" data-switchable="false">{{ trans('admin/hardware/table.change') }}</th>
|
||||
@endif
|
||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-switchable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
@ -27,47 +26,44 @@
|
|||
<th class="col-md-9">{{ trans('admin/companies/table.name') }}</th>
|
||||
<th class="col-md-2">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
@foreach ($companies as $company)
|
||||
<tr>
|
||||
<td>{{ $company->id }}</td>
|
||||
<td>{{ $company->name }}</td>
|
||||
<td>
|
||||
<form method="POST" action="{{ route('companies.destroy', $company->id) }}" role="form">
|
||||
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<a href="{{ route('companies.edit', $company->id) }}" class="btn btn-sm btn-warning"
|
||||
title="{{ trans('button.edit') }}">
|
||||
<i class="fa fa-pencil icon-white"></i>
|
||||
</a>
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-danger" title="{{ trans('button.delete') }}">
|
||||
<i class="fa fa-trash icon-white"></i>
|
||||
</button>
|
||||
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($companies as $company)
|
||||
<tr>
|
||||
<td>{{ $company->id }}</td>
|
||||
<td>{{ $company->name }}</td>
|
||||
<td>
|
||||
<form method="POST" action="{{ route('companies.destroy', $company->id) }}" role="form">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<a href="{{ route('companies.edit', $company->id) }}" class="btn btn-sm btn-warning"
|
||||
title="{{ trans('button.edit') }}">
|
||||
<i class="fa fa-pencil icon-white"></i>
|
||||
</a>
|
||||
|
||||
<button type="submit" class="btn btn-sm btn-danger" title="{{ trans('button.delete') }}">
|
||||
<i class="fa fa-trash icon-white"></i>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>About Companies</h4>
|
||||
<p>
|
||||
You can use companies as a simple placeholder, or you can use them to restrict asset visibility and availability to users with a specific company.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>About Companies</h4>
|
||||
<p>
|
||||
You can use companies as a simple placeholder, or you can use them to restrict asset visibility and availability to users with a specific company.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -2,75 +2,65 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/components/general.checkout') }}
|
||||
{{ trans('admin/components/general.checkout') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($component->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title">{{ $component->name }} ({{ $component->numRemaining() }} {{ trans('admin/components/general.remaining') }})</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
@if ($component->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title">{{ $component->name }} ({{ $component->numRemaining() }} {{ trans('admin/components/general.remaining') }})</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
@if ($component->name)
|
||||
<!-- consumable name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/components/general.component_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $component->name }}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/components/general.component_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $component->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- Asset -->
|
||||
|
||||
<div class="form-group {{ $errors->has('asset_id') ? ' has-error' : '' }}">
|
||||
<label for="asset_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('asset_id', $assets_list , Input::old('asset_id', $component->asset_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="asset_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('asset_id', $assets_list , Input::old('asset_id', $component->asset_id), array('class'=>'select2', 'style'=>'width:100%')) }}
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('assigned_qty') ? ' has-error' : '' }}">
|
||||
<label for="assigned_qty" class="col-md-3 control-label">{{ trans('general.qty') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="assigned_qty" id="assigned_qty" style="width: 70px;" value="{{ Input::old('assigned_qty') }}" />
|
||||
{!! $errors->first('assigned_qty', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="assigned_qty" class="col-md-3 control-label">{{ trans('general.qty') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
<input class="form-control" type="text" name="assigned_qty" id="assigned_qty" style="width: 70px;" value="{{ Input::old('assigned_qty') }}" />
|
||||
{!! $errors->first('assigned_qty', '<br><span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- .BOX-BODY-->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .box-default-->
|
||||
</form>
|
||||
</div> <!-- .col-md-9-->
|
||||
</div> <!-- .row -->
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -7,37 +7,32 @@
|
|||
@stop
|
||||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Component::class)
|
||||
<a href="{{ route('components.create') }}" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@can('create', \App\Models\Component::class)
|
||||
<a href="{{ route('components.create') }}" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['component/bulk-form'],
|
||||
'class' => 'form-inline' ]) }}
|
||||
<div class="box-body">
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['component/bulk-form'],
|
||||
'class' => 'form-inline' ]) }}
|
||||
|
||||
<div id="toolbar">
|
||||
<!-- <select name="bulk_actions" class="form-control select2" style="width: 130px;">
|
||||
<option value="checkout">Checkout</option>
|
||||
<option value="checkin">Checkin</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div id="toolbar">
|
||||
<!-- <select name="bulk_actions" class="form-control select2" style="width: 130px;">
|
||||
<option value="checkout">Checkout</option>
|
||||
<option value="checkin">Checkin</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
<table
|
||||
<table
|
||||
data-toolbar="#toolbar"
|
||||
name="components"
|
||||
class="table table-striped snipe-table"
|
||||
|
@ -45,31 +40,30 @@
|
|||
data-url="{{route('api.components.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="componentsTable-{{ config('version.hash_version') }}-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-visible="false" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/components/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="serial_number" data-visible="false">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="total_qty"> {{ trans('admin/components/general.total') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/components/general.remaining') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/components/general.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/components/general.date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('admin/components/general.cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{{ Form::close() }}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
data-cookie-id-table="componentsTable-{{ config('version.hash_version') }}-{{ config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-visible="false" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/components/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="serial_number" data-visible="false">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="total_qty"> {{ trans('admin/components/general.total') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/components/general.remaining') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/components/general.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/components/general.date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('admin/components/general.cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
{{ Form::close() }}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -10,28 +10,28 @@
|
|||
|
||||
{{-- Right header --}}
|
||||
@section('header_right')
|
||||
@can('manage', $component)
|
||||
<div class="dropdown pull-right">
|
||||
<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">
|
||||
@if ($component->assigned_to != '')
|
||||
@can('checkin', $component)
|
||||
<li role="presentation"><a href="{{ route('checkin/component', $component->id) }}">{{ trans('admin/components/general.checkin') }}</a></li>
|
||||
@endcan
|
||||
@else
|
||||
@can('checkout', $component)
|
||||
<li role="presentation"><a href="{{ route('checkout/component', $component->id) }}">{{ trans('admin/components/general.checkout') }}</a></li>
|
||||
@endcan
|
||||
@endif
|
||||
@can('update', $component)
|
||||
<li role="presentation"><a href="{{ route('components.edit', $component->id) }}">{{ trans('admin/components/general.edit') }}</a></li>
|
||||
@endcan
|
||||
@can('manage', $component)
|
||||
<div class="dropdown pull-right">
|
||||
<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">
|
||||
@if ($component->assigned_to != '')
|
||||
@can('checkin', $component)
|
||||
<li role="presentation"><a href="{{ route('checkin/component', $component->id) }}">{{ trans('admin/components/general.checkin') }}</a></li>
|
||||
@endcan
|
||||
@else
|
||||
@can('checkout', $component)
|
||||
<li role="presentation"><a href="{{ route('checkout/component', $component->id) }}">{{ trans('admin/components/general.checkout') }}</a></li>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
@can('update', $component)
|
||||
<li role="presentation"><a href="{{ route('components.edit', $component->id) }}">{{ trans('admin/components/general.edit') }}</a></li>
|
||||
@endcan
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
|
||||
|
@ -41,64 +41,60 @@
|
|||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table table-responsive">
|
||||
|
||||
<table
|
||||
name="component_users"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.components.view', $component->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="componentDetailTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.asset') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty">{{ trans('general.qty') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<table
|
||||
name="component_users"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.components.view', $component->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="componentDetailTable-{{ config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.asset') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty">{{ trans('general.qty') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- .col-md-12-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .col-md-9-->
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
@if ($component->serial!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
|
||||
{{ $component->serial }} </div>
|
||||
@endif
|
||||
@if ($component->serial!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
|
||||
{{ $component->serial }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->purchase_date)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.date') }}: </strong>
|
||||
{{ $component->purchase_date }} </div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.date') }}: </strong>
|
||||
{{ $component->purchase_date }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost) }} </div>
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($component->purchase_cost) }} </div>
|
||||
@endif
|
||||
|
||||
@if ($component->order_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.order') }}:</strong>
|
||||
{{ $component->order_number }} </div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/components/general.order') }}:</strong>
|
||||
{{ $component->order_number }} </div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
||||
|
||||
|
|
|
@ -9,75 +9,66 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<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
|
||||
|
||||
@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">
|
||||
|
||||
@if ($consumable->name)
|
||||
<!-- consumable name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/consumables/general.consumable_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $consumable->name }}</p>
|
||||
</div>
|
||||
<label class="col-sm-3 control-label">{{ trans('admin/consumables/general.consumable_name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $consumable->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<!-- User -->
|
||||
|
||||
<div class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="assigned_to" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $consumable->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="assigned_to" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
<i class='icon-asterisk'></i></label>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $consumable->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($consumable->category->require_acceptance=='1')
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="hint-block">{{ trans('admin/categories/general.required_acceptance') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($consumable->getEula())
|
||||
<div class="form-group">
|
||||
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="hint-block">{{ trans('admin/categories/general.required_eula') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="hint-block">{{ trans('admin/categories/general.required_acceptance') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if ($consumable->getEula())
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<p class="hint-block">{{ trans('admin/categories/general.required_eula') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div> <!-- .box-body -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -7,60 +7,56 @@
|
|||
@stop
|
||||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\Consumable::class)
|
||||
<a href="{{ route('consumables.create') }}" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@can('create', \App\Models\Consumable::class)
|
||||
<a href="{{ route('consumables.create') }}" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="consumables"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.consumables.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="consumablesTable-{{ config('version.hash_version') }}-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/consumables/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty"> {{ trans('admin/consumables/general.total') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
data-cookie-id-table="consumablesTable-{{ config('version.hash_version') }}-{{ config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/consumables/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty"> {{ trans('admin/consumables/general.total') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('general.order_number') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div> <!-- /.col-md-12 -->
|
||||
</div> <!-- /.row -->
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'consumables-export', 'search' => true])
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
|
||||
{{ $consumable->name }}
|
||||
{{ trans('general.consumable') }}
|
||||
@parent
|
||||
|
@ -20,82 +19,91 @@
|
|||
<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
|
||||
@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.view', $consumable->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="consumableDetailTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<table
|
||||
name="consumable_users"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.consumables.view', $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>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- /.col-md-12-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
{{ \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>
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('general.order_number') }}:</strong>
|
||||
{{ $consumable->order_number }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.col-md-3-->
|
||||
</div> <!-- /.row-->
|
||||
|
||||
@stop
|
||||
|
||||
|
|
|
@ -14,40 +14,35 @@
|
|||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<!-- Horizontal Form -->
|
||||
<div class="col-md-9">
|
||||
<!-- Horizontal Form -->
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
{{ Form::open(['route' => 'fieldsets.store', 'class'=>'form-horizontal']) }}
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.fieldset_name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name') }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
{{ csrf_field() }}
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.fieldset_name') }}
|
||||
<i class='fa fa-asterisk'></i>
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name') }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div> <!-- /.box-body-->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div> <!-- /.box.box-default-->
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h4>About Fieldsets</h4>
|
||||
<p>Fieldsets work like containers of the custom fields you've created. This allows you to group commonly used custom attributes together for easy associations. </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<h4>About Fieldsets</h4>
|
||||
<p>Fieldsets work like containers of the custom fields you've created. This allows you to group commonly used custom attributes together for easy associations. </p>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -17,143 +17,137 @@
|
|||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<!-- Horizontal Form -->
|
||||
<div class="col-md-9">
|
||||
<!-- Horizontal Form -->
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
{{ Form::open(['route' => 'fields.store', 'class'=>'form-horizontal']) }}
|
||||
|
||||
|
||||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.field_name') }} </label>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name') }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="name" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_name') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name') }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Element Type -->
|
||||
<div class="form-group {{ $errors->has('element') ? ' has-error' : '' }}">
|
||||
<label for="element" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.field_element') }}</label>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
|
||||
{!! Form::customfield_elements('element', Input::old('element'), 'field_element select2 form-control') !!}
|
||||
{!! $errors->first('element', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Element values -->
|
||||
<div class="form-group {{ $errors->has('element') ? ' has-error' : '' }}" id="field_values_text" style="display:none;">
|
||||
<label for="field_values" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.field_values') }}</label>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
|
||||
{!! Form::textarea('field_values', Input::old('field_values'), ['style' => 'width: 100%', 'rows' => 4, 'class' => 'form-control']) !!}
|
||||
{!! $errors->first('field_values', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
<p class="help-block">{{ trans('admin/custom_fields/general.field_values_help') }}</p>
|
||||
</div>
|
||||
<label for="element" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_element') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
|
||||
{!! Form::customfield_elements('element', Input::old('element'), 'field_element select2 form-control') !!}
|
||||
{!! $errors->first('element', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Element values -->
|
||||
<div class="form-group {{ $errors->has('element') ? ' has-error' : '' }}" id="field_values_text" style="display:none;">
|
||||
<label for="field_values" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_values') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
{!! Form::textarea('field_values', Input::old('field_values'), ['style' => 'width: 100%', 'rows' => 4, 'class' => 'form-control']) !!}
|
||||
{!! $errors->first('field_values', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
<p class="help-block">{{ trans('admin/custom_fields/general.field_values_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Format -->
|
||||
<div class="form-group {{ $errors->has('format') ? ' has-error' : '' }}">
|
||||
<label for="format" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.field_format') }}</label>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
{{ Form::select("format",\App\Helpers\Helper::predefined_formats(),"ANY", array('class'=>'format select2 form-control')) }}
|
||||
{!! $errors->first('format', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="format" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_format') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
{{ Form::select("format",\App\Helpers\Helper::predefined_formats(),"ANY", array('class'=>'format select2 form-control')) }}
|
||||
{!! $errors->first('format', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Custom Format -->
|
||||
<div class="form-group {{ $errors->has('custom_format') ? ' has-error' : '' }}" id="custom_regex" style="display:none;">
|
||||
<label for="custom_format" class="col-md-4 control-label">{{ trans('admin/custom_fields/general.field_custom_format') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="custom_format" id="custom_format" value="{{ Input::old('custom_format') }}" />
|
||||
{!! $errors->first('custom_format', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<label for="custom_format" class="col-md-4 control-label">
|
||||
{{ trans('admin/custom_fields/general.field_custom_format') }}
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="custom_format" id="custom_format" value="{{ Input::old('custom_format') }}" />
|
||||
{!! $errors->first('custom_format', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Encrypted -->
|
||||
<div class="form-group {{ $errors->has('custom_format') ? ' has-error' : '' }}">
|
||||
<div class="col-md-8 col-md-offset-4">
|
||||
<label for="field_encrypted">
|
||||
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted" class="minimal"{{ Input::old('field_encrypted') ? ' checked="checked"' : '' }}> {{ trans('admin/custom_fields/general.encrypt_field') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-md-offset-4" id="encrypt_warning" style="display:none;">
|
||||
<div class="callout callout-danger">
|
||||
<p><i class="fa fa-warning"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Encrypted -->
|
||||
<div class="form-group {{ $errors->has('custom_format') ? ' has-error' : '' }}">
|
||||
<div class="col-md-8 col-md-offset-4">
|
||||
<label for="field_encrypted">
|
||||
<input type="checkbox" value="1" name="field_encrypted" id="field_encrypted" class="minimal"{{ Input::old('field_encrypted') ? ' checked="checked"' : '' }}>
|
||||
{{ trans('admin/custom_fields/general.encrypt_field') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-md-offset-4" id="encrypt_warning" style="display:none;">
|
||||
<div class="callout callout-danger">
|
||||
<p><i class="fa fa-warning"></i> {{ trans('admin/custom_fields/general.encrypt_field_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
|
||||
</div> <!-- /.box-body-->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div> <!--.box.box-default-->
|
||||
</div> <!--/.col-md-9-->
|
||||
<div class="col-md-3">
|
||||
<h4>About Custom Fields</h4>
|
||||
<p>Custom fields allow you to add arbitrary attributes to assets.</p>
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
<div class="col-md-3">
|
||||
<h4>About Custom Fields</h4>
|
||||
<p>Custom fields allow you to add arbitrary attributes to assets.</p>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
// Only display the custom format field if it's a custom format validation type
|
||||
$(".format").change(function(){
|
||||
$(this).find("option:selected").each(function(){
|
||||
//console.warn($(this).attr("value"));
|
||||
if (($(this).attr("value")=="") && $('.format').prop("selectedIndex") != 0) {
|
||||
$("#custom_regex").show();
|
||||
} else{
|
||||
$("#custom_regex").hide();
|
||||
}
|
||||
});
|
||||
}).change();
|
||||
|
||||
// Only display the field element if the type is not text
|
||||
$(".field_element").change(function(){
|
||||
$(this).find("option:selected").each(function(){
|
||||
//console.warn($(this).attr("value"));
|
||||
if($(this).attr("value")!="text"){
|
||||
$("#field_values_text").show();
|
||||
} else{
|
||||
$("#field_values_text").hide();
|
||||
}
|
||||
});
|
||||
}).change();
|
||||
// Only display the custom format field if it's a custom format validation type
|
||||
$(".format").change(function(){
|
||||
$(this).find("option:selected").each(function(){
|
||||
//console.warn($(this).attr("value"));
|
||||
if (($(this).attr("value")=="") && $('.format').prop("selectedIndex") != 0) {
|
||||
$("#custom_regex").show();
|
||||
} else{
|
||||
$("#custom_regex").hide();
|
||||
}
|
||||
});
|
||||
}).change();
|
||||
|
||||
// Checkbox handling
|
||||
$('div.icheckbox_minimal-blue').on('ifChecked', function(event){
|
||||
$("#encrypt_warning").show();
|
||||
// Only display the field element if the type is not text
|
||||
$(".field_element").change(function(){
|
||||
$(this).find("option:selected").each(function(){
|
||||
//console.warn($(this).attr("value"));
|
||||
if($(this).attr("value")!="text"){
|
||||
$("#field_values_text").show();
|
||||
} else{
|
||||
$("#field_values_text").hide();
|
||||
}
|
||||
});
|
||||
}).change();
|
||||
});
|
||||
|
||||
$('div.icheckbox_minimal-blue').on('ifUnchecked', function(event){
|
||||
$("#encrypt_warning").hide();
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
// Checkbox handling
|
||||
$('div.icheckbox_minimal-blue').on('ifChecked', function(event){
|
||||
$("#encrypt_warning").show();
|
||||
});
|
||||
|
||||
$('div.icheckbox_minimal-blue').on('ifUnchecked', function(event){
|
||||
$("#encrypt_warning").hide();
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -7,90 +7,81 @@
|
|||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ route('fields.index') }}" class="btn btn-primary pull-right">
|
||||
<a href="{{ route('fields.index') }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $custom_fieldset->name }} {{ trans('admin/custom_fields/general.fieldset') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="fieldsets"
|
||||
id="sort" class="table table-responsive todo-list"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.order') }}</th>
|
||||
<th class="col-md-3">{{ trans('admin/custom_fields/general.field_name') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/custom_fields/general.field_format') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/custom_fields/general.field_element') }}</th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.encrypted') }}</th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.required') }}</th>
|
||||
<th class="col-md-1"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($custom_fieldset->fields as $field)
|
||||
<tr class="cansort" data-index="{{ $field->pivot->custom_field_id }}" id="item_{{ $field->pivot->custom_field_id }}">
|
||||
<td>
|
||||
<!-- drag handle -->
|
||||
<span class="handle">
|
||||
<i class="fa fa-ellipsis-v"></i>
|
||||
<i class="fa fa-ellipsis-v"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td class="index">{{$field->pivot->order}}</td>
|
||||
<td>{{$field->name}}</td>
|
||||
<td>{{$field->format}}</td>
|
||||
<td>{{$field->element}}</td>
|
||||
<td>{{ $field->field_encrypted=='1' ? trans('general.yes') : trans('general.no') }}</td>
|
||||
<td>{{$field->pivot->required ? "REQUIRED" : "OPTIONAL"}}</td>
|
||||
<td>
|
||||
<a href="{{ route('fields.disassociate', [$field,$custom_fieldset->id]) }}" class="btn btn-sm btn-danger">Remove</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right">
|
||||
{{ Form::open(['route' =>
|
||||
["fieldsets.associate",$custom_fieldset->id],
|
||||
'class'=>'form-horizontal',
|
||||
'id' => 'ordering']) }}
|
||||
{{ Form::checkbox("required","on") }}
|
||||
{{ trans('admin/custom_fields/general.required') }}
|
||||
{{ Form::text("order",$maxid)}}
|
||||
{{ Form::select("field_id",$custom_fields_list,"",["onchange" => "$('#ordering').submit()"]) }}
|
||||
<span class="alert-msg"><?= $errors->first('field_id'); ?></span>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div> <!-- /.box-body-->
|
||||
</div> <!-- /.box.box-default-->
|
||||
</div> <!-- /.col-md-12-->
|
||||
</div> <!--/.row-->
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ $custom_fieldset->name }} {{ trans('admin/custom_fields/general.fieldset') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
name="fieldsets"
|
||||
id="sort" class="table table-responsive todo-list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.order') }}</th>
|
||||
<th class="col-md-3">{{ trans('admin/custom_fields/general.field_name') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/custom_fields/general.field_format') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/custom_fields/general.field_element') }}</th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.encrypted') }}</th>
|
||||
<th class="col-md-1">{{ trans('admin/custom_fields/general.required') }}</th>
|
||||
<th class="col-md-1"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" class="text-right">
|
||||
{{ Form::open(['route' =>
|
||||
["fieldsets.associate",$custom_fieldset->id],
|
||||
'class'=>'form-horizontal',
|
||||
'id' => 'ordering']) }}
|
||||
{{ Form::checkbox("required","on") }}
|
||||
{{ trans('admin/custom_fields/general.required') }}
|
||||
{{ Form::text("order",$maxid)}}
|
||||
{{ Form::select("field_id",$custom_fields_list,"",["onchange" => "$('#ordering').submit()"]) }}
|
||||
<span class="alert-msg"><?= $errors->first('field_id'); ?></span>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach($custom_fieldset->fields as $field)
|
||||
<tr class="cansort" data-index="{{ $field->pivot->custom_field_id }}" id="item_{{ $field->pivot->custom_field_id }}">
|
||||
<td>
|
||||
<!-- drag handle -->
|
||||
<span class="handle">
|
||||
<i class="fa fa-ellipsis-v"></i>
|
||||
<i class="fa fa-ellipsis-v"></i>
|
||||
</span>
|
||||
</td>
|
||||
<td class="index">{{$field->pivot->order}}</td>
|
||||
<td>{{$field->name}}</td>
|
||||
<td>{{$field->format}}</td>
|
||||
<td>{{$field->element}}</td>
|
||||
<td>{{ $field->field_encrypted=='1' ? trans('general.yes') : trans('general.no') }}</td>
|
||||
<td>{{$field->pivot->required ? "REQUIRED" : "OPTIONAL"}}</td>
|
||||
<td><a href="{{ route('fields.disassociate', [$field,$custom_fieldset->id]) }}" class="btn btn-sm btn-danger">Remove</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
@ -126,6 +117,4 @@
|
|||
stop: updateIndex
|
||||
}).disableSelection();
|
||||
</script>
|
||||
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -8,142 +8,116 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/custom_fields/general.fieldsets') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('fieldsets.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="Create a new fieldset">{{ trans('admin/custom_fields/general.create_fieldset') }}</a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<table name="fieldsets" id="table" class="table table-responsive table-no-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.qty_fields') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.used_by_models') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/custom_fields/general.fieldsets') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('fieldsets.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="Create a new fieldset">{{ trans('admin/custom_fields/general.create_fieldset') }}</a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="fieldsets"
|
||||
id="table" class="table table-responsive table-no-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.qty_fields') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.used_by_models') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@if(isset($custom_fieldsets))
|
||||
<tbody>
|
||||
@foreach($custom_fieldsets AS $fieldset)
|
||||
<tr>
|
||||
<td>
|
||||
{{ link_to_route("fieldsets.show",$fieldset->name,['id' => $fieldset->id]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $fieldset->fields->count() }}
|
||||
</td>
|
||||
<td>
|
||||
@foreach($fieldset->models as $model)
|
||||
{{ link_to_route("models.show",$model->name,[$model->id]) }}
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::open(['route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete']) }}
|
||||
@if($fieldset->models->count() > 0)
|
||||
<button type="submit" class="btn btn-danger btn-sm disabled" disabled><i class="fa fa-trash"></i></button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endif
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box.box-default -->
|
||||
|
||||
|
||||
@if(isset($custom_fieldsets))
|
||||
<tbody>
|
||||
@foreach($custom_fieldsets AS $fieldset)
|
||||
<tr>
|
||||
<td>
|
||||
{{ link_to_route("fieldsets.show",$fieldset->name,['id' => $fieldset->id]) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $fieldset->fields->count() }}
|
||||
</td>
|
||||
<td>
|
||||
@foreach($fieldset->models as $model)
|
||||
{{ link_to_route("models.show",$model->name,[$model->id]) }}
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::open(array('route' => array('fieldsets.destroy', $fieldset->id), 'method' => 'delete')) }}
|
||||
|
||||
@if($fieldset->models->count() > 0)
|
||||
<button type="submit" class="btn btn-danger btn-sm disabled" disabled><i class="fa fa-trash"></i></button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>{{ trans('admin/custom_fields/general.about_fieldsets_title') }}</h4>
|
||||
<p>{{ trans('admin/custom_fields/general.about_fieldsets_text') }} </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- .col-md-9-->
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>{{ trans('admin/custom_fields/general.about_fieldsets_title') }}</h4>
|
||||
<p>{{ trans('admin/custom_fields/general.about_fieldsets_text') }} </p>
|
||||
</div>
|
||||
</div> <!-- .row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/custom_fields/general.custom_fields') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('fields.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="Create a new custom field">{{ trans('admin/custom_fields/general.create_field') }}</a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<table name="fieldsets" id="table" class="table table-responsive table-no-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.field_format') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.field_element_short') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.fieldsets') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($custom_fields AS $field)
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td>{{ $field->format }}</td>
|
||||
<td>{{ $field->element }}</td>
|
||||
<td>
|
||||
@foreach($field->fieldset as $fieldset)
|
||||
{{ link_to_route("fieldsets.show",$fieldset->name,[$fieldset->id])}}
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete')) }}
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/custom_fields/general.custom_fields') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('fields.create') }}" class="btn btn-sm btn-primary" data-toggle="tooltip" title="Create a new custom field">{{ trans('admin/custom_fields/general.create_field') }}</a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
name="fieldsets"
|
||||
id="table" class="table table-responsive table-no-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.field_format') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.field_element_short') }}</th>
|
||||
<th>{{ trans('admin/custom_fields/general.fieldsets') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach($custom_fields AS $field)
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td>{{ $field->format }}</td>
|
||||
<td>{{ $field->element }}</td>
|
||||
<td>
|
||||
@foreach($field->fieldset as $fieldset)
|
||||
{{ link_to_route("fieldsets.show",$fieldset->name,[$fieldset->id])}}
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::open(array('route' => array('fields.destroy', $field->id), 'method' => 'delete')) }}
|
||||
|
||||
@if($field->fieldset->count()>0)
|
||||
<button type="submit" class="btn btn-danger btn-sm disabled" disabled><i class="fa fa-trash"></i></button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
@if($field->fieldset->count()>0)
|
||||
<button type="submit" class="btn btn-danger btn-sm disabled" disabled><i class="fa fa-trash"></i></button>
|
||||
@else
|
||||
<button type="submit" class="btn btn-danger btn-sm"><i class="fa fa-trash"></i></button>
|
||||
@endif
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div> <!-- /.col-md-9-->
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -12,152 +12,141 @@
|
|||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/morris.css') }}">
|
||||
<div class="row">
|
||||
<!-- panel -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-teal">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format(\App\Models\Asset::assetcount()) }}</h3>
|
||||
<p>{{ trans('general.total_assets') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-barcode"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Asset::class)
|
||||
<a href="{{ route('hardware.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
|
||||
<!-- panel -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-teal">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format(\App\Models\Asset::assetcount()) }}</h3>
|
||||
<p>{{ trans('general.total_assets') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-barcode"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Asset::class)
|
||||
<a href="{{ route('hardware.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-maroon">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format(\App\Models\License::assetcount()) }}</h3>
|
||||
<p>{{ trans('general.total_licenses') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-floppy-o"></i>
|
||||
</div>
|
||||
@can('view', \App\Models\License::class)
|
||||
<a href="{{ route('licenses.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-maroon">
|
||||
<div class="inner">
|
||||
<h3>{{ number_format(\App\Models\License::assetcount()) }}</h3>
|
||||
<p>{{ trans('general.total_licenses') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-floppy-o"></i>
|
||||
</div>
|
||||
@can('view', \App\Models\License::class)
|
||||
<a href="{{ route('licenses.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-orange">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format(\App\Models\Accessory::count()) }}</h3>
|
||||
<p>{{ trans('general.total_accessories') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Accessory::class)
|
||||
<a href="{{ route('accessories.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-purple">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format(\App\Models\Consumable::count()) }}</h3>
|
||||
<p>{{ trans('general.total_consumables') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-tint"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Consumable::class)
|
||||
<a href="{{ route('consumables.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-orange">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format(\App\Models\Accessory::count()) }}</h3>
|
||||
<p>{{ trans('general.total_accessories') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Accessory::class)
|
||||
<a href="{{ route('accessories.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
|
||||
<div class="col-lg-3 col-xs-6">
|
||||
<!-- small box -->
|
||||
<div class="small-box bg-purple">
|
||||
<div class="inner">
|
||||
<h3> {{ number_format(\App\Models\Consumable::count()) }}</h3>
|
||||
<p>{{ trans('general.total_consumables') }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-tint"></i>
|
||||
</div>
|
||||
@can('index', \App\Models\Consumable::class)
|
||||
<a href="{{ route('consumables.index') }}" class="small-box-footer">{{ trans('general.moreinfo') }} <i class="fa fa-arrow-circle-right"></i></a>
|
||||
@endcan
|
||||
</div>
|
||||
</div><!-- ./col -->
|
||||
</div>
|
||||
|
||||
|
||||
<!-- recent activity -->
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.recent_activity') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('reports/activity') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-striped"
|
||||
name="activityReport"
|
||||
id="table"
|
||||
data-url="{{route('api.activity.list', ['limit' => 20]) }}">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.recent_activity') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="{{ route('reports/activity') }}"><i class="fa fa-ellipsis-h"></i></a>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-striped"
|
||||
name="activityReport"
|
||||
id="table"
|
||||
data-url="{{route('api.activity.list', ['limit' => 20]) }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="icon" style="width: 40px;" class="hidden-xs"></th>
|
||||
<th class="col-sm-2" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-2" data-field="admin">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-4" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-2" data-field="target">To</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-field="icon" style="width: 40px;" class="hidden-xs"></th>
|
||||
<th class="col-sm-2" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-2" data-field="admin">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-2" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-4" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-2" data-field="target">To</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</div><!-- /.responsive -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.assets') }}</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="statusPieChart" height="150"></canvas>
|
||||
</div>
|
||||
<!-- ./chart-responsive -->
|
||||
</div>
|
||||
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</table>
|
||||
</div><!-- /.responsive -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('general.assets') }}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="chart-responsive">
|
||||
<canvas id="statusPieChart" height="150"></canvas>
|
||||
</div> <!-- ./chart-responsive -->
|
||||
</div> <!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.box-body -->
|
||||
</div> <!-- /.box -->
|
||||
</div>
|
||||
</div> <!--/row-->
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/plugins/chartjs/Chart.min.js') }}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
var pieChartCanvas = $("#statusPieChart").get(0).getContext("2d");
|
||||
var pieChart = new Chart(pieChartCanvas);
|
||||
var ctx = document.getElementById("statusPieChart");
|
||||
|
||||
|
||||
$.get('{{ route('api.statuslabels.assets') }}', function (data) {
|
||||
var myPieChart = new Chart(ctx,{
|
||||
|
||||
|
@ -167,32 +156,24 @@
|
|||
});
|
||||
// document.getElementById('my-doughnut-legend').innerHTML = myPieChart.generateLegend();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
pagination: false,
|
||||
sidePagination: 'server',
|
||||
sortable: false,
|
||||
showMultiSort: false,
|
||||
cookie: false,
|
||||
mobileResponsive: true,
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: false,
|
||||
search: false,
|
||||
pagination: false,
|
||||
sidePagination: 'server',
|
||||
sortable: false,
|
||||
showMultiSort: false,
|
||||
cookie: false,
|
||||
mobileResponsive: true,
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/depreciations/general.depreciation_name')])
|
||||
<!-- Months -->
|
||||
<div class="form-group {{ $errors->has('months') ? ' has-error' : '' }}">
|
||||
<label for="months" class="col-md-3 control-label">{{ trans('admin/depreciations/general.number_of_months') }}
|
||||
<label for="months" class="col-md-3 control-label">
|
||||
{{ trans('admin/depreciations/general.number_of_months') }}
|
||||
</label>
|
||||
<div class="col-md-7{{ (\App\Helpers\Helper::checkIfRequired($item, 'months')) ? ' required' : '' }}">
|
||||
<div class="col-md-2" style="padding-left:0px">
|
||||
|
|
|
@ -39,13 +39,13 @@ Asset Depreciations
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.col-md-9-->
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h4>
|
||||
<p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
|
||||
<h4>{{ trans('admin/depreciations/general.about_asset_depreciations') }}</h4>
|
||||
<p>{{ trans('admin/depreciations/general.about_depreciations') }} </p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -18,40 +18,40 @@
|
|||
<!-- Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
|
||||
<label for="name" class="col-md-3 control-label">{{ trans('admin/groups/titles.group_name') }}
|
||||
<i class='fa fa-asterisk'></i></label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<i class='fa fa-asterisk'></i>
|
||||
</label>
|
||||
<div class="col-md-6 required">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
|
||||
@foreach ($permissions as $area => $permission)
|
||||
@for ($i = 0; $i < count($permission); $i++)
|
||||
@foreach ($permissions as $area => $permission)
|
||||
@for ($i = 0; $i < count($permission); $i++)
|
||||
<?php
|
||||
$permission_name = $permission[$i]['permission'];
|
||||
?>
|
||||
@if ($permission[$i]['display'])
|
||||
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
|
||||
<p>{{ $permission[$i]['note'] }}</p>
|
||||
@if ($permission[$i]['display'])
|
||||
<h3>{{ $area }}: {{ $permission[$i]['label'] }}</h3>
|
||||
<p>{{ $permission[$i]['note'] }}</p>
|
||||
|
||||
<!-- radio -->
|
||||
<div class="form-group" style="padding-left: 15px;">
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 1,
|
||||
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Grant
|
||||
</label>
|
||||
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Deny
|
||||
</label>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@endfor
|
||||
@endforeach
|
||||
<!-- radio -->
|
||||
<div class="form-group" style="padding-left: 15px;">
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 1,
|
||||
(array_key_exists($permission_name, $groupPermissions) && $groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Grant
|
||||
</label>
|
||||
<label class="radio-padding">
|
||||
{{ Form::radio('permission['.$permission_name.']', 0, (!array_key_exists($permission_name, $groupPermissions) || !$groupPermissions[$permission_name]), ['class' => 'minimal']) }}
|
||||
Deny
|
||||
</label>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@endfor
|
||||
@endforeach
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -13,14 +13,11 @@
|
|||
|
||||
{{-- Content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
name="groups"
|
||||
class="table table-striped snipe-table"
|
||||
|
@ -30,20 +27,20 @@
|
|||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="userGroupDisplay-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-switchable="true" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="name" data-visible="true">{{ trans('admin/groups/table.name') }}</th>
|
||||
<th data-switchable="true" data-sortable="false" data-field="users" data-visible="true">{{ trans('admin/groups/table.users') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="created_at" data-visible="true">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!--.box-body-->
|
||||
</div> <!-- /.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div>
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
|
|
|
@ -13,8 +13,11 @@
|
|||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('update/group', $group->id) }}" class="btn-flat white pull-right">
|
||||
{{ trans('admin/groups/table.update') }}</a>
|
||||
<a href="{{ url('admin/groups') }}" class="btn-flat gray pull-right" style="margin-right:5px;"><i class="fa fa-arrow-left icon-white"></i> {{ trans('general.back') }}</a>
|
||||
{{ trans('admin/groups/table.update') }}
|
||||
</a>
|
||||
<a href="{{ url('admin/groups') }}" class="btn-flat gray pull-right" style="margin-right:5px;">
|
||||
<i class="fa fa-arrow-left icon-white"></i> {{ trans('general.back') }}
|
||||
</a>
|
||||
<h3 class="name"> {{ trans('admin/groups/titles.group_management') }} - {{ $group->name }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,21 +26,20 @@
|
|||
<div class="row profile">
|
||||
<div class="col-md-12 bio">
|
||||
@if (count($users) > 0)
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3">{{ trans('admin/groups/table.name') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($users as $user)
|
||||
<tr>
|
||||
<td><a href="{{ route('users.show', $user->id) }}">{{ $user->first_name }} {{ $user->last_name }}</a></td>
|
||||
<td>
|
||||
<a href="{{ route('users.show', $user->id) }}">{{ $user->first_name }} {{ $user->last_name }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -50,4 +52,6 @@
|
|||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div> <!--.col-md-12-->
|
||||
</div> <!--.user-profile-->
|
||||
@stop
|
||||
|
|
|
@ -6,125 +6,105 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<style>
|
||||
.input-group {
|
||||
.input-group {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> {{ trans('admin/hardware/form.tag') }} </h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
<!-- User -->
|
||||
<div id="assigned_user" class="form-group{{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> {{ trans('admin/hardware/form.tag') }} </h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
{{ Form::label('assigned_to', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to'), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
|
||||
<!-- User -->
|
||||
<div id="assigned_user" class="form-group{{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('assigned_to', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to'), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkout_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expected Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('expected_checkin', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note') }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('selected_asset') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('selected_asset', trans('general.assets'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8 required">
|
||||
{{ Form::select('selected_assets[]', $assets_list , Input::old('selected_asset'), array('class'=>'select2', 'id'=>'selected_asset', 'style'=>'width:100%', 'multiple'=>'multiple')) }}
|
||||
|
||||
{!! $errors->first('selected_asset', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||
</div>
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- right column -->
|
||||
<div class="col-md-5" id="current_assets_box" style="display:none;">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/users/general.current_assets') }}</h3>
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkout_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="current_assets_content">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expected Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('expected_checkin', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note') }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('selected_asset') ? ' has-error' : '' }}">
|
||||
{{ Form::label('selected_asset', trans('general.assets'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8 required">
|
||||
{{ Form::select('selected_assets[]', $assets_list , Input::old('selected_asset'), array('class'=>'select2', 'id'=>'selected_asset', 'style'=>'width:100%', 'multiple'=>'multiple')) }}
|
||||
{!! $errors->first('selected_asset', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!--./box-body-->
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/.col-md-7-->
|
||||
|
||||
<!-- right column -->
|
||||
<div class="col-md-5" id="current_assets_box" style="display:none;">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/users/general.current_assets') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="current_assets_content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
|
@ -275,6 +255,5 @@ $(function() {
|
|||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
|
@ -2,81 +2,67 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/form.bulk_delete') }}
|
||||
|
||||
{{ trans('admin/hardware/form.bulk_delete') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
<p>{{ trans('admin/hardware/form.bulk_delete_help') }}</p>
|
||||
<form class="form-horizontal" method="post" action="{{ route('hardware/bulkdelete') }}" autocomplete="off" role="form">
|
||||
{{csrf_field()}}
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="color: red">{{ trans('admin/hardware/form.bulk_delete_warn', ['asset_count' => count($assets)]) }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<!-- left column -->
|
||||
<div class="col-md-12">
|
||||
|
||||
<p>{{ trans('admin/hardware/form.bulk_delete_help') }}</p>
|
||||
|
||||
<form class="form-horizontal" method="post" action="{{ route('hardware/bulkdelete') }}" autocomplete="off" role="form">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="color: red">{{ trans('admin/hardware/form.bulk_delete_warn', ['asset_count' => count($assets)]) }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>ID</td>
|
||||
<td>Name</td>
|
||||
<td>Location</td>
|
||||
<td>Assigned To</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td><input type="checkbox" name="bulk_edit[]" value="{{ $asset->id }}" checked="checked"></td>
|
||||
<td>{{ $asset->id }}</td>
|
||||
<td>{{ $asset->present()->name() }}</td>
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{{ $asset->assetloc->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assigneduser)
|
||||
{{ $asset->assigneduser->present()->fullName() }} ({{ $asset->assigneduser->username }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>ID</td>
|
||||
<td>Name</td>
|
||||
<td>Location</td>
|
||||
<td>Assigned To</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td><input type="checkbox" name="bulk_edit[]" value="{{ $asset->id }}" checked="checked"></td>
|
||||
<td>{{ $asset->id }}</td>
|
||||
<td>{{ $asset->present()->name() }}</td>
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{{ $asset->assetloc->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assigneduser)
|
||||
{{ $asset->assigneduser->present()->fullName() }} ({{ $asset->assigneduser->username }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.delete') }}</button>
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}" method="post" enctype="multipart/form-data">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success" id="submit-button"><i class="fa fa-check icon-white"></i> {{ trans('general.delete') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div><!-- /.box -->
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box -->
|
||||
</form>
|
||||
</div> <!-- .col-md-12-->
|
||||
</div><!--.row-->
|
||||
@stop
|
||||
|
|
|
@ -12,13 +12,8 @@
|
|||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
|
@ -28,143 +23,141 @@
|
|||
<i class="fa fa-warning"></i> {{ trans('admin/hardware/form.bulk_update_warn', ['asset_count' => count($assets)]) }}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="{{ route('hardware/bulksave') }}" autocomplete="off" role="form">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group {{ $errors->has('purchase_date') ? ' has-error' : '' }}">
|
||||
<label for="purchase_date" class="col-md-2 control-label">{{ trans('admin/hardware/form.date') }}</label>
|
||||
<div class="input-group col-md-3">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
{!! $errors->first('purchase_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.status') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<!-- Asset Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<label for="model_id" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.model') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('model_id', $models_list , Input::old('model_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('model_id', $models_list , Input::old('model_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.default_location') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? ' has-error' : '' }}">
|
||||
<label for="status_id" class="col-md-2 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? ' has-error' : '' }}">
|
||||
<label for="purchase_cost" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.cost') }}
|
||||
</label>
|
||||
<div class="input-group col-md-3">
|
||||
<span class="input-group-addon">{{ $snipeSettings->default_currency }}</span>
|
||||
<input type="text" class="form-control" placeholder="{{ trans('admin/hardware/form.cost') }}" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost') }}">
|
||||
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
{!! $errors->first('purchase_cost', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Supplier -->
|
||||
<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
|
||||
<label for="supplier_id" class="col-md-2 control-label">{{ trans('admin/hardware/form.supplier') }}</label>
|
||||
<!-- Supplier -->
|
||||
<div class="form-group {{ $errors->has('supplier_id') ? ' has-error' : '' }}">
|
||||
<label for="supplier_id" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.supplier') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id'), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
{{ Form::select('supplier_id', $supplier_list , Input::old('supplier_id'), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('supplier_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Company -->
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<!-- Company -->
|
||||
<div class="form-group {{ $errors->has('company_id') ? ' has-error' : '' }}">
|
||||
<label for="company_id" class="col-md-2 control-label">
|
||||
{{ trans('general.company') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
{{ Form::select('company_id', $companies_list , Input::old('company_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<label for="order_number" class="col-md-2 control-label">{{ trans('admin/hardware/form.order') }}</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number') }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
{{ Form::select('company_id', $companies_list , Input::old('company_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty -->
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="warranty_months" class="col-md-2 control-label">{{ trans('admin/hardware/form.warranty') }}</label>
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? ' has-error' : '' }}">
|
||||
<label for="order_number" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.order') }}
|
||||
</label>
|
||||
<div class="col-md-7">
|
||||
<input class="form-control" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number') }}" />
|
||||
{!! $errors->first('order_number', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warranty -->
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="warranty_months" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.warranty') }}
|
||||
</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group">
|
||||
<input class="col-md-2 form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months') }}" /> <span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
<div class="input-group">
|
||||
<input class="col-md-2 form-control" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months') }}" />
|
||||
<span class="input-group-addon">{{ trans('admin/hardware/form.months') }}</span>
|
||||
{!! $errors->first('warranty_months', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Requestable -->
|
||||
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? ' has-error' : '' }}">
|
||||
<label for="requestable" class="col-md-2 control-label">{{ trans('admin/hardware/form.requestable') }}</label>
|
||||
<!-- Requestable -->
|
||||
<div class="form-group {{ $errors->has('requestable') ? ' has-error' : '' }}">
|
||||
<label for="requestable" class="col-md-2 control-label">
|
||||
{{ trans('admin/hardware/form.requestable') }}
|
||||
</label>
|
||||
<div class="col-md-10">
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value="1"> Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value="0"> No
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value=""> Do Not Change
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value="1"> Yes
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value="0"> No
|
||||
</label>
|
||||
<label class="radio">
|
||||
<input type="radio" name="requestable" value=""> Do Not Change
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($assets as $key => $value)
|
||||
<input type="hidden" name="bulk_edit[{{ $key }}]" value="1">
|
||||
@endforeach
|
||||
</div> <!--/.box-body-->
|
||||
|
||||
@foreach ($assets as $key => $value)
|
||||
<input type="hidden" name="bulk_edit[{{ $key }}]" value="1">
|
||||
@endforeach
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-footer text-right">
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/.box.box-default-->
|
||||
</form>
|
||||
</div> <!--/.col-md-8-->
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -2,120 +2,107 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
@parent
|
||||
{{ trans('admin/hardware/general.checkin') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<style>
|
||||
|
||||
.input-group {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
.input-group {
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- left column -->
|
||||
<div class="col-md-9">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h3>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
|
||||
@if ($backto=='user')
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}"
|
||||
autocomplete="off">
|
||||
@else
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', $asset->id) }}" autocomplete="off">
|
||||
@endif
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
@if ($asset->model->name)
|
||||
<!-- Asset name -->
|
||||
<div class="form-group">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.model'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->model->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Asset Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name"
|
||||
value="{{ Input::old('name', $asset->name) }}"/>
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.status'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-statuslabel_types')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkin_at') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkin_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control"
|
||||
data-date-format="yyyy-mm-dd" placeholder="Checkin Date"
|
||||
name="checkin_at" id="checkin_at"
|
||||
value="{{ Input::old('checkin_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i
|
||||
class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkin_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note"
|
||||
name="note">{{ Input::old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success pull-right"><i
|
||||
class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h3>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
@if ($backto=='user')
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}"
|
||||
autocomplete="off">
|
||||
@else
|
||||
<form class="form-horizontal" method="post"
|
||||
action="{{ route('checkin/hardware', $asset->id) }}" autocomplete="off">
|
||||
@endif
|
||||
{{csrf_field()}}
|
||||
@if ($asset->model->name)
|
||||
<!-- AssetModel name -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', trans('admin/hardware/form.model'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->model->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Asset Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name"
|
||||
value="{{ Input::old('name', $asset->name) }}"/>
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.status'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('status_id', $statusLabel_list, '', array('class'=>'select2', 'style'=>'width:100%','id' =>'modal-statuslabel_types')) }}
|
||||
{!! $errors->first('status_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkin_at') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkin_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control"
|
||||
data-date-format="yyyy-mm-dd" placeholder="Checkin Date"
|
||||
name="checkin_at" id="checkin_at"
|
||||
value="{{ Input::old('checkin_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i
|
||||
class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkin_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note"
|
||||
name="note">{{ Input::old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success pull-right"><i
|
||||
class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!--/.col-md-12-->
|
||||
</div> <!--/.box-body-->
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
</div>
|
||||
</div> <!--/.box.box-default-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
@ -17,148 +16,122 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> {{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
|
||||
|
||||
@if ($asset->model->name)
|
||||
<!-- Asset name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.model'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->model->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Asset Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User -->
|
||||
<div id="assigned_user" class="form-group{{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
|
||||
{{ Form::label('assigned_to', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $asset->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkout_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Expected Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('expected_checkin', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@if ($asset->requireAcceptance())
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="text-yellow"><i class="fa fa-warning"></i> {{ trans('admin/categories/general.required_acceptance') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($asset->getEula())
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="text-yellow"><i class="fa fa-warning"></i> {{ trans('admin/categories/general.required_eula') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- right column -->
|
||||
<div class="col-md-5" id="current_assets_box" style="display:none;">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/users/general.current_assets') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="current_assets_content">
|
||||
</div>
|
||||
</div>
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
<div class="box box-default">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"> {{ trans('admin/hardware/form.tag') }} {{ $asset->asset_tag }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{csrf_field()}}
|
||||
@if ($asset->model->name)
|
||||
<!-- Asset name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.model'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<p class="form-control-static">{{ $asset->model->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Asset Name -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.name'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
|
||||
{!! $errors->first('name', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User -->
|
||||
<div id="assigned_user" class="form-group{{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
{{ Form::label('assigned_to', trans('admin/hardware/form.checkout_to'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-7 required">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $asset->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Checkout/Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('checkout_at') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.checkout_date'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group required">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="checkout_at" id="checkout_at" value="{{ Input::old('checkout_at', date('Y-m-d')) }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('checkout_at', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Expected Checkin Date -->
|
||||
<div class="form-group {{ $errors->has('expected_checkin') ? 'error' : '' }}">
|
||||
{{ Form::label('name', trans('admin/hardware/form.expected_checkin'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-4 input-group">
|
||||
<input type="date" class="datepicker form-control" data-date-format="yyyy-mm-dd" name="expected_checkin" id="expected_checkin" value="{{ Input::old('expected_checkin') }}">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
{!! $errors->first('expected_checkin', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
{{ Form::label('note', trans('admin/hardware/form.notes'), array('class' => 'col-md-3 control-label')) }}
|
||||
<div class="col-md-8">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $asset->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($asset->requireAcceptance())
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="text-yellow">
|
||||
<i class="fa fa-warning"></i>
|
||||
{{ trans('admin/categories/general.required_acceptance') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->getEula())
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
<p class="text-yellow"><i class="fa fa-warning"></i> {{ trans('admin/categories/general.required_eula') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div> <!--/.box-body-->
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}"> {{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!--/.col-md-7-->
|
||||
|
||||
|
||||
<!-- right column -->
|
||||
<div class="col-md-5" id="current_assets_box" style="display:none;">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('admin/users/general.current_assets') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div id="current_assets_content">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
|
@ -339,5 +312,3 @@ $(function() {
|
|||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -1,144 +0,0 @@
|
|||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/general.clone') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
<div class="page-header">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ URL::previous() }}" class="btn-flat gray"><i class="fa fa-arrow-left icon-white"></i> {{ trans('general.back') }}</a>
|
||||
</div>
|
||||
|
||||
<h3>{{ trans('admin/hardware/general.clone') }}</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? 'error' : '' }}">
|
||||
<label class="control-label" for="asset_tag">{{ trans('admin/hardware/form.tag') }}</label>
|
||||
<div class="controls">
|
||||
<input class="col-md-4" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $asset->asset_tag) }}" />
|
||||
{!! $errors->first('asset_tag', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Asset Title -->
|
||||
<div class="form-group {{ $errors->has('name') ? 'error' : '' }}">
|
||||
<label class="control-label" for="name">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="controls">
|
||||
<input class="col-md-4" type="text" name="name" id="name" value="{{ Input::old('name', $asset->name) }}" />
|
||||
{!! $errors->first('name', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group {{ $errors->has('serial') ? 'error' : '' }}">
|
||||
<label class="control-label" for="serial">{{ trans('admin/hardware/form.serial') }}</label>
|
||||
<div class="controls">
|
||||
<input class="col-md-4" type="text" name="serial" id="serial" value="{{ Input::old('serial', $asset->serial) }}" />
|
||||
{!! $errors->first('serial', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order Number -->
|
||||
<div class="form-group {{ $errors->has('order_number') ? 'error' : '' }}">
|
||||
<label class="control-label" for="order_number">{{ trans('admin/hardware/form.order') }}</label>
|
||||
<div class="controls">
|
||||
<input class="col-md-4" type="text" name="order_number" id="order_number" value="{{ Input::old('order_number', $asset->order_number) }}" />
|
||||
{!! $errors->first('order_number', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="parent">{{ trans('admin/hardware/form.model') }}</label>
|
||||
<div class="controls">
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $asset->model_id), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('model_id', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Date -->
|
||||
<div class="form-group input-append {{ $errors->has('purchase_date') ? 'error' : '' }}" >
|
||||
<label class="control-label" for="purchase_date">{{ trans('admin/hardware/form.date') }}</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="datepicker span2" data-date-format="yyyy-mm-dd" placeholder="Select Date" name="purchase_date" id="purchase_date" value="{{ Input::old('purchase_date', $asset->purchase_date) }}">
|
||||
{!! $errors->first('purchase_date', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchase Cost -->
|
||||
<div class="form-group {{ $errors->has('purchase_cost') ? 'error' : '' }}">
|
||||
<label class="control-label" for="purchase_cost">{{ trans('admin/hardware/form.cost') }}</label>
|
||||
<div class="controls">
|
||||
<div class="input-prepend">
|
||||
<span class="add-on">$</span>
|
||||
<input class="col-md-2" type="text" name="purchase_cost" id="purchase_cost" value="{{ Input::old('purchase_cost', $asset->purchase_cost) }}" />
|
||||
{!! $errors->first('purchase_cost', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Warrantee -->
|
||||
<div class="form-group {{ $errors->has('warranty_months') ? 'error' : '' }}">
|
||||
<label class="control-label" for="serial">{{ trans('admin/hardware/form.warranty') }}</label>
|
||||
<div class="controls">
|
||||
<input class="col-md-1" type="text" name="warranty_months" id="warranty_months" value="{{ Input::old('warranty_months', $asset->warranty_months) }}" />
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
{!! $errors->first('warranty_months', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Depreciation -->
|
||||
<div class="form-group {{ $errors->has('depreciation_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="parent">{{ trans('admin/hardware/form.depreciation') }}</label>
|
||||
<div class="controls">
|
||||
<div class="field-box">
|
||||
{{ Form::select('depreciation_id', $depreciation_list , Input::old('depreciation_id', $asset->depreciation_id), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
{!! $errors->first('depreciation_id', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Status -->
|
||||
<div class="form-group {{ $errors->has('status_id') ? 'error' : '' }}">
|
||||
<label class="control-label" for="parent">{{ trans('admin/hardware/form.status') }}</label>
|
||||
<div class="controls">
|
||||
<div class="field-box">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id', $asset->status_id), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
{!! $errors->first('depreciation_id', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group {{ $errors->has('notes') ? 'error' : '' }}">
|
||||
<label class="control-label" for="notes">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="controls">
|
||||
<textarea class="col-md-6 form-control" id="notes" name="notes">{{ Input::old('notes', $asset->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="help-inline"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<div class="controls">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn-flat success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
@stop
|
|
@ -12,126 +12,122 @@
|
|||
|
||||
@section('inputFields')
|
||||
|
||||
@include ('partials.forms.edit.company')
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
|
||||
@include ('partials.forms.edit.company')
|
||||
<!-- Asset Tag -->
|
||||
<div class="form-group {{ $errors->has('asset_tag') ? ' has-error' : '' }}">
|
||||
<label for="asset_tag" class="col-md-3 control-label">{{ trans('admin/hardware/form.tag') }}</label>
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
|
||||
@if ($item->id)
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
|
||||
@else
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
|
||||
@endif
|
||||
<div class="col-md-7 col-sm-12{{ (\App\Helpers\Helper::checkIfRequired($item, 'asset_tag')) ? ' required' : '' }}">
|
||||
@if ($item->id)
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', $item->asset_tag) }}" />
|
||||
@else
|
||||
<input class="form-control" type="text" name="asset_tag" id="asset_tag" value="{{ Input::old('asset_tag', \App\Models\Asset::autoincrement_asset()) }}">
|
||||
@endif
|
||||
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<!-- Model -->
|
||||
<div class="form-group {{ $errors->has('model_id') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.model') }}</label>
|
||||
<div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($item, 'model_id')) ? ' required' : '' }}">
|
||||
@if (isset($selected_model))
|
||||
{{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
|
||||
@else
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $item->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
@endif
|
||||
|
||||
<!-- onclick="return dependency('model')" -->
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
|
||||
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id='custom_fields_content'>
|
||||
<!-- Custom Fields -->
|
||||
@if ($item->model && $item->model->fieldset)
|
||||
<?php $model=$item->model; ?>
|
||||
@endif
|
||||
@if (Input::old('model_id'))
|
||||
<?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
|
||||
@elseif (isset($selected_model))
|
||||
<?php $model=$selected_model; ?>
|
||||
@endif
|
||||
@if (isset($model) && $model)
|
||||
@include("models/custom_fields_form",["model" => $model])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.status')
|
||||
|
||||
@if (!$item->id)
|
||||
<!-- Assigned To -->
|
||||
<div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $item->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('partials.forms.edit.serial', ['translated_serial' => trans('admin/hardware/form.serial')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
<?php
|
||||
$currency_type=null;
|
||||
if ($item->id && $item->assetloc) {
|
||||
$currency_type = $item->assetloc->currency;
|
||||
}
|
||||
?>
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type])
|
||||
@include ('partials.forms.edit.warranty')
|
||||
@include ('partials.forms.edit.notes')
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
|
||||
<label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $item->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }}
|
||||
|
||||
{!! $errors->first('rtd_location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
<div class="col-md-7 col-sm-10{{ (\App\Helpers\Helper::checkIfRequired($item, 'model_id')) ? ' required' : '' }}">
|
||||
@if (isset($selected_model))
|
||||
{{ Form::select('model_id', $model_list , $selected_model->id, array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
@else
|
||||
{{ Form::select('model_id', $model_list , Input::old('model_id', $item->model_id), array('class'=>'select2 model', 'style'=>'width:100%','id' =>'model_select_id')) }}
|
||||
@endif
|
||||
<!-- onclick="return dependency('model')" -->
|
||||
{!! $errors->first('model_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="model" data-select="model_select_id" class="btn btn-sm btn-default">New</a>
|
||||
<span class="mac_spinner" style="padding-left: 10px; color: green; display:none; width: 30px;"><i class="fa fa-spinner fa-spin"></i> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
|
||||
|
||||
<!-- Image -->
|
||||
@if ($item->image)
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<div id='custom_fields_content'>
|
||||
<!-- Custom Fields -->
|
||||
@if ($item->model && $item->model->fieldset)
|
||||
<?php $model=$item->model; ?>
|
||||
@endif
|
||||
@if (Input::old('model_id'))
|
||||
<?php $model=\App\Models\AssetModel::find(Input::old('model_id')); ?>
|
||||
@elseif (isset($selected_model))
|
||||
<?php $model=$selected_model; ?>
|
||||
@endif
|
||||
@if (isset($model) && $model)
|
||||
@include("models/custom_fields_form",["model" => $model])
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.status')
|
||||
|
||||
@if (!$item->id)
|
||||
<!-- Assigned To -->
|
||||
<div id="assigned_user" style="display: none;" class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="parent" class="col-md-3 control-label">
|
||||
{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
<div class="col-md-7 col-sm-12">
|
||||
{{ Form::select('assigned_to', $assigned_to , Input::old('assigned_to', $item->assigned_to), array('class'=>'select2', 'id'=>'assigned_to', 'style'=>'width:100%')) }}
|
||||
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left" style="margin-left: -20px; padding-top: 3px">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency="user" data-select='assigned_to' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@include ('partials.forms.edit.serial', ['translated_serial' => trans('admin/hardware/form.serial')])
|
||||
@include ('partials.forms.edit.name', ['translated_name' => trans('admin/hardware/form.name')])
|
||||
@include ('partials.forms.edit.purchase_date')
|
||||
@include ('partials.forms.edit.supplier')
|
||||
@include ('partials.forms.edit.order_number')
|
||||
<?php
|
||||
$currency_type=null;
|
||||
if ($item->id && $item->assetloc) {
|
||||
$currency_type = $item->assetloc->currency;
|
||||
}
|
||||
?>
|
||||
@include ('partials.forms.edit.purchase_cost', ['currency_type' => $currency_type])
|
||||
@include ('partials.forms.edit.warranty')
|
||||
@include ('partials.forms.edit.notes')
|
||||
|
||||
<!-- Default Location -->
|
||||
<div class="form-group {{ $errors->has('rtd_location_id') ? ' has-error' : '' }}">
|
||||
<label for="rtd_location_id" class="col-md-3 control-label">{{ trans('admin/hardware/form.default_location') }}</label>
|
||||
<div class="col-md-7 col-sm-11">
|
||||
{{ Form::select('rtd_location_id', $location_list , Input::old('rtd_location_id', $item->rtd_location_id), array('class'=>'select2', 'style'=>'width:100%','id'=>'rtd_location_select')) }}
|
||||
|
||||
{!! $errors->first('rtd_location_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-1 col-sm-1 text-left">
|
||||
<a href='#' data-toggle="modal" data-target="#createModal" data-dependency='location' data-select='rtd_location_select' class="btn btn-sm btn-default">New</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@include ('partials.forms.edit.requestable', ['requestable_text' => trans('admin/hardware/general.requestable')])
|
||||
|
||||
<!-- Image -->
|
||||
@if ($item->image)
|
||||
<div class="form-group {{ $errors->has('image_delete') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
|
||||
<img src="{{ url('/') }}/uploads/assets/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
{{ Form::checkbox('image_delete'),array('class' => 'minimal') }}
|
||||
<img src="{{ url('/') }}/uploads/assets/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('image') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="image">{{ trans('general.image_upload') }}</label>
|
||||
<div class="col-md-5">
|
||||
<!-- {{ Form::file('image') }} -->
|
||||
<input type="file" id="file-upload" accept="image/*" name="image">
|
||||
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||
<input type="file" id="file-upload" accept="image/*" name="image">
|
||||
{!! $errors->first('image', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.import') }}
|
||||
{{ trans('general.import') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
@ -10,145 +10,141 @@
|
|||
@section('content')
|
||||
|
||||
|
||||
{{-- Modal import dialog --}}
|
||||
|
||||
@if (session()->has('import_errors'))
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning</strong> {{trans('admin/hardware/message.import.errorDetail')}}
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="alert alert-warning">
|
||||
<strong>Warning</strong> {{trans('admin/hardware/message.import.errorDetail')}}
|
||||
</div>
|
||||
|
||||
<div class="errors-table">
|
||||
|
||||
<table class="table table-striped table-bordered" id="errors-table">
|
||||
<thead>
|
||||
<th>Asset</th>
|
||||
<th>Errors</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (session('import_errors') as $asset => $itemErrors)
|
||||
<tr>
|
||||
<td> {{ $asset }}</td>
|
||||
<td>
|
||||
@foreach ($itemErrors as $field => $values )
|
||||
<b>{{ $field }}:</b>
|
||||
@foreach( $values as $errorString)
|
||||
<span>{{$errorString[0]}} </span>
|
||||
@endforeach
|
||||
<br />
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-striped table-bordered" id="errors-table">
|
||||
<thead>
|
||||
<th>Asset</th>
|
||||
<th>Errors</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (session('import_errors') as $asset => $itemErrors)
|
||||
<tr>
|
||||
<td> {{ $asset }}</td>
|
||||
<td>
|
||||
@foreach ($itemErrors as $field => $values )
|
||||
<b>{{ $field }}:</b>
|
||||
@foreach( $values as $errorString)
|
||||
<span>{{$errorString[0]}} </span>
|
||||
@endforeach
|
||||
<br />
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
{{-- Modal import dialog --}}
|
||||
<div class="modal fade" id="importModal">
|
||||
<form id="import-modal-form" class="form-horizontal" method="post" action="{{ route('assets/import/process-file') }}" autocomplete="off" role="form">
|
||||
{{ csrf_field()}}
|
||||
<input type="hidden" id="modal-filename" name="filename" value="">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Import File:</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<label for="import-type">Import Type:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
{{ Form::select('import-type', array('asset' => 'Assets', 'accessory' => "Accessories", 'consumable' => "Consumables", 'component' => "Components") , 'asset', array('class'=>'select2 parent', 'style'=>'width:100%','id' =>'import-type')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<label for="import-update">Update Existing Values?:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
{{ Form::checkbox('import-update') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<!-- <button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button> -->
|
||||
{{Form::submit(trans('general.save'), ['class' => 'btn btn-primary'])}}
|
||||
</div>
|
||||
</div>
|
||||
<form id="import-modal-form" class="form-horizontal" method="post" action="{{ route('assets/import/process-file') }}" autocomplete="off" role="form">
|
||||
{{ csrf_field()}}
|
||||
<input type="hidden" id="modal-filename" name="filename" value="">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">Import File:</h4>
|
||||
</div>
|
||||
</form>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<label for="import-type">Import Type:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
{{ Form::select('import-type', array('asset' => 'Assets', 'accessory' => "Accessories", 'consumable' => "Consumables", 'component' => "Components") , 'asset', array('class'=>'select2 parent', 'style'=>'width:100%','id' =>'import-type')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="dynamic-form-row">
|
||||
<div class="col-md-4 col-xs-12">
|
||||
<label for="import-update">Update Existing Values?:</label>
|
||||
</div>
|
||||
<div class="col-md-8 col-xs-12">
|
||||
{{ Form::checkbox('import-update') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<!-- <button type="button" class="btn btn-primary" id="modal-save">{{ trans('general.save') }}</button> -->
|
||||
{{Form::submit(trans('general.save'), ['class' => 'btn btn-primary'])}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="col-md-3">
|
||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||
<span class="btn btn-info fileinput-button">
|
||||
<i class="fa fa-plus icon-white"></i>
|
||||
<span>Select Import File...</span>
|
||||
<!-- The file input field used as target for the file upload widget -->
|
||||
<input id="fileupload" type="file" name="files[]" data-url="{{ url('/') }}/api/hardware/import" accept="text/csv">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-9" id="progress-container" style="visibility: hidden; padding-bottom: 20px;">
|
||||
<!-- The global progress bar -->
|
||||
<div class="col-md-11">
|
||||
<div id="progress" class="progress progress-striped active" style="margin-top: 8px;">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
|
||||
<span id="progress-bar-text">0% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="pull-right progress-checkmark" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-striped" id="upload-table">
|
||||
<thead>
|
||||
<th>File</th>
|
||||
<th>Created</th>
|
||||
<th>Size</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<td>{{ $file['filename'] }}</td>
|
||||
<td>{{ date("M d, Y g:i A", $file['modified']) }} </td>
|
||||
<td>{{ $file['filesize'] }}</td>
|
||||
<td>
|
||||
<a href="#" data-toggle="modal" data-target="#importModal" data-filename={{$file['filename']}} class="btn btn-sm btn-info"><i class="fa fa-spinner process"></i> Process</a>
|
||||
<a class="btn btn-danger btn-sm" href="import/delete/{{ $file['filename'] }}"><i class="fa fa-trash icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<div class="col-md-3">
|
||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||
<span class="btn btn-info fileinput-button">
|
||||
<i class="fa fa-plus icon-white"></i>
|
||||
<span>Select Import File...</span>
|
||||
<!-- The file input field used as target for the file upload widget -->
|
||||
<input id="fileupload" type="file" name="files[]" data-url="{{ url('/') }}/api/hardware/import" accept="text/csv">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-9" id="progress-container" style="visibility: hidden; padding-bottom: 20px;">
|
||||
<!-- The global progress bar -->
|
||||
<div class="col-md-11">
|
||||
<div id="progress" class="progress progress-striped active" style="margin-top: 8px;">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
|
||||
<span id="progress-bar-text">0% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="pull-right progress-checkmark" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-striped" id="upload-table">
|
||||
<thead>
|
||||
<th>File</th>
|
||||
<th>Created</th>
|
||||
<th>Size</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<td>{{ $file['filename'] }}</td>
|
||||
<td>{{ date("M d, Y g:i A", $file['modified']) }} </td>
|
||||
<td>{{ $file['filesize'] }}</td>
|
||||
<td>
|
||||
<a href="#" data-toggle="modal" data-target="#importModal" data-filename={{$file['filename']}} class="btn btn-sm btn-info"><i class="fa fa-spinner process"></i> Process</a>
|
||||
<a class="btn btn-danger btn-sm" href="import/delete/{{ $file['filename'] }}"><i class="fa fa-trash icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/lib/jquery.fileupload.css') }}">
|
||||
|
@ -218,5 +214,3 @@
|
|||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -2,32 +2,31 @@
|
|||
|
||||
@section('title0')
|
||||
|
||||
@if (Input::get('status'))
|
||||
@if (Input::get('status')=='Pending')
|
||||
{{ trans('general.pending') }}
|
||||
@elseif (Input::get('status')=='RTD')
|
||||
{{ trans('general.ready_to_deploy') }}
|
||||
@elseif (Input::get('status')=='Undeployable')
|
||||
{{ trans('general.undeployable') }}
|
||||
@elseif (Input::get('status')=='Deployable')
|
||||
{{ trans('general.deployed') }}
|
||||
@elseif (Input::get('status')=='Requestable')
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
@elseif (Input::get('status')=='Archived')
|
||||
{{ trans('general.archived') }}
|
||||
@elseif (Input::get('status')=='Deleted')
|
||||
{{ trans('general.deleted') }}
|
||||
@endif
|
||||
@else
|
||||
{{ trans('general.all') }}
|
||||
@endif
|
||||
|
||||
{{ trans('general.assets') }}
|
||||
@if (Input::get('status'))
|
||||
@if (Input::get('status')=='Pending')
|
||||
{{ trans('general.pending') }}
|
||||
@elseif (Input::get('status')=='RTD')
|
||||
{{ trans('general.ready_to_deploy') }}
|
||||
@elseif (Input::get('status')=='Undeployable')
|
||||
{{ trans('general.undeployable') }}
|
||||
@elseif (Input::get('status')=='Deployable')
|
||||
{{ trans('general.deployed') }}
|
||||
@elseif (Input::get('status')=='Requestable')
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
@elseif (Input::get('status')=='Archived')
|
||||
{{ trans('general.archived') }}
|
||||
@elseif (Input::get('status')=='Deleted')
|
||||
{{ trans('general.deleted') }}
|
||||
@endif
|
||||
@else
|
||||
{{ trans('general.all') }}
|
||||
@endif
|
||||
{{ trans('general.assets') }}
|
||||
@stop
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@yield('title0') @parent
|
||||
@yield('title0') @parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
|
@ -39,102 +38,87 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['hardware/bulkedit'],
|
||||
'class' => 'form-inline' ]) }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if (Input::get('status')!='Deleted')
|
||||
<div id="toolbar">
|
||||
<select name="bulk_actions" class="form-control select2">
|
||||
<option value="edit">Edit</option>
|
||||
<option value="delete">Delete</option>
|
||||
<option value="labels">Generate Labels</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</div>
|
||||
@endif
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['hardware/bulkedit'],
|
||||
'class' => 'form-inline' ]) }}
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if (Input::get('status')!='Deleted')
|
||||
<div id="toolbar">
|
||||
<select name="bulk_actions" class="form-control select2">
|
||||
<option value="edit">Edit</option>
|
||||
<option value="delete">Delete</option>
|
||||
<option value="labels">Generate Labels</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<table
|
||||
name="assets"
|
||||
{{-- data-row-style="rowStyle" --}}
|
||||
data-toolbar="#toolbar"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.hardware.list', array(''=>e(Input::get('status')),'order_number'=>e(Input::get('order_number')), 'status_id'=>e(Input::get('status_id'))))}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
@if (Input::get('status')!='Deleted')
|
||||
<th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
|
||||
@endif
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="companyName" data-searchable="true" data-sortable="true" data-switchable="true" data-visible="false">{{ trans('general.company') }}</th>
|
||||
<th data-sortable="true" data-field="image" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>
|
||||
<th data-sortable="true" data-field="name" data-visible="false">{{ trans('admin/hardware/form.name') }}</th>
|
||||
<th data-sortable="true" data-field="asset_tag">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th data-sortable="true" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||
<th data-sortable="true" data-field="status_label">{{ trans('admin/hardware/table.status') }}</th>
|
||||
<th data-sortable="true" data-field="assigned_to">{{ trans('admin/hardware/form.checkedout_to') }}</th>
|
||||
<th data-sortable="true" data-field="location" data-searchable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th data-sortable="true" data-field="category" data-searchable="true">{{ trans('general.category') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-searchable="true" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="purchase_cost" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.cost') }}</th>
|
||||
<th data-sortable="true" data-field="purchase_date" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.date') }}</th>
|
||||
<th data-sortable="false" data-field="eol" data-searchable="true">{{ trans('general.eol') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number">{{ trans('admin/hardware/form.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="last_checkout">{{ trans('admin/hardware/table.checkout_date') }}</th>
|
||||
<th data-sortable="true" data-field="expected_checkin" data-searchable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
@foreach(\App\Models\CustomField::all() AS $field)
|
||||
|
||||
|
||||
<table
|
||||
name="assets"
|
||||
{{-- data-row-style="rowStyle" --}}
|
||||
data-toolbar="#toolbar"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.hardware.list', array(''=>e(Input::get('status')),'order_number'=>e(Input::get('order_number')), 'status_id'=>e(Input::get('status_id'))))}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="{{ e(Input::get('status')) }}assetTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
@if (Input::get('status')!='Deleted')
|
||||
<th data-class="hidden-xs" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox"><div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;"></div></th>
|
||||
@endif
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="companyName" data-searchable="true" data-sortable="true" data-switchable="true" data-visible="false">{{ trans('general.company') }}</th>
|
||||
<th data-sortable="true" data-field="image" data-visible="false">{{ trans('admin/hardware/table.image') }}</th>
|
||||
<th data-sortable="true" data-field="name" data-visible="false">{{ trans('admin/hardware/form.name') }}</th>
|
||||
<th data-sortable="true" data-field="asset_tag">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th data-sortable="true" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||
<th data-sortable="true" data-field="status_label">{{ trans('admin/hardware/table.status') }}</th>
|
||||
<th data-sortable="true" data-field="assigned_to">{{ trans('admin/hardware/form.checkedout_to') }}</th>
|
||||
<th data-sortable="true" data-field="location" data-searchable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th data-sortable="true" data-field="category" data-searchable="true">{{ trans('general.category') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-searchable="true" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="purchase_cost" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.cost') }}</th>
|
||||
<th data-sortable="true" data-field="purchase_date" data-searchable="true" data-visible="false">{{ trans('admin/hardware/form.date') }}</th>
|
||||
<th data-sortable="false" data-field="eol" data-searchable="true">{{ trans('general.eol') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number">{{ trans('admin/hardware/form.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="last_checkout">{{ trans('admin/hardware/table.checkout_date') }}</th>
|
||||
<th data-sortable="true" data-field="expected_checkin" data-searchable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
@foreach(\App\Models\CustomField::all() AS $field)
|
||||
<th data-sortable="{{ ($field->field_encrypted=='1' ? 'false' : 'true') }}" data-visible="false" data-field="{{$field->db_column_name()}}">
|
||||
@if ($field->field_encrypted=='1')
|
||||
<i class="fa fa-lock"></i>
|
||||
@endif
|
||||
|
||||
{{$field->name}}
|
||||
</th>
|
||||
|
||||
<th data-sortable="{{ ($field->field_encrypted=='1' ? 'false' : 'true') }}" data-visible="false" data-field="{{$field->db_column_name()}}">
|
||||
@if ($field->field_encrypted=='1')
|
||||
<i class="fa fa-lock"></i>
|
||||
@endif
|
||||
|
||||
{{$field->name}}
|
||||
</th>
|
||||
|
||||
@endforeach
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="change">{{ trans('admin/hardware/table.change') }}</th>
|
||||
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{-- <tfoot>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<select name="bulk_actions" class="form-control">
|
||||
<option value="edit">Edit</option>
|
||||
<option value="delete">Delete</option>
|
||||
<option value="labels">Generate Labels</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot> --}}
|
||||
</table>
|
||||
{{ Form::close() }}
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="change">{{ trans('admin/hardware/table.change') }}</th>
|
||||
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
{{ Form::close() }}
|
||||
</div><!-- ./box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', [
|
||||
|
@ -162,5 +146,3 @@
|
|||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('admin/hardware/general.view') }} {{ $asset->asset_tag }}
|
||||
{{ trans('admin/hardware/general.view') }} {{ $asset->asset_tag }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
@ -11,196 +11,206 @@
|
|||
|
||||
<div class="row header">
|
||||
<div class="col-md-12">
|
||||
<h3 class="name">
|
||||
{{ trans('admin/hardware/general.view') }}
|
||||
{{ $asset->asset_tag }}
|
||||
@if ($asset->name)
|
||||
({{ $asset->name }})
|
||||
@endif
|
||||
</h3>
|
||||
<h3 class="name">
|
||||
{{ trans('admin/hardware/general.view') }}
|
||||
{{ $asset->asset_tag }}
|
||||
@if ($asset->name)
|
||||
({{ $asset->name }})
|
||||
@endif
|
||||
</h3>
|
||||
|
||||
<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">
|
||||
@if ($asset->status_id == 1)
|
||||
@if ($asset->assigned_to != 0)
|
||||
<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">
|
||||
@if ($asset->status_id == 1)
|
||||
@if ($asset->assigned_to != 0)
|
||||
<li role="presentation"><a href="{{ route('checkin/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkin') }}</a></li>
|
||||
@endif
|
||||
@elseif ($asset->status_id == 0)
|
||||
<li role="presentation"><a href="{{ route('checkout/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@endif
|
||||
@elseif ($asset->status_id == 0)
|
||||
<li role="presentation"><a href="{{ route('checkout/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@endif
|
||||
<li role="presentation"><a href="{{ route('hardware.edit', $asset->id) }}">{{ trans('admin/hardware/general.edit') }}</a></li>
|
||||
<li role="presentation"><a href="{{ route('clone/hardware', $asset->id) }}">{{ trans('admin/hardware/general.clone') }}</a></li>
|
||||
</ul>
|
||||
<li role="presentation"><a href="{{ route('hardware.edit', $asset->id) }}">{{ trans('admin/hardware/general.edit') }}</a></li>
|
||||
<li role="presentation"><a href="{{ route('clone/hardware', $asset->id) }}">{{ trans('admin/hardware/general.clone') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="user-profile">
|
||||
<div class="row profile">
|
||||
<div class="col-md-9 bio">
|
||||
<div class="row profile">
|
||||
<div class="col-md-9 bio">
|
||||
<div class="col-md-12">
|
||||
@if ($asset->model->deleted_at!='')
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="fa fa-warning"></i>
|
||||
{{ trans('admin/hardware/general.model_deleted', array('model_id' => $asset->model->id)) }}
|
||||
</div>
|
||||
@elseif ($asset->deleted_at!='')
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="fa fa-warning"></i>
|
||||
{{ trans('admin/hardware/general.deleted', array('asset_id' => $asset->id)) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->model->deleted_at!='')
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="fa fa-warning"></i>
|
||||
{{ trans('admin/hardware/general.model_deleted', array('model_id' => $asset->model->id)) }}
|
||||
</div>
|
||||
@elseif ($asset->deleted_at!='')
|
||||
<div class="alert alert-warning alert-block">
|
||||
<i class="fa fa-warning"></i>
|
||||
{{ trans('admin/hardware/general.deleted', array('asset_id' => $asset->id)) }}
|
||||
</div>
|
||||
@endif
|
||||
@if ($asset->serial)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
|
||||
<em>{{ $asset->serial }}</em></div>
|
||||
@endif
|
||||
|
||||
@if ($asset->serial)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.serial') }}: </strong>
|
||||
<em>{{ $asset->serial }}</em></div>
|
||||
@if ($asset->mac_address!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.mac_address') }}:</strong>
|
||||
{{ $asset->mac_address }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@if ($asset->model->manufacturer)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.manufacturer') }}: </strong>
|
||||
<a href="{{ route('manufacturers.edit', $asset->model->manufacturer->id) }}">
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.model') }}:</strong>
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">
|
||||
{{ $asset->model->name }}
|
||||
</a>
|
||||
/ {{ $asset->model->model_number }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->mac_address!='')
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.mac_address') }}:</strong>
|
||||
{{ $asset->mac_address }}
|
||||
@if ($asset->purchase_date)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.date') }}: </strong>
|
||||
{{ $asset->purchase_date }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($asset->purchase_cost,2) }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->order_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.order') }}:</strong>
|
||||
{{ $asset->order_number }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->supplier_id)
|
||||
<div class="col-md-6" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.supplier') }}: </strong>
|
||||
<a href="{{ route('suppliers.show', $asset->supplier_id) }}">
|
||||
{{ $asset->supplier->name }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->warranty_months)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.warranty') }}:</strong>
|
||||
{{ $asset->warranty_months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
</div>
|
||||
<div class="col-md-12 {{ $asset->present()->warrantee_expires() < date("Y-m-d H:i:s") ? 'ui-state-highlight' : '' }}" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.expires') }}:</strong>
|
||||
{{ $asset->present()->warrantee_expires() }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->depreciation)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.depreciation') }}: </strong>
|
||||
{{ $asset->depreciation->name }}
|
||||
({{ $asset->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.fully_depreciated') }}: </strong>
|
||||
@if ($asset->time_until_depreciated()->y > 0)
|
||||
{{ $asset->time_until_depreciated()->y }}
|
||||
{{ trans('admin/hardware/form.years') }},
|
||||
@endif
|
||||
|
||||
{{ $asset->time_until_depreciated()->m }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
({{ $asset->depreciated_date()->format('Y-m-d') }})
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($asset->model->eol)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.eol_rate') }}: </strong>
|
||||
{{ $asset->model->eol }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.eol_date') }}: </strong>
|
||||
{{ $asset->present()->eol_date() }}
|
||||
@if ($asset->present()->months_until_eol())
|
||||
(
|
||||
@if ($asset->present()->months_until_eol()->y > 0) {{ $asset->present()->months_until_eol()->y }}
|
||||
{{ trans('general.years') }},
|
||||
@endif
|
||||
{{ $asset->present()->months_until_eol()->m }}
|
||||
{{ trans('general.months') }}
|
||||
)
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->model->manufacturer)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.manufacturer') }}: </strong>
|
||||
<a href="{{ route('manufacturers.edit', $asset->model->manufacturer->id) }}">
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
</a> </div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.model') }}:</strong>
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">
|
||||
{{ $asset->model->name }}
|
||||
</a>
|
||||
/ {{ $asset->model->model_number }}</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->purchase_date)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.date') }}: </strong>
|
||||
{{ $asset->purchase_date }} </div>
|
||||
@endif
|
||||
|
||||
@if ($asset->purchase_cost)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.cost') }}:</strong>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($asset->purchase_cost,2) }} </div>
|
||||
@endif
|
||||
|
||||
@if ($asset->order_number)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.order') }}:</strong>
|
||||
{{ $asset->order_number }} </div>
|
||||
@endif
|
||||
|
||||
@if ($asset->supplier_id)
|
||||
<div class="col-md-6" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.supplier') }}: </strong>
|
||||
<a href="{{ route('suppliers.show', $asset->supplier_id) }}">
|
||||
{{ $asset->supplier->name }}
|
||||
</a> </div>
|
||||
@endif
|
||||
|
||||
@if ($asset->warranty_months)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.warranty') }}:</strong>
|
||||
{{ $asset->warranty_months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
<div class="col-md-12">
|
||||
<!-- Licenses assets table -->
|
||||
<h6>Software Assigned </h6>
|
||||
<br>
|
||||
<!-- checked out assets table -->
|
||||
@if (count($asset->licenses) > 0)
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th class="col-md-1"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($asset->licenseseats as $seat)
|
||||
<tr>
|
||||
<td><a href="{{ route('licenses.show', $seat->license->id) }}">{{ $seat->license->name }}</a></td>
|
||||
<td>{{ $seat->license->serial }}</td>
|
||||
<td><a href="{{ route('licenses.checkin', $seat->id) }}" class="btn-flat info">{{ trans('general.checkin') }}</a>
|
||||
</td>
|
||||
</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') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-12 {{ $asset->present()->warrantee_expires() < date("Y-m-d H:i:s") ? 'ui-state-highlight' : '' }}" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.expires') }}:</strong>
|
||||
{{ $asset->present()->warrantee_expires() }}</div>
|
||||
@endif
|
||||
|
||||
@if ($asset->depreciation)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.depreciation') }}: </strong>
|
||||
{{ $asset->depreciation->name }}
|
||||
({{ $asset->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)</div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;"><strong>{{ trans('admin/hardware/form.fully_depreciated') }}: </strong>
|
||||
@if ($asset->time_until_depreciated()->y > 0)
|
||||
{{ $asset->time_until_depreciated()->y }}
|
||||
{{ trans('admin/hardware/form.years') }},
|
||||
@endif
|
||||
{{ $asset->time_until_depreciated()->m }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
({{ $asset->depreciated_date()->format('Y-m-d') }})
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-12">
|
||||
<h6>
|
||||
{{ trans('general.file_uploads') }} [ <a href="#" data-toggle="modal" data-target="#uploadFileModal">{{trans('button.add')}} </a> ]
|
||||
</h6>
|
||||
|
||||
|
||||
@if ($asset->model->eol)
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.eol_rate') }}: </strong>
|
||||
{{ $asset->model->eol }}
|
||||
{{ trans('admin/hardware/form.months') }} </div>
|
||||
<div class="col-md-12" style="padding-bottom: 5px;">
|
||||
<strong>{{ trans('admin/hardware/form.eol_date') }}: </strong>
|
||||
{{ $asset->present()->eol_date() }}
|
||||
@if ($asset->present()->months_until_eol())
|
||||
(
|
||||
@if ($asset->present()->months_until_eol()->y > 0) {{ $asset->present()->months_until_eol()->y }}
|
||||
{{ trans('general.years') }},
|
||||
@endif
|
||||
|
||||
{{ $asset->present()->months_until_eol()->m }}
|
||||
{{ trans('general.months') }}
|
||||
)
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<!-- Licenses assets table -->
|
||||
<h6>Software Assigned </h6>
|
||||
<br>
|
||||
<!-- checked out assets table -->
|
||||
@if (count($asset->licenses) > 0)
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th class="col-md-1"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($asset->licenseseats as $seat)
|
||||
<tr>
|
||||
<td><a href="{{ route('licenses.show', $seat->license->id) }}">{{ $seat->license->name }}</a></td>
|
||||
<td>{{ $seat->license->serial }}</td>
|
||||
<td><a href="{{ route('licenses.checkin', $seat->id) }}" class="btn-flat info">{{ trans('general.checkin') }}</a>
|
||||
</td>
|
||||
</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') }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<h6>{{ trans('general.file_uploads') [ <a href="#" data-toggle="modal" data-target="#uploadFileModal">@lang('button.add') }}</a> ]</h6>
|
||||
|
||||
|
||||
<table class="table table-hover">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
|
@ -211,125 +221,110 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
@if (count($asset->uploads) > 0)
|
||||
@foreach ($asset->uploads as $file)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($file->note) {{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->filename }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($file->filename)
|
||||
<a href="{{ route('show/assetfile', [$asset->id, $file->id]) }}" class="btn btn-default">{{ trans('general.download') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn delete-asset btn-danger btn-sm"
|
||||
href="{{ route('delete/assetfile', [$asset->id, $file->id]) }}"
|
||||
data-html="false" data-toggle="modal"
|
||||
data-title="{{ trans('admin/hardware/message.deletefile.confirm') }}"
|
||||
data-content="{{ trans('admin/hardware/message.deletefile.confirm-more',array('filename' => $file->filename)) }} " onClick="return false;">
|
||||
<i class="fa fa-trash icon-white"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{ trans('general.no_results') }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@foreach ($asset->uploads as $file)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($file->note)
|
||||
{{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->filename }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($file->filename)
|
||||
<a href="{{ route('show/assetfile', [$asset->id, $file->id]) }}" class="btn btn-default">{{ trans('general.download') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<a class="btn delete-asset btn-danger btn-sm"
|
||||
href="{{ route('delete/assetfile', [$asset->id, $file->id]) }}"
|
||||
data-html="false" data-toggle="modal"
|
||||
data-title="{{ trans('admin/hardware/message.deletefile.confirm') }}"
|
||||
data-content="{{ trans('admin/hardware/message.deletefile.confirm-more',array('filename' => $file->filename)) }} " onClick="return false;">
|
||||
<i class="fa fa-trash icon-white"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{ trans('general.no_results') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- checked out assets table -->
|
||||
|
||||
<table class="table table-hover table-fixed break-word">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.admin') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.user') }}</th>
|
||||
<th class="col-md-3"><span class="line"></span>{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($asset->assetlog) > 0)
|
||||
@foreach ($asset->assetlog as $log)
|
||||
|
||||
<tr>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
{{ $log->user->present()->fullName() }}
|
||||
<div class="col-md-12">
|
||||
<!-- checked out assets table -->
|
||||
<table class="table table-hover table-fixed break-word">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.admin') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.user') }}</th>
|
||||
<th class="col-md-3"><span class="line"></span>{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($asset->assetlog) > 0)
|
||||
@foreach ($asset->assetlog as $log)
|
||||
<tr>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
{{ $log->user->present()->fullName() }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
@if ((isset($log->target_id)) && ($log->target_id!=0) && ($log->target_id!=''))
|
||||
@if ($log->target->deleted_at=='')
|
||||
<a href="{{ route('users.show', $log->target_id) }}">
|
||||
{{ $log->user->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
<del>{{ $log->user->present()->fullName() }}</del>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note)
|
||||
{{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
@if ((isset($log->target_id)) && ($log->target_id!=0) && ($log->target_id!=''))
|
||||
<tr>
|
||||
<td>{{ $asset->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($asset->adminuser->id)) {{ $asset->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ trans('general.created_asset') }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!--/.col-md-9.bio-->
|
||||
|
||||
@if ($log->target->deleted_at=='')
|
||||
<a href="{{ route('users.show', $log->target_id) }}">
|
||||
{{ $log->user->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
<del>{{ $log->user->present()->fullName() }}</del>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note) {{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $asset->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($asset->adminuser->id)) {{ $asset->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ trans('general.created_asset') }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
<!-- @if ($asset->notes)
|
||||
{{ $asset->notes }}
|
||||
@endif -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
|
||||
<!-- Asset notes -->
|
||||
@if ($asset->notes)
|
||||
|
||||
<h6>{{ trans('admin/hardware/form.notes') }}:</h6>
|
||||
<div class="break-word">{{ nl2br(e($asset->notes)) }}</div>
|
||||
|
||||
@endif
|
||||
<!-- Asset notes -->
|
||||
@if ($asset->notes)
|
||||
<h6>{{ trans('admin/hardware/form.notes') }}:</h6>
|
||||
<div class="break-word">{{ nl2br(e($asset->notes)) }}</div>
|
||||
@endif
|
||||
|
||||
@if ($qr_code->display)
|
||||
<h6>{{ trans('admin/hardware/form.qr') }}</h6>
|
||||
|
@ -340,80 +335,76 @@
|
|||
</ul>
|
||||
@endif
|
||||
|
||||
|
||||
@if (($asset->assigneduser) && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
|
||||
<h6><br>{{ trans('admin/hardware/form.checkedout_to') }}</h6>
|
||||
<ul>
|
||||
|
||||
<li><img src="{{ $asset->assigneduser->present()->gravatar() }}" class="img-circle" style="width: 100px; margin-right: 20px;" /><br /><br /></li>
|
||||
<li><a href="{{ route('users.show', $asset->assigned_to) }}">{{ $asset->assigneduser->present()->fullName() }}</a></li>
|
||||
|
||||
|
||||
@if (isset($asset->assetloc->address))
|
||||
<li>{{ $asset->assetloc->address }}
|
||||
@if (isset($asset->assetloc->address2)) {{ $asset->assetloc->address2 }}
|
||||
@endif
|
||||
</li>
|
||||
@if (isset($asset->assetloc->city))
|
||||
<li>{{ $asset->assetloc->city }}, {{ $asset->assetloc->state }} {{ $asset->assetloc->zip }}</li>
|
||||
@endif
|
||||
<h6><br>{{ trans('admin/hardware/form.checkedout_to') }}</h6>
|
||||
<ul>
|
||||
<li>
|
||||
<img src="{{ $asset->assigneduser->present()->gravatar() }}" class="img-circle" style="width: 100px; margin-right: 20px;" /><br /><br />
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('users.show', $asset->assigned_to) }}">{{ $asset->assigneduser->present()->fullName() }}</a>
|
||||
</li>
|
||||
|
||||
@if (isset($asset->assetloc->address))
|
||||
<li>
|
||||
{{ $asset->assetloc->address }}
|
||||
@if (isset($asset->assetloc->address2))
|
||||
{{ $asset->assetloc->address2 }}
|
||||
@endif
|
||||
|
||||
@if (isset($asset->assigneduser->email))
|
||||
<li><br /><i class="fa fa-envelope-o"></i> <a href="mailto:{{ $asset->assigneduser->email }}">{{ $asset->assigneduser->email }}</a></li>
|
||||
</li>
|
||||
@if (isset($asset->assetloc->city))
|
||||
<li>{{ $asset->assetloc->city }}, {{ $asset->assetloc->state }} {{ $asset->assetloc->zip }}</li>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ((isset($asset->assigneduser->phone)) && ($asset->assigneduser->phone!=''))
|
||||
<li><i class="fa fa-phone"></i> {{ $asset->assigneduser->phone }}</li>
|
||||
@endif
|
||||
@if (isset($asset->assigneduser->email))
|
||||
<li><br /><i class="fa fa-envelope-o"></i> <a href="mailto:{{ $asset->assigneduser->email }}">{{ $asset->assigneduser->email }}</a></li>
|
||||
@endif
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
@endif
|
||||
@if ((isset($asset->assigneduser->phone)) && ($asset->assigneduser->phone!=''))
|
||||
<li><i class="fa fa-phone"></i> {{ $asset->assigneduser->phone }}</li>
|
||||
@endif
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@if (($asset->status_id ) && ($asset->status_id > 0))
|
||||
<!-- Status Info -->
|
||||
|
||||
<!-- Status Info -->
|
||||
@if ($asset->assetstatus)
|
||||
<h6><br>
|
||||
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0))
|
||||
{{ trans('admin/hardware/general.asset') }}
|
||||
{{ trans('general.deployed') }}
|
||||
@else
|
||||
{{ $asset->assetstatus->name }}
|
||||
{{ trans('admin/hardware/general.asset') }}
|
||||
@endif
|
||||
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0))
|
||||
{{ trans('admin/hardware/general.asset') }}
|
||||
{{ trans('general.deployed') }}
|
||||
@else
|
||||
{{ $asset->assetstatus->name }}
|
||||
{{ trans('admin/hardware/general.asset') }}
|
||||
@endif
|
||||
<ul>
|
||||
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
|
||||
<li><br /><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary btn-sm">{{ trans('admin/hardware/general.checkin') }}</a></li>
|
||||
@elseif ((($asset->assetstatus->deployable=='1') && (($asset->assigned_to=='') || ($asset->assigned_to==0))) && ($asset->deleted_at==''))
|
||||
<li><br /><a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info btn-sm">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@elseif (($asset->deleted_at!='') && ($asset->model->deleted_at==''))
|
||||
|
||||
@if (($asset->assetstatus->deployable=='1') && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
|
||||
<li><br /><a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary btn-sm">{{ trans('admin/hardware/general.checkin') }}</a></li>
|
||||
@elseif ((($asset->assetstatus->deployable=='1') && (($asset->assigned_to=='') || ($asset->assigned_to==0))) && ($asset->deleted_at==''))
|
||||
<li><br /><a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info btn-sm">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@elseif (($asset->deleted_at!='') && ($asset->model->deleted_at==''))
|
||||
<li><br /><a href="{{ route('restore/hardware', $asset->id) }}" class="btn-flat large info ">{{ trans('admin/hardware/general.restore') }}</a></li>
|
||||
|
||||
<li><br /><a href="{{ route('restore/hardware', $asset->id) }}" class="btn-flat large info ">{{ trans('admin/hardware/general.restore') }}</a></li>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@if (($asset->assetstatus->notes) && ($asset->assigned_to==''))
|
||||
@if (($asset->assetstatus->notes) && ($asset->assigned_to==''))
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ $asset->assetstatus->notes }}
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
{{ $asset->assetstatus->notes }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.col-md-3-->
|
||||
</div> <!--/.row.profile-->
|
||||
</div> <!--/.user-profile-->
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="uploadFileModal" tabindex="-1" role="dialog" aria-labelledby="uploadFileModalLabel" aria-hidden="true">
|
||||
|
@ -429,18 +420,18 @@
|
|||
'files' => true, 'class' => 'form-horizontal' ]) }}
|
||||
<div class="modal-body">
|
||||
|
||||
<p><p>{{ trans('admin/hardware/general.filetype_info') }}</p>.</p>
|
||||
<p><p>{{ trans('admin/hardware/general.filetype_info') }}</p>.</p>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
<input class="col-md-12 form-control" type="text" name="notes" id="notes" placeholder="Notes">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
{{ Form::file('assetfile[]', ['multiple' => 'multiple']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
<input class="col-md-12 form-control" type="text" name="notes" id="notes" placeholder="Notes">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
{{ Form::file('assetfile[]', ['multiple' => 'multiple']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
|
|
@ -6,40 +6,30 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
|
||||
{{-- Right header --}}
|
||||
@section('header_right')
|
||||
@can('manage', \App\Models\Asset::class)
|
||||
<div class="dropdown pull-right">
|
||||
<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">
|
||||
@if ($asset->assetstatus->deployable=='1')
|
||||
@if ($asset->assigned_to != '')
|
||||
<li role="presentation"><a href="{{ route('checkin/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkin') }}</a></li>
|
||||
@else
|
||||
<li role="presentation"><a href="{{ route('checkout/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@endif
|
||||
@endif
|
||||
<li role="presentation"><a href="{{ route('hardware.edit', $asset->id) }}">{{ trans('admin/hardware/general.edit') }}</a></li>
|
||||
<li role="presentation"><a href="{{ route('clone/hardware', $asset->id) }}">{{ trans('admin/hardware/general.clone') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
@can('manage', \App\Models\Asset::class)
|
||||
<div class="dropdown pull-right">
|
||||
<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">
|
||||
@if ($asset->assetstatus->deployable=='1')
|
||||
@if ($asset->assigned_to != '')
|
||||
<li role="presentation"><a href="{{ route('checkin/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkin') }}</a></li>
|
||||
@else
|
||||
<li role="presentation"><a href="{{ route('checkout/hardware', $asset->id) }}">{{ trans('admin/hardware/general.checkout') }}</a></li>
|
||||
@endif
|
||||
@endif
|
||||
<li role="presentation"><a href="{{ route('hardware.edit', $asset->id) }}">{{ trans('admin/hardware/general.edit') }}</a></li>
|
||||
<li role="presentation"><a href="{{ route('clone/hardware', $asset->id) }}">{{ trans('admin/hardware/general.clone') }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
@ -75,109 +65,106 @@
|
|||
<div class="table-responsive" style="margin-top: 10px;">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
@if ($asset->assetstatus)
|
||||
<tr>
|
||||
<td>{{ trans('general.status') }}</td>
|
||||
<td>
|
||||
@if ($asset->assetstatus->color)
|
||||
<span class="label label-default" style="background-color: {{ e($asset->assetstatus->color) }};">
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
@if ($asset->assetstatus)
|
||||
<tr>
|
||||
<td>{{ trans('general.status') }}</td>
|
||||
<td>
|
||||
@if ($asset->assetstatus->color)
|
||||
<span class="label label-default" style="background-color: {{ e($asset->assetstatus->color) }};">
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
{{ $asset->assetstatus->name }}
|
||||
|
||||
{{ $asset->assetstatus->name }}
|
||||
({{ $asset->assetstatus->getStatuslabelType() }})
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
({{ $asset->assetstatus->getStatuslabelType() }})
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($asset->company)
|
||||
<tr>
|
||||
<td>{{ trans('general.company') }}</td>
|
||||
<td>{{ $asset->company->name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('general.company') }}</td>
|
||||
<td>{{ $asset->company->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->name)
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.name') }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.name') }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->serial)
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.serial') }}</td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.serial') }}</td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->model->manufacturer)
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.manufacturer') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('manufacturers.show', $asset->model->manufacturer->id) }}">
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.model') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">
|
||||
{{ $asset->model->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->model->name }}
|
||||
@endcan
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/models/table.modelnumber') }}</td>
|
||||
<td>
|
||||
{{ $asset->model->model_number }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.manufacturer') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('manufacturers.show', $asset->model->manufacturer->id) }}">
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->model->manufacturer->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.model') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('models.show', $asset->model->id) }}">
|
||||
{{ $asset->model->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->model->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/models/table.modelnumber') }}</td>
|
||||
<td>
|
||||
{{ $asset->model->model_number }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->model->fieldset)
|
||||
@foreach($asset->model->fieldset->fields as $field)
|
||||
<tr>
|
||||
<td>{{ $field->name }}
|
||||
|
||||
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($field->field_encrypted=='1')
|
||||
<i class="fa fa-lock" data-toggle="tooltip" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
|
||||
@endif
|
||||
|
||||
@if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))
|
||||
|
||||
@can('superuser')
|
||||
@if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
|
||||
<a href="{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}" target="_new">{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}</a>
|
||||
@else
|
||||
{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
|
||||
@endif
|
||||
@else
|
||||
{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}
|
||||
@endcan
|
||||
@if ($field->field_encrypted=='1')
|
||||
<i class="fa fa-lock" data-toggle="tooltip" data-placement="top" title="{{ trans('admin/custom_fields/general.value_encrypted') }}"></i>
|
||||
@endif
|
||||
|
||||
@if ($field->isFieldDecryptable($asset->{$field->db_column_name()} ))
|
||||
@can('superuser')
|
||||
@if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
|
||||
<a href="{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}" target="_new">{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}</a>
|
||||
@else
|
||||
{{ \App\Helpers\Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }}
|
||||
@endif
|
||||
@else
|
||||
@if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
|
||||
<a href="{{ $asset->{$field->db_column_name()} }}" target="_new">{{ $asset->{$field->db_column_name()} }}</a>
|
||||
@else
|
||||
{{ $asset->{$field->db_column_name()} }}
|
||||
@endif
|
||||
@endif
|
||||
{{ strtoupper(trans('admin/custom_fields/general.encrypted')) }}
|
||||
@endcan
|
||||
|
||||
@else
|
||||
@if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
|
||||
<a href="{{ $asset->{$field->db_column_name()} }}" target="_new">{{ $asset->{$field->db_column_name()} }}</a>
|
||||
@else
|
||||
{{ $asset->{$field->db_column_name()} }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
@ -188,7 +175,7 @@
|
|||
<td>{{ trans('admin/hardware/form.date') }}</td>
|
||||
<td>
|
||||
{{ date('M d, Y',strtotime($asset->purchase_date)) }}
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
@ -206,7 +193,7 @@
|
|||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost)}}
|
||||
|
||||
@if ($asset->order_number)
|
||||
(Order #{{ $asset->order_number }})
|
||||
(Order #{{ $asset->order_number }})
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -216,13 +203,13 @@
|
|||
<tr>
|
||||
<td>{{ trans('general.supplier') }}</td>
|
||||
<td>
|
||||
@can ('superuser')
|
||||
<a href="{{ route('suppliers.show', $asset->supplier_id) }}">
|
||||
{{ $asset->supplier->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->supplier->name }}
|
||||
@endcan
|
||||
@can ('superuser')
|
||||
<a href="{{ route('suppliers.show', $asset->supplier_id) }}">
|
||||
{{ $asset->supplier->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->supplier->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
@ -244,13 +231,12 @@
|
|||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.depreciation') }}</td>
|
||||
<td>
|
||||
{{ $asset->depreciation->name }}
|
||||
({{ $asset->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
{{ $asset->depreciation->name }}
|
||||
({{ $asset->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.fully_depreciated') }}
|
||||
|
@ -302,6 +288,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.notes') }}</td>
|
||||
<td> {!! nl2br(e($asset->notes)) !!}</td>
|
||||
|
@ -310,57 +297,53 @@
|
|||
<tr>
|
||||
<td>{{ trans('general.created_at') }}</td>
|
||||
<td>
|
||||
{{ $asset->created_at->format('F j, Y h:iA') }}
|
||||
{{ $asset->created_at->format('F j, Y h:iA') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->assetloc)
|
||||
<tr>
|
||||
<td>{{ trans('general.location') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('locations.show', ['location' => $asset->assetloc->id]) }}">
|
||||
{{ $asset->assetloc->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->assetloc->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('general.location') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('locations.show', ['location' => $asset->assetloc->id]) }}">
|
||||
{{ $asset->assetloc->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->assetloc->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($asset->defaultLoc)
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.default_location') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('locations.show', ['location' => $asset->defaultLoc->id]) }}">
|
||||
{{ $asset->defaultLoc->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->defaultLoc->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/hardware/form.default_location') }}</td>
|
||||
<td>
|
||||
@can('superuser')
|
||||
<a href="{{ route('locations.show', ['location' => $asset->defaultLoc->id]) }}">
|
||||
{{ $asset->defaultLoc->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ $asset->defaultLoc->name }}
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /table-responsive -->
|
||||
</div><!-- /col -->
|
||||
</div><!-- /col-md-8 -->
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
@if ($asset->image)
|
||||
<img src="{{ url('/') }}/uploads/assets/{{{ $asset->image }}}" class="assetimg img-responsive">
|
||||
@elseif ($asset->model->image!='')
|
||||
<img src="{{ url('/') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->qr_code=='1')
|
||||
@if ($snipeSettings->qr_code=='1')
|
||||
<img src="{{ url('/') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
|
||||
@endif
|
||||
|
||||
|
@ -372,7 +355,6 @@
|
|||
</p>
|
||||
|
||||
<ul class="list-unstyled">
|
||||
|
||||
@if ((isset($asset->assigneduser->email)) && ($asset->assigneduser->email!=''))
|
||||
<li><i class="fa fa-envelope-o"></i> <a href="mailto:{{ $asset->assigneduser->email }}">{{ $asset->assigneduser->email }}</a></li>
|
||||
@endif
|
||||
|
@ -385,7 +367,7 @@
|
|||
<li>{{ $asset->userloc->name }}</li>
|
||||
<li>{{ $asset->userloc->address }}
|
||||
@if ($asset->userloc->address2!='')
|
||||
{{ $asset->userloc->address2 }}
|
||||
{{ $asset->userloc->address2 }}
|
||||
@endif
|
||||
</li>
|
||||
|
||||
|
@ -420,12 +402,10 @@
|
|||
</div><!-- /row -->
|
||||
</div><!-- /.tab-pane asset details -->
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="software">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Licenses assets table -->
|
||||
|
||||
@if (count($asset->licenses) > 0)
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
@ -459,13 +439,13 @@
|
|||
</div><!-- /col -->
|
||||
</div> <!-- row -->
|
||||
</div> <!-- /.tab-pane software -->
|
||||
|
||||
<div class="tab-pane fade" id="components">
|
||||
<!-- checked out assets table -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@if(count($asset->components) > 0)
|
||||
<table class="table table-striped">
|
||||
|
||||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
@foreach ($asset->components as $component)
|
||||
|
@ -489,10 +469,10 @@
|
|||
{{ trans('general.no_results') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.tab-pane components -->
|
||||
|
||||
<div class="tab-pane fade" id="maintenances">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@ -504,58 +484,59 @@
|
|||
|
||||
<!-- Asset Maintenance table -->
|
||||
@if (count($asset->assetmaintenances) > 0)
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.supplier') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.title') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/table.is_warranty') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th>{{ trans('general.admin') }}</th>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<th>{{ trans('table.actions') }}</th>
|
||||
@endcan
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.supplier') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.title') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/table.is_warranty') }}</th>
|
||||
<th>{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th>{{ trans('general.admin') }}</th>
|
||||
|
||||
@foreach ($asset->assetmaintenances as $assetMaintenance)
|
||||
@if (is_null($assetMaintenance->deleted_at))
|
||||
<tr>
|
||||
<td><a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">{{ $assetMaintenance->supplier->name }}</a></td>
|
||||
<td>{{ $assetMaintenance->title }}</td>
|
||||
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
||||
<td>{{ $assetMaintenance->start_date }}</td>
|
||||
<td>{{ $assetMaintenance->completion_date }}</td>
|
||||
<td>{{ $assetMaintenance->notes }}</td>
|
||||
<td>{{ $assetMaintenance->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}</td>
|
||||
<td class="text-right"><nobr>{{ $use_currency.$assetMaintenance->cost }}</nobr></td>
|
||||
<td>
|
||||
@if ($assetMaintenance->admin)
|
||||
<a href="{{ route('users.show', $assetMaintenance->admin->id) }}">{{ $assetMaintenance->admin->present()->fullName() }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<?php $totalCost += $assetMaintenance->cost; ?>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<td>
|
||||
<a href="{{ route('maintenances.edit', $assetMaintenance->id) }}" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a>
|
||||
</td>
|
||||
@endcan
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8" class="text-right">{{ is_numeric($totalCost) ? $use_currency.number_format($totalCost, 2) : $totalCost }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<th>{{ trans('table.actions') }}</th>
|
||||
@endcan
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
|
||||
@foreach ($asset->assetmaintenances as $assetMaintenance)
|
||||
@if (is_null($assetMaintenance->deleted_at))
|
||||
<tr>
|
||||
<td><a href="{{ route('suppliers.show', $assetMaintenance->supplier_id) }}">{{ $assetMaintenance->supplier->name }}</a></td>
|
||||
<td>{{ $assetMaintenance->title }}</td>
|
||||
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
||||
<td>{{ $assetMaintenance->start_date }}</td>
|
||||
<td>{{ $assetMaintenance->completion_date }}</td>
|
||||
<td>{{ $assetMaintenance->notes }}</td>
|
||||
<td>{{ $assetMaintenance->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}</td>
|
||||
<td class="text-right"><nobr>{{ $use_currency.$assetMaintenance->cost }}</nobr></td>
|
||||
<td>
|
||||
@if ($assetMaintenance->admin)
|
||||
<a href="{{ route('users.show', $assetMaintenance->admin->id) }}">{{ $assetMaintenance->admin->present()->fullName() }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<?php $totalCost += $assetMaintenance->cost; ?>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<td>
|
||||
<a href="{{ route('maintenances.edit', $assetMaintenance->id) }}" class="btn btn-warning btn-sm"><i class="fa fa-pencil icon-white"></i></a>
|
||||
</td>
|
||||
@endcan
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="8" class="text-right">{{ is_numeric($totalCost) ? $use_currency.number_format($totalCost, 2) : $totalCost }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@else
|
||||
<div class="alert alert-info alert-block">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
|
@ -589,22 +570,19 @@
|
|||
<tr>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>
|
||||
@if ($log->action_type != 'requested')
|
||||
@if (isset($log->user))
|
||||
{{ $log->user->present()->fullName() }}
|
||||
@endif
|
||||
@endif
|
||||
@if ($log->action_type != 'requested')
|
||||
@if (isset($log->user))
|
||||
{{ $log->user->present()->fullName() }}
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
@if ($log->action_type=='uploaded')
|
||||
|
||||
{{ $log->filename }}
|
||||
@elseif ((isset($log->target_id)) && ($log->target_id!=0) && ($log->target_id!=''))
|
||||
|
||||
|
||||
@if ($log->target instanceof \App\Models\User)
|
||||
|
||||
@if ($log->target->deleted_at=='')
|
||||
<a href="{{ route('users.show', $log->target_id) }}">
|
||||
{{ $log->target->present()->fullName() }}
|
||||
|
@ -628,35 +606,34 @@
|
|||
Unknown
|
||||
@endif
|
||||
@else
|
||||
|
||||
Deleted User
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note) {{ $log->note }}
|
||||
@if ($log->note)
|
||||
{{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<td>
|
||||
@if (($log->accept_signature!='') && (($log->action_type=='accepted') || ($log->action_type=='declined')))
|
||||
<a href="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" class="img-responsive"></a>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<td>
|
||||
@if (($log->accept_signature!='') && (($log->action_type=='accepted') || ($log->action_type=='declined')))
|
||||
<a href="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" data-toggle="lightbox" data-type="image"><img src="{{ route('log.signature.view', ['filename' => $log->accept_signature ]) }}" class="img-responsive"></a>
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
@endif
|
||||
<!-- Add a "created asset" row to the log list. This isn't an official log entry.-->
|
||||
<tr>
|
||||
<td>{{ $asset->created_at }}</td>
|
||||
<td>
|
||||
@if ($asset->adminuser)
|
||||
{{ $asset->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
@if ($asset->adminuser)
|
||||
{{ $asset->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ trans('general.created_asset') }}</td>
|
||||
<td></td> <!-- User -->
|
||||
|
@ -672,33 +649,32 @@
|
|||
<div class="row">
|
||||
|
||||
@can('update', \App\Models\Asset::class)
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['upload/asset', $asset->id],
|
||||
'files' => true, 'class' => 'form-horizontal' ]) }}
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['upload/asset', $asset->id],
|
||||
'files' => true, 'class' => 'form-horizontal' ]) }}
|
||||
|
||||
<div class="col-md-2">
|
||||
<span class="btn btn-default btn-file">Browse for file...
|
||||
{{ Form::file('assetfile[]', ['multiple' => 'multiple']) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('notes', Input::old('notes', Input::old('notes')), array('class' => 'form-control','placeholder' => 'Notes')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button type="submit" class="btn btn-primary">{{ trans('button.upload') }}</button>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span class="btn btn-default btn-file">Browse for file...
|
||||
{{ Form::file('assetfile[]', ['multiple' => 'multiple']) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
{{ Form::text('notes', Input::old('notes', Input::old('notes')), array('class' => 'form-control','placeholder' => 'Notes')) }}
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button type="submit" class="btn btn-primary">{{ trans('button.upload') }}</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<p>{{ trans('admin/hardware/general.filetype_info') }}</p>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<p>{{ trans('admin/hardware/general.filetype_info') }}</p>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
{{ Form::close() }}
|
||||
@endcan
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -715,12 +691,12 @@
|
|||
<tr>
|
||||
<td>
|
||||
@if ($file->note)
|
||||
{{ $file->note }}
|
||||
{{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ( \App\Helpers\Helper::checkUploadIsImage($file->get_src('assets')))
|
||||
<a href="../{{ $asset->id }}/showfile/{{ $file->id }}" data-toggle="lightbox" data-type="image"><img src="../{{ $asset->id }}/showfile/{{ $file->id }}"" class="img-thumbnail" style="max-width: 50px;"></a>
|
||||
<a href="../{{ $asset->id }}/showfile/{{ $file->id }}" data-toggle="lightbox" data-type="image"><img src="../{{ $asset->id }}/showfile/{{ $file->id }}"" class="img-thumbnail" style="max-width: 50px;"></a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
|
@ -732,21 +708,19 @@
|
|||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<a class="btn delete-asset btn-danger btn-sm" href="{{ route('delete/assetfile', [$asset->id, $file->id]) }}"><i class="fa fa-trash icon-white"></i></a>
|
||||
@endcan
|
||||
@can('update', \App\Models\Asset::class)
|
||||
<a class="btn delete-asset btn-danger btn-sm" href="{{ route('delete/assetfile', [$asset->id, $file->id]) }}"><i class="fa fa-trash icon-white"></i></a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{ trans('general.no_results') }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{ trans('general.no_results') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /.col-md-12 -->
|
||||
|
@ -756,6 +730,7 @@
|
|||
</div> <!-- /.nav-tabs-custom -->
|
||||
</div> <!-- /. col-md-12 -->
|
||||
</div> <!-- /. row -->
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
@ -764,6 +739,5 @@
|
|||
$(this).ekkoLightbox();
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -7,42 +7,35 @@
|
|||
@stop
|
||||
|
||||
@section('header_right')
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">
|
||||
{{ trans('general.back') }}</a>
|
||||
<a href="{{ URL::previous() }}" class="btn btn-primary pull-right">{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row form-wrapper">
|
||||
<!-- left column -->
|
||||
<div class="col-md-10 column">
|
||||
|
||||
@if ($backto=='user')
|
||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', array('licenseeat_id'=> $licenseseat->id, 'backto'=>'user')) }}" autocomplete="off">
|
||||
@else
|
||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', $licenseseat->id) }}" autocomplete="off">
|
||||
@endif
|
||||
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<!-- left column -->
|
||||
<div class="col-md-10 column">
|
||||
|
||||
@if ($backto=='user')
|
||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', array('licenseeat_id'=> $licenseseat->id, 'backto'=>'user')) }}" autocomplete="off">
|
||||
@else
|
||||
<form class="form-horizontal" method="post" action="{{ route('licenses.checkin', $licenseseat->id) }}" autocomplete="off">
|
||||
@endif
|
||||
{{csrf_field()}}
|
||||
|
||||
<!-- Asset name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $licenseseat->license->name }}</p>
|
||||
<p class="form-control-static">{{ $licenseseat->license->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $licenseseat->license->serial }}</p>
|
||||
<p class="form-control-static">{{ $licenseseat->license->serial }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -55,17 +48,15 @@
|
|||
</div>
|
||||
</div>
|
||||
<!-- Form actions -->
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label"></label>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.checkin') }}</button>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div> <!-- .col-md-10-->
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -13,17 +13,11 @@
|
|||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="row">
|
||||
<!-- left column -->
|
||||
<div class="col-md-7">
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="col-md-7">
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
{{csrf_field()}}
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
|
@ -31,68 +25,64 @@
|
|||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
<!-- Asset name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $licenseSeat->license->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
||||
<div class="col-md-10">
|
||||
<p class="form-control-static" style="word-wrap: break-word;">{{ $licenseSeat->license->serial }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset name -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.name') }}</label>
|
||||
<div class="col-md-6">
|
||||
<p class="form-control-static">{{ $licenseSeat->license->name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Asset -->
|
||||
<div class="form-group {{ $errors->has('asset_id') ? ' has-error' : '' }}">
|
||||
<label for="asset_id" class="col-md-2 control-label">{{ trans('admin/licenses/form.asset') }}
|
||||
</label>
|
||||
|
||||
<!-- Serial -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{ trans('admin/hardware/form.serial') }}</label>
|
||||
<div class="col-md-10">
|
||||
<p class="form-control-static" style="word-wrap: break-word;">{{ $licenseSeat->license->serial }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $licenseSeat->asset_id), array('class'=>'select2', 'style'=>'min-width:600px')) }}
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Asset -->
|
||||
<div class="form-group {{ $errors->has('asset_id') ? ' has-error' : '' }}">
|
||||
<label for="asset_id" class="col-md-2 control-label">{{ trans('admin/licenses/form.asset') }}
|
||||
</label>
|
||||
<!-- User -->
|
||||
<div class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="assigned_to" class="col-md-2 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
|
||||
<div class="col-md-10">
|
||||
{{ Form::select('asset_id', $asset_list , Input::old('asset_id', $licenseSeat->asset_id), array('class'=>'select2', 'style'=>'min-width:600px')) }}
|
||||
{!! $errors->first('asset_id', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $licenseSeat->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
<p class="help-block">
|
||||
{{ trans('admin/licenses/form.checkout_help') }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- User -->
|
||||
<div class="form-group {{ $errors->has('assigned_to') ? ' has-error' : '' }}">
|
||||
<label for="assigned_to" class="col-md-2 control-label">{{ trans('admin/hardware/form.checkout_to') }}
|
||||
</label>
|
||||
|
||||
<div class="col-md-9">
|
||||
{{ Form::select('assigned_to', $users_list , Input::old('assigned_to', $licenseSeat->assigned_to), array('class'=>'select2', 'style'=>'min-width:350px')) }}
|
||||
{!! $errors->first('assigned_to', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
|
||||
<p class="help-block">
|
||||
{{ trans('admin/licenses/form.checkout_help') }}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $licenseSeat->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Note -->
|
||||
<div class="form-group {{ $errors->has('note') ? 'error' : '' }}">
|
||||
<label for="note" class="col-md-2 control-label">{{ trans('admin/hardware/form.notes') }}</label>
|
||||
<div class="col-md-7">
|
||||
<textarea class="col-md-6 form-control" id="note" name="note">{{ Input::old('note', $licenseSeat->note) }}</textarea>
|
||||
{!! $errors->first('note', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a class="btn btn-link" href="{{ route('licenses.index') }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success pull-right"><i class="fa fa-check icon-white"></i> {{ trans('general.checkout') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!-- /.box-->
|
||||
</form>
|
||||
</div> <!-- /.col-md-7-->
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -89,7 +89,6 @@
|
|||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div><!-- /.input group -->
|
||||
|
||||
|
||||
{!! $errors->first('termination_date', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,45 +22,40 @@
|
|||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box">
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="licenses"
|
||||
id="table"
|
||||
data-url="{{ route('api.licenses.list') }}"
|
||||
class="table table-striped snipe-table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="licenseTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="company" data-sortable="true" data-switchable="true">{{ trans('general.company') }}</th>
|
||||
<th data-field="name" data-sortable="true">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th data-field="manufacturer" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-field="serial" data-sortable="true" >{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th data-field="license_name" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_name') }}</th>
|
||||
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
|
||||
<th data-field="totalSeats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th data-field="remaining" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th data-field="purchase_date" data-sortable="true">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
|
||||
<th data-field="expiration_date" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('admin/hardware/form.notes') }}</th>
|
||||
<th data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="licenses"
|
||||
id="table"
|
||||
data-url="{{ route('api.licenses.list') }}"
|
||||
class="table table-striped snipe-table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="licenseTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="company" data-sortable="true" data-switchable="true">{{ trans('general.company') }}</th>
|
||||
<th data-field="name" data-sortable="true">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th data-field="manufacturer" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-field="serial" data-sortable="true" >{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th data-field="license_name" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_name') }}</th>
|
||||
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
|
||||
<th data-field="totalSeats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th data-field="remaining" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th data-field="purchase_date" data-sortable="true">{{ trans('general.purchase_date') }}</th>
|
||||
<th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
|
||||
<th data-field="expiration_date" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('admin/hardware/form.notes') }}</th>
|
||||
<th data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
<div class="box-footer clearfix">
|
||||
|
||||
</div>
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box-footer clearfix">
|
||||
</div>
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -10,24 +10,21 @@
|
|||
{{-- Right header --}}
|
||||
@section('header_right')
|
||||
<div class="btn-group pull-right">
|
||||
@can('update', $license)
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('licenses.edit', ['license' => $license->id]) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
|
||||
</ul>
|
||||
@endcan
|
||||
</div>
|
||||
@can('update', $license)
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('licenses.edit', ['license' => $license->id]) }}">{{ trans('admin/licenses/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/license', $license->id) }}">{{ trans('admin/licenses/general.clone') }}</a></li>
|
||||
</ul>
|
||||
@endcan
|
||||
</div>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
|
@ -35,97 +32,87 @@
|
|||
<li class="active"><a href="#tab_1" data-toggle="tab">Details</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">{{ trans('general.file_uploads') }}</a></li>
|
||||
<li><a href="#tab_3" data-toggle="tab">{{ trans('admin/licenses/general.checkout_history') }}</a></li>
|
||||
|
||||
<li class="pull-right"><a href="#" data-toggle="modal" data-target="#uploadFileModal"><i class="fa fa-paperclip"></i> {{ trans('button.upload') }}</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">{{ trans('admin/licenses/general.seat') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/licenses/general.user') }}</th>
|
||||
<th class="col-md-4">{{ trans('admin/licenses/form.asset') }}</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-md-2">{{ trans('admin/licenses/general.seat') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/licenses/general.user') }}</th>
|
||||
<th class="col-md-4">{{ trans('admin/licenses/form.asset') }}</th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $count=1; ?>
|
||||
@if ($license->licenseseats)
|
||||
@foreach ($license->licenseseats as $licensedto)
|
||||
|
||||
<tr>
|
||||
<td>Seat {{ $count }} </td>
|
||||
<td>
|
||||
|
||||
@if (($licensedto->user) && ($licensedto->deleted_at == NULL))
|
||||
@can('users.view')
|
||||
<a href="{{ route('users.show', $licensedto->assigned_to) }}">
|
||||
{{ $licensedto->user->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->user->present()->fullName() }}
|
||||
@endcan
|
||||
|
||||
@elseif (($licensedto->user) && ($licensedto->deleted_at != NULL))
|
||||
<del>{{ $licensedto->user->present()->fullName() }}</del>
|
||||
@elseif ($licensedto->asset)
|
||||
@if ($licensedto->asset->assigned_to != 0)
|
||||
@can('users.view')
|
||||
<a href="{{ route('users.show', $licensedto->asset->assigned_to) }}">
|
||||
{{ $licensedto->asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->asset->assigneduser->present()->fullName() }}
|
||||
@endcan
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($licensedto->asset_id)
|
||||
@can('view', $licensedto->asset)
|
||||
<a href="{{ route('hardware.show', $licensedto->asset_id) }}">
|
||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||
@endcan
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('checkout', $licensedto)
|
||||
@if (($licensedto->assigned_to) || ($licensedto->asset_id))
|
||||
|
||||
@if ($license->reassignable)
|
||||
<a href="{{ route('licenses.checkin', $licensedto->id) }}" class="btn btn-primary btn-sm">
|
||||
{{ trans('general.checkin') }}
|
||||
</a>
|
||||
@else
|
||||
<span>Assigned</span>
|
||||
@endif
|
||||
@else
|
||||
<a href="{{ route('licenses.checkout', $licensedto->id) }}" class="btn btn-info btn-sm">
|
||||
{{ trans('general.checkout') }}</a>
|
||||
@endif
|
||||
@endcan
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
<?php $count=1; ?>
|
||||
@if ($license->licenseseats)
|
||||
@foreach ($license->licenseseats as $licensedto)
|
||||
<tr>
|
||||
<td>Seat {{ $count }} </td>
|
||||
<td>
|
||||
@if (($licensedto->user) && ($licensedto->deleted_at == NULL))
|
||||
@can('users.view')
|
||||
<a href="{{ route('users.show', $licensedto->assigned_to) }}">
|
||||
{{ $licensedto->user->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->user->present()->fullName() }}
|
||||
@endcan
|
||||
@elseif (($licensedto->user) && ($licensedto->deleted_at != NULL))
|
||||
<del>{{ $licensedto->user->present()->fullName() }}</del>
|
||||
@elseif ($licensedto->asset)
|
||||
@if ($licensedto->asset->assigned_to != 0)
|
||||
@can('users.view')
|
||||
<a href="{{ route('users.show', $licensedto->asset->assigned_to) }}">
|
||||
{{ $licensedto->asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->asset->assigneduser->present()->fullName() }}
|
||||
@endcan
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($licensedto->asset_id)
|
||||
@can('view', $licensedto->asset)
|
||||
<a href="{{ route('hardware.show', $licensedto->asset_id) }}">
|
||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||
</a>
|
||||
@else
|
||||
{{ $licensedto->asset->name }} {{ $licensedto->asset->asset_tag }}
|
||||
@endcan
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('checkout', $licensedto)
|
||||
@if (($licensedto->assigned_to) || ($licensedto->asset_id))
|
||||
@if ($license->reassignable)
|
||||
<a href="{{ route('licenses.checkin', $licensedto->id) }}" class="btn btn-primary btn-sm">
|
||||
{{ trans('general.checkin') }}
|
||||
</a>
|
||||
@else
|
||||
<span>Assigned</span>
|
||||
@endif
|
||||
@else
|
||||
<a href="{{ route('licenses.checkout', $licensedto->id) }}" class="btn btn-info btn-sm">
|
||||
{{ trans('general.checkout') }}
|
||||
</a>
|
||||
@endif
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
<?php $count++; ?>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5">
|
||||
<div class="table">
|
||||
<table class="table">
|
||||
|
@ -145,12 +132,14 @@
|
|||
@endif
|
||||
|
||||
@can('viewKeys', $license)
|
||||
@if (!is_null($license->serial))
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.license_key') }}</td>
|
||||
<td style="word-wrap: break-word;overflow-wrap: break-word;word-break: break-word;">{!! nl2br(e($license->serial)) !!}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if (!is_null($license->serial))
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.license_key') }}</td>
|
||||
<td style="word-wrap: break-word;overflow-wrap: break-word;word-break: break-word;">
|
||||
{!! nl2br(e($license->serial)) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endcan
|
||||
|
||||
@if (!is_null($license->license_name))
|
||||
|
@ -167,63 +156,59 @@
|
|||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($license->supplier_id)
|
||||
<tr>
|
||||
<td>{{ trans('general.supplier') }}:
|
||||
</td>
|
||||
<td>
|
||||
<tr>
|
||||
<td>{{ trans('general.supplier') }}:
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('suppliers.show', $license->supplier_id) }}">
|
||||
{{ $license->supplier->name }}
|
||||
{{ $license->supplier->name }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($license->expiration_date > 0)
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.expiration') }}:
|
||||
</td>
|
||||
<td> {{ $license->expiration_date }}
|
||||
</td>
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.expiration') }}:</td>
|
||||
<td>{{ $license->expiration_date }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($license->depreciation)
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.depreciation') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->depreciation->name }}
|
||||
({{ $license->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
@if ($license->depreciation)
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.depreciates_on') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->depreciated_date()->format("Y-m-d") }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
{{ trans('admin/hardware/form.depreciation') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->depreciation->name }}
|
||||
({{ $license->depreciation->months }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.depreciates_on') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->depreciated_date()->format("Y-m-d") }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.fully_depreciated') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ trans('admin/hardware/form.fully_depreciated') }}:
|
||||
</td>
|
||||
<td>
|
||||
@if ($license->time_until_depreciated()->y > 0)
|
||||
{{ $license->time_until_depreciated()->y }}
|
||||
{{ trans('admin/hardware/form.years') }},
|
||||
@endif
|
||||
{{ $license->time_until_depreciated()->m }}
|
||||
{{ trans('admin/hardware/form.months') }}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($license->purchase_order)
|
||||
|
@ -239,19 +224,14 @@
|
|||
|
||||
@if ($license->purchase_date > 0)
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('general.purchase_date') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->purchase_date }}
|
||||
</td>
|
||||
<td>{{ trans('general.purchase_date') }}:</td>
|
||||
<td>{{ $license->purchase_date }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($license->purchase_cost > 0)
|
||||
<tr>
|
||||
<td>{{ trans('general.purchase_cost') }}:
|
||||
</td>
|
||||
<td>{{ trans('general.purchase_cost') }}:</td>
|
||||
<td>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}
|
||||
|
@ -261,61 +241,49 @@
|
|||
|
||||
@if ($license->order_number)
|
||||
<tr>
|
||||
<td>{{ trans('general.order_number') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->order_number }}
|
||||
</td>
|
||||
<td>{{ trans('general.order_number') }}:</td>
|
||||
<td>{{ $license->order_number }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if (($license->seats) && ($license->seats) > 0)
|
||||
<tr>
|
||||
<td>{{ trans('admin/licenses/form.seats') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->seats }}</td>
|
||||
<td>{{ trans('admin/licenses/form.seats') }}:</td>
|
||||
<td>{{ $license->seats }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/licenses/form.reassignable') }}:
|
||||
</td>
|
||||
<td>
|
||||
{{ $license->reassignable ? 'Yes' : 'No' }}
|
||||
</td>
|
||||
<td>{{ trans('admin/licenses/form.reassignable') }}:</td>
|
||||
<td>{{ $license->reassignable ? 'Yes' : 'No' }}</td>
|
||||
</tr>
|
||||
|
||||
@if ($license->notes)
|
||||
<tr><td>
|
||||
{{ trans('general.notes') }}:
|
||||
</td><td>
|
||||
{!! nl2br(e($license->notes)) !!}</td></tr>
|
||||
<tr>
|
||||
<td>{{ trans('general.notes') }}:</td>
|
||||
<td>
|
||||
{!! nl2br(e($license->notes)) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- .table-->
|
||||
</div> <!--/.col-md-5-->
|
||||
</div> <!--/.row-->
|
||||
</div> <!-- /.tab-pane -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
<th class="col-md-5"><span class="line"></span>{{ trans('general.file_name') }}</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($license->uploads) > 0)
|
||||
@foreach ($license->uploads as $file)
|
||||
<tr>
|
||||
|
@ -324,12 +292,12 @@
|
|||
{{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->filename }}
|
||||
</td>
|
||||
<td>{{ $file->filename }}</td>
|
||||
<td>
|
||||
@if ($file->filename)
|
||||
<a href="{{ route('show/licensefile', [$license->id, $file->id]) }}" class="btn btn-default">Download</a>
|
||||
<a href="{{ route('show/licensefile', [$license->id, $file->id]) }}" class="btn btn-default">
|
||||
Download
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
|
@ -338,105 +306,89 @@
|
|||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
{{ trans('general.no_results') }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="4">{{ trans('general.no_results') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /.tab-pane -->
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_3">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table class="table table-hover table-fixed break-word">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.admin') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('button.actions') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/licenses/general.user') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($license->assetlog) > 0)
|
||||
@foreach ($license->assetlog as $log)
|
||||
<tr>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
<a href="{{ route('users.show', $log->user_id)}}">{{ $log->user->present()->fullName() }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
|
||||
<td>
|
||||
@if (($log->target) && ($log->target->id!='0'))
|
||||
|
||||
@if ($log->target_type == 'App\Models\User')
|
||||
<a href="{{ route('users.show', $log->target_id) }}">
|
||||
{{ $log->userlog->present()->fullName() }}
|
||||
</a>
|
||||
@elseif ($log->target_type == 'App\Models\Asset')
|
||||
<a href="{{ route('hardware.show', $log->target_id) }}">
|
||||
{{ $log->userlog->present()->name() }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
|
||||
@elseif ($log->action_type=='uploaded')
|
||||
|
||||
{{ $log->filename }}
|
||||
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->note) {{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('general.admin') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('button.actions') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/licenses/general.user') }}</th>
|
||||
<th class="col-md-4"><span class="line"></span>{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (count($license->assetlog) > 0)
|
||||
@foreach ($license->assetlog as $log)
|
||||
<tr>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>
|
||||
@if (isset($log->user_id))
|
||||
<a href="{{ route('users.show', $log->user_id)}}">{{ $log->user->present()->fullName() }}</a>
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $license->created_at }}</td>
|
||||
<td>
|
||||
@if ($license->adminuser) {{ $license->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ trans('general.created_asset') }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
@if ($license->notes)
|
||||
{{ $license->notes }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
|
||||
<td>
|
||||
@if (($log->target) && ($log->target->id!='0'))
|
||||
@if ($log->target_type == 'App\Models\User')
|
||||
<a href="{{ route('users.show', $log->target_id) }}">
|
||||
{{ $log->userlog->present()->fullName() }}
|
||||
</a>
|
||||
@elseif ($log->target_type == 'App\Models\Asset')
|
||||
<a href="{{ route('hardware.show', $log->target_id) }}">
|
||||
{{ $log->userlog->present()->name() }}
|
||||
</a>
|
||||
@endif
|
||||
@elseif ($log->action_type=='uploaded')
|
||||
{{ $log->filename }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if ($log->note)
|
||||
{{ $log->note }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $license->created_at }}</td>
|
||||
<td>
|
||||
@if ($license->adminuser)
|
||||
{{ $license->adminuser->present()->fullName() }}
|
||||
@else
|
||||
{{ trans('general.unknown_admin') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ trans('general.created_asset') }}</td>
|
||||
<td></td>
|
||||
<td>
|
||||
@if ($license->notes)
|
||||
{{ $license->notes }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
</div>
|
||||
<!-- nav-tabs-custom -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div> <!-- /.col-md-12-->
|
||||
</div> <!-- /.row-->
|
||||
</div> <!-- /.tab-pane -->
|
||||
</div> <!-- /.tab-content -->
|
||||
</div> <!-- nav-tabs-custom -->
|
||||
</div> <!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
|
||||
|
||||
<!-- Modal -->
|
||||
|
@ -451,27 +403,23 @@
|
|||
'method' => 'POST',
|
||||
'route' => ['upload/license', $license->id],
|
||||
'files' => true, 'class' => 'form-horizontal' ]) }}
|
||||
<div class="modal-body">
|
||||
|
||||
<p>{{ trans('admin/licenses/general.filetype_info') }}</p>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
<input class="col-md-12 form-control" type="text" name="notes" id="notes" placeholder="Notes">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
{{ Form::file('licensefile[]', ['multiple' => 'multiple']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">{{ trans('button.upload') }}</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ trans('admin/licenses/general.filetype_info') }}</p>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
<input class="col-md-12 form-control" type="text" name="notes" id="notes" placeholder="Notes">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="input-group col-md-12">
|
||||
{{ Form::file('licensefile[]', ['multiple' => 'multiple']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.modal-body-->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('button.cancel') }}</button>
|
||||
<button type="submit" class="btn btn-primary btn-sm">{{ trans('button.upload') }}</button>
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -12,13 +12,11 @@
|
|||
@stop
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
name="locations"
|
||||
class="table table-striped snipe-table"
|
||||
|
@ -52,12 +50,12 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
|
||||
|
||||
|
||||
@stop
|
||||
|
|
|
@ -15,74 +15,69 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="location_users"
|
||||
id="table-users"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.locations.viewusers', $location->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="location_usersDetailTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="location_users"
|
||||
id="table-users"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{route('api.locations.viewusers', $location->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="location_usersDetailTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.user') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="location_assets"
|
||||
id="table-assets"
|
||||
data-url="{{route('api.locations.viewassets', $location->id)}}"
|
||||
class="table table-striped snipe-table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="location_assetsDetailTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('admin/hardware/form.tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table table-responsive">
|
||||
<table
|
||||
name="location_assets"
|
||||
id="table-assets"
|
||||
data-url="{{route('api.locations.viewassets', $location->id)}}"
|
||||
class="table table-striped snipe-table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="location_assetsDetailTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('admin/hardware/form.tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'locations-export', 'search' => true])
|
||||
|
||||
|
|
|
@ -20,33 +20,29 @@
|
|||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
name="manufacturers"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.manufacturers.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="manufacturersTable-{{ config('version.hash_version') }}">
|
||||
<table
|
||||
name="manufacturers"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-url="{{route('api.manufacturers.list') }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="manufacturersTable-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-field="name">{{ trans('admin/manufacturers/table.name') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="assets">{{ trans('general.assets') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="licenses">{{ trans('general.licenses') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="accessories">{{ trans('general.accessories') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="consumables">{{ trans('general.consumables') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-field="name">{{ trans('admin/manufacturers/table.name') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="assets">{{ trans('general.assets') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="licenses">{{ trans('general.licenses') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="accessories">{{ trans('general.accessories') }}</th>
|
||||
<th data-switchable="true" data-searchable="false" data-sortable="false" data-field="consumables">{{ trans('general.consumables') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -23,148 +23,151 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#assets" data-toggle="tab">Assets</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#licenses" data-toggle="tab">Licenses</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#accessories" data-toggle="tab">Accessories</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#consumables" data-toggle="tab">Consumables</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="assets">
|
||||
<table
|
||||
name="manufacturer_assets"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="assets-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'assets']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerAssetsTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="companyName" data-visible="false">
|
||||
{{ trans('admin/companies/table.title') }}
|
||||
</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="change" data-switchable="false">{{ trans('admin/hardware/table.change') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-switchable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.tab-pane assets -->
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#assets" data-toggle="tab">Assets</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#licenses" data-toggle="tab">Licenses</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#accessories" data-toggle="tab">Accessories</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#consumables" data-toggle="tab">Consumables</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-pane fade" id="licenses">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'licenses']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="companyName" data-sortable="false" data-switchable="true">{{ trans('general.company') }}</th>
|
||||
<th data-field="name" data-sortable="true">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th data-field="manufacturer" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-field="serial" data-sortable="true" >{{ trans('admin/licenses/table.serial') }}</th>
|
||||
<th data-field="license_name" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_name') }}</th>
|
||||
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
|
||||
<th data-field="totalSeats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th data-field="remaining" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th data-field="purchase_date" data-sortable="true">{{ trans('admin/licenses/table.purchase_date') }}</th>
|
||||
<th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
|
||||
<th data-field="expiration_date" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.notes') }}</th>
|
||||
<th data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="assets">
|
||||
<table
|
||||
name="manufacturer_assets"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="assets-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'assets']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerAssetsTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-searchable="false" data-sortable="false" data-field="companyName" data-visible="false">
|
||||
{{ trans('admin/companies/table.title') }}
|
||||
</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="name">{{ trans('general.name') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="model">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="serial">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="change" data-switchable="false">{{ trans('admin/hardware/table.change') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="actions" data-switchable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.tab-pane assets -->
|
||||
|
||||
<div class="tab-pane fade" id="accessories">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'accessories']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="manufacturerAccessoriesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/accessories/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('admin/accessories/general.accessory_category') }}</th>
|
||||
<th data-field="manufacturer" data-searchable="true" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/accessories/general.date') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('admin/accessories/general.order') }}</th>
|
||||
<th data-searchable="false" data-sortable="true" data-field="min_amt">{{ trans('general.min_amt') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="numRemaining">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="consumables">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'consumables']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/consumables/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty"> {{ trans('admin/consumables/general.total') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/consumables/general.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/consumables/general.date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- /.tab-content -->
|
||||
</div> <!-- /.nav-tabs-custom -->
|
||||
</div><!-- /. col-md-12 -->
|
||||
</div> <!-- /.row -->
|
||||
<div class="tab-pane fade" id="licenses">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'licenses']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-field="companyName" data-sortable="false" data-switchable="true">{{ trans('general.company') }}</th>
|
||||
<th data-field="name" data-sortable="true">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th data-field="manufacturer" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-field="serial" data-sortable="true" >{{ trans('admin/licenses/table.serial') }}</th>
|
||||
<th data-field="license_name" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_name') }}</th>
|
||||
<th data-field="license_email" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.to_email') }}</th>
|
||||
<th data-field="totalSeats" data-sortable="false">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th data-field="remaining" data-sortable="false">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th data-field="purchase_date" data-sortable="true">{{ trans('admin/licenses/table.purchase_date') }}</th>
|
||||
<th data-field="purchase_cost" data-sortable="true">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-field="purchase_order" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.purchase_order') }}</th>
|
||||
<th data-field="expiration_date" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th data-field="notes" data-sortable="true" data-visible="false">{{ trans('admin/licenses/form.notes') }}</th>
|
||||
<th data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div><!-- /.tab-pan licenses-->
|
||||
|
||||
<div class="tab-pane fade" id="accessories">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'accessories']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="manufacturerAccessoriesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/accessories/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('admin/accessories/general.accessory_category') }}</th>
|
||||
<th data-field="manufacturer" data-searchable="true" data-sortable="true">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="qty">{{ trans('admin/accessories/general.total') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/accessories/general.date') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="order_number" data-visible="false">{{ trans('admin/accessories/general.order') }}</th>
|
||||
<th data-searchable="false" data-sortable="true" data-field="min_amt">{{ trans('general.min_amt') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="numRemaining">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.tab-pan accessories-->
|
||||
|
||||
<div class="tab-pane fade" id="consumables">
|
||||
<table
|
||||
name="manufacturer_licenses"
|
||||
class="table table-striped bootstrap-table snipe-table"
|
||||
id="licenses-table"
|
||||
data-url="{{ route('api.manufacturers.view', ['manufacturerId' => $manufacturer->id, 'itemtype' => 'consumables']) }}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maufacturerLicensesTable-{{config('version.hash_version') }}"
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-searchable="true" data-sortable="true" data-field="companyName">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="name">{{ trans('admin/consumables/table.title') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="location">{{ trans('general.location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="category">{{ trans('general.category') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="qty"> {{ trans('admin/consumables/general.total') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="numRemaining"> {{ trans('admin/consumables/general.remaining') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="true" data-field="min_amt"> {{ trans('general.min_amt') }}</th>
|
||||
<th data-sortable="true" data-field="manufacturer" data-visible="false">{{ trans('general.manufacturer') }}</th>
|
||||
<th data-sortable="true" data-field="model_number" data-visible="false">{{ trans('general.model_no') }}</th>
|
||||
<th data-sortable="true" data-field="item_no" data-visible="false">{{ trans('admin/consumables/general.item_no') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="order_number" data-visible="false">{{ trans('admin/consumables/general.order') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_date" data-visible="false">{{ trans('admin/consumables/general.date') }}</th>
|
||||
<th data-sortable="true" data-searchable="true" data-field="purchase_cost" data-visible="false">{{ trans('general.purchase_cost') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions"> {{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.tab-pan consumables-->
|
||||
|
||||
</div> <!-- /.tab-content -->
|
||||
</div> <!-- /.nav-tabs-custom -->
|
||||
</div><!-- /. col-md-12 -->
|
||||
</div> <!-- /.row -->
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
|
|
@ -53,12 +53,11 @@
|
|||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'models-export', 'search' => true])
|
||||
|
||||
|
|
|
@ -8,99 +8,98 @@
|
|||
@stop
|
||||
|
||||
@section('header_right')
|
||||
@can('superuser')
|
||||
@can('superuser')
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">{{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@if ($model->deleted_at=='')
|
||||
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/model', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
|
||||
<li><a href="{{ route('models.edit', $model->id) }}">{{ trans('admin/models/table.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/model', $model->id) }}">{{ trans('admin/models/table.clone') }}</a></li>
|
||||
<li><a href="{{ route('hardware.create', ['model_id' => $model->id]) }}">{{ trans('admin/hardware/form.create') }}</a></li>
|
||||
@else
|
||||
<li><a href="{{ route('restore/model', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
<li><a href="{{ route('restore/model', $model->id) }}">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
@endcan
|
||||
@endcan
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
@if ($model->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ $model->name }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="modelassets"
|
||||
id="table"
|
||||
class="snipe-table"
|
||||
data-url="{{route('api.models.view', $model->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="modeldetailsViewTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@if ($model->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ $model->name }}</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<table
|
||||
name="modelassets"
|
||||
id="table"
|
||||
class="snipe-table"
|
||||
data-url="{{route('api.models.view', $model->id)}}"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="modeldetailsViewTable">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th data-sortable="false" data-field="companyName" data-searchable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="id" data-searchable="false" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-field="name" data-searchable="true">{{ trans('general.name') }}</th>
|
||||
<th data-sortable="true" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th data-sortable="false" data-field="companyName" data-searchable="false" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="id" data-searchable="false" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-field="name" data-searchable="true">{{ trans('general.name') }}</th>
|
||||
<th data-sortable="true" data-field="asset_tag">{{ trans('general.asset_tag') }}</th>
|
||||
<th data-sortable="true" data-field="serial">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th data-sortable="false" data-field="assigned_to">{{ trans('general.user') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div> <!-- /.box-body-->
|
||||
</div> <!-- /.box-default-->
|
||||
</div> <!-- /.col-md-9-->
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>More Info:</h4>
|
||||
<h4>More Info:</h4>
|
||||
<ul class="list-unstyled">
|
||||
|
||||
@if ($model->manufacturer)
|
||||
<li>{{ trans('general.manufacturer') }}:
|
||||
{{ $model->manufacturer->name }}</li>
|
||||
<li>
|
||||
{{ trans('general.manufacturer') }}:
|
||||
{{ $model->manufacturer->name }}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($model->model_number)
|
||||
<li>{{ trans('general.model_no') }}:
|
||||
{{ $model->model_number }}</li>
|
||||
<li>
|
||||
{{ trans('general.model_no') }}:
|
||||
{{ $model->model_number }}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($model->depreciation)
|
||||
<li>{{ trans('general.depreciation') }}:
|
||||
{{ $model->depreciation->name }} ({{ $model->depreciation->months }}
|
||||
{{ trans('general.months') }}
|
||||
)</li>
|
||||
<li>
|
||||
{{ trans('general.depreciation') }}:
|
||||
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($model->eol)
|
||||
<li>{{ trans('general.eol') }}:
|
||||
{{ $model->eol }}
|
||||
{{ trans('general.months') }}</li>
|
||||
{{ $model->eol .' '. trans('general.months') }} {{ trans('general.months') }}
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($model->fieldset)
|
||||
<li>{{ trans('admin/models/general.fieldset') }}:
|
||||
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
|
||||
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
|
||||
</li>
|
||||
|
||||
@endif
|
||||
|
||||
@if ($model->image)
|
||||
|
@ -108,18 +107,16 @@
|
|||
@endif
|
||||
|
||||
@if ($model->deleted_at!='')
|
||||
<li><br /><a href="{{ route('restore/model', $model->id) }}" class="btn-flat large info ">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
|
||||
@endif
|
||||
|
||||
<li><br /><a href="{{ route('restore/model', $model->id) }}" class="btn-flat large info ">{{ trans('admin/models/general.restore') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@if ($model->note)
|
||||
Notes:
|
||||
<p>{!! $model->present()->note() !!}
|
||||
<p>
|
||||
{!! $model->present()->note() !!}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -9,46 +9,41 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="accessoriesReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="accessoriesReportTable">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
name="accessoriesReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="accessoriesReportTable">
|
||||
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/general.total') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($accessories as $accessory)
|
||||
<tr>
|
||||
<td>{{ is_null($accessory->company) ? '' : $accessory->company->name }}</td>
|
||||
<td>{{ $accessory->name }}</td>
|
||||
<td>{{ $accessory->qty }}</td>
|
||||
<td>{{ $accessory->numRemaining() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/general.total') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($accessories as $accessory)
|
||||
<tr>
|
||||
<td>{{ is_null($accessory->company) ? '' : $accessory->company->name }}</td>
|
||||
<td>{{ $accessory->name }}</td>
|
||||
<td>{{ $accessory->qty }}</td>
|
||||
<td>{{ $accessory->numRemaining() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -9,15 +9,12 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
<table
|
||||
name="activityReport"
|
||||
data-toolbar="#toolbar"
|
||||
class="table table-striped snipe-table"
|
||||
|
@ -25,24 +22,22 @@
|
|||
data-url="{{ route('api.activity.list') }}"
|
||||
data-cookie="true"
|
||||
data-cookie-id-table="activityReportTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-1" data-field="admin">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-1" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-1" data-field="item_type">{{ trans('general.type') }}</th>
|
||||
<th class="col-sm-1" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-1" data-field="target">To</th>
|
||||
<th class="col-sm-1" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-1" data-field="note">{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-1" data-field="admin">{{ trans('general.admin') }}</th>
|
||||
<th class="col-sm-1" data-field="action_type">{{ trans('general.action') }}</th>
|
||||
<th class="col-sm-1" data-field="item_type">{{ trans('general.type') }}</th>
|
||||
<th class="col-sm-1" data-field="item">{{ trans('general.item') }}</th>
|
||||
<th class="col-sm-1" data-field="target">To</th>
|
||||
<th class="col-sm-1" data-field="created_at">{{ trans('general.date') }}</th>
|
||||
<th class="col-sm-1" data-field="note">{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
|
||||
|
|
|
@ -16,10 +16,8 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
|
|
|
@ -10,85 +10,84 @@
|
|||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="maintenancesReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maintenancesReportTable">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="maintenancesReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="maintenancesReportTable">
|
||||
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.supplier') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.supplier') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.asset_maintenance_time') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$totalDays = 0;
|
||||
$totalCost = 0;
|
||||
?>
|
||||
@foreach ($assetMaintenances as $assetMaintenance)
|
||||
<tr>
|
||||
<td>{{ is_null($assetMaintenance->asset->company) ? '' : $assetMaintenance->asset->company->name }}</td>
|
||||
<td>{{ $assetMaintenance->asset->asset_tag }}</td>
|
||||
<td>{{ $assetMaintenance->asset->name }}</td>
|
||||
<td>{{ $assetMaintenance->supplier->name }}</td>
|
||||
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
||||
<td>{{ $assetMaintenance->title }}</td>
|
||||
<td>{{ $assetMaintenance->start_date }}</td>
|
||||
<td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td>
|
||||
@if (is_null($assetMaintenance->asset_maintenance_time))
|
||||
<?php
|
||||
$totalDays = 0;
|
||||
$totalCost = 0;
|
||||
$assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
||||
?>
|
||||
@foreach ($assetMaintenances as $assetMaintenance)
|
||||
<tr>
|
||||
<td>{{ is_null($assetMaintenance->asset->company) ? '' : $assetMaintenance->asset->company->name }}</td>
|
||||
<td>{{ $assetMaintenance->asset->asset_tag }}</td>
|
||||
<td>{{ $assetMaintenance->asset->name }}</td>
|
||||
<td>{{ $assetMaintenance->supplier->name }}</td>
|
||||
<td>{{ $assetMaintenance->asset_maintenance_type }}</td>
|
||||
<td>{{ $assetMaintenance->title }}</td>
|
||||
<td>{{ $assetMaintenance->start_date }}</td>
|
||||
<td>{{ is_null($assetMaintenance->completion_date) ? trans('admin/asset_maintenances/message.asset_maintenance_incomplete') : $assetMaintenance->completion_date }}</td>
|
||||
@if (is_null($assetMaintenance->asset_maintenance_time))
|
||||
<?php
|
||||
$assetMaintenanceTime = intval(Carbon::now()->diffInDays(Carbon::parse($assetMaintenance->start_date)));
|
||||
?>
|
||||
@else
|
||||
<?php
|
||||
$assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time);
|
||||
?>
|
||||
@endif
|
||||
<td>{{ $assetMaintenanceTime }}</td>
|
||||
<td>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($assetMaintenance->cost,2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$totalDays += $assetMaintenanceTime;
|
||||
$totalCost += floatval($assetMaintenance->cost);
|
||||
?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" align="right"><strong>Totals:</strong></td>
|
||||
<td>{{number_format($totalDays)}}</td>
|
||||
<td>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($totalCost,2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@else
|
||||
<?php
|
||||
$assetMaintenanceTime = intval($assetMaintenance->asset_maintenance_time);
|
||||
?>
|
||||
@endif
|
||||
<td>{{ $assetMaintenanceTime }}</td>
|
||||
<td>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($assetMaintenance->cost,2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
$totalDays += $assetMaintenanceTime;
|
||||
$totalCost += floatval($assetMaintenance->cost);
|
||||
?>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" align="right"><strong>Totals:</strong></td>
|
||||
<td>{{number_format($totalDays)}}</td>
|
||||
<td>
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($totalCost,2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
|
@ -130,4 +129,3 @@
|
|||
});
|
||||
</script>
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -16,175 +16,162 @@
|
|||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
|
||||
{{ Form::open(['method' => 'post', 'class' => 'form-horizontal']) }}
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
{{ Form::open(['method' => 'post', 'class' => 'form-horizontal']) }}
|
||||
{{csrf_field()}}
|
||||
|
||||
<!-- Horizontal Form -->
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Customize Report</h3>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
<!-- Horizontal Form -->
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Customize Report</h3>
|
||||
</div><!-- /.box-header -->
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('company', '1') }}
|
||||
{{ trans('general.company') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('asset_tag', '1') }}
|
||||
{{ trans('general.asset_tag') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('asset_name', '1') }}
|
||||
{{ trans('admin/hardware/form.name') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('manufacturer', '1') }}
|
||||
{{ trans('general.manufacturer') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('model', '1') }}
|
||||
{{ trans('general.asset_models') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('category', '1') }}
|
||||
{{ trans('general.category') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('serial', '1') }}
|
||||
{{ trans('admin/hardware/table.serial') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('purchase_date', '1') }}
|
||||
{{ trans('admin/licenses/table.purchase_date') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('purchase_cost', '1') }}
|
||||
{{ trans('admin/hardware/form.cost') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('eol', '1') }}
|
||||
{{ trans('admin/hardware/table.eol') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('order', '1') }}
|
||||
{{ trans('admin/hardware/form.order') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('supplier', '1') }}
|
||||
{{ trans('general.suppliers') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('location', '1') }}
|
||||
{{ trans('general.location') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('assigned_to', '1') }}
|
||||
{{ trans('admin/licenses/table.assigned_to') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('username', '1') }}
|
||||
{{ trans('admin/users/table.username') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('employee_num', '1') }}
|
||||
{{ trans('admin/users/table.employee_num') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('status', '1') }}
|
||||
{{ trans('general.status') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('warranty', '1') }}
|
||||
{{ trans('admin/hardware/form.warranty') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('depreciation', '1') }}
|
||||
{{ trans('general.depreciation') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('expected_checkin', '1') }}
|
||||
{{ trans('admin/hardware/form.expected_checkin') }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@foreach ($customfields as $customfield)
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox($customfield->db_column_name(), '1') }}
|
||||
{{ $customfield->name }}
|
||||
{{ Form::checkbox('company', '1') }}
|
||||
{{ trans('general.company') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('asset_tag', '1') }}
|
||||
{{ trans('general.asset_tag') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('asset_name', '1') }}
|
||||
{{ trans('admin/hardware/form.name') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('manufacturer', '1') }}
|
||||
{{ trans('general.manufacturer') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('model', '1') }}
|
||||
{{ trans('general.asset_models') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('category', '1') }}
|
||||
{{ trans('general.category') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('serial', '1') }}
|
||||
{{ trans('admin/hardware/table.serial') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('purchase_date', '1') }}
|
||||
{{ trans('admin/licenses/table.purchase_date') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('purchase_cost', '1') }}
|
||||
{{ trans('admin/hardware/form.cost') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('eol', '1') }}
|
||||
{{ trans('admin/hardware/table.eol') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('order', '1') }}
|
||||
{{ trans('admin/hardware/form.order') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('supplier', '1') }}
|
||||
{{ trans('general.suppliers') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('location', '1') }}
|
||||
{{ trans('general.location') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('assigned_to', '1') }}
|
||||
{{ trans('admin/licenses/table.assigned_to') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('username', '1') }}
|
||||
{{ trans('admin/users/table.username') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('employee_num', '1') }}
|
||||
{{ trans('admin/users/table.employee_num') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('status', '1') }}
|
||||
{{ trans('general.status') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('warranty', '1') }}
|
||||
{{ trans('admin/hardware/form.warranty') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('depreciation', '1') }}
|
||||
{{ trans('general.depreciation') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox('expected_checkin', '1') }}
|
||||
{{ trans('admin/hardware/form.expected_checkin') }}
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@foreach ($customfields as $customfield)
|
||||
<div class="checkbox col-md-12">
|
||||
<label>
|
||||
{{ Form::checkbox($customfield->db_column_name(), '1') }}
|
||||
{{ $customfield->name }}
|
||||
</label>
|
||||
</div>
|
||||
@endforeach
|
||||
</div> <!-- /.col-md-3-->
|
||||
|
||||
<div class="col-md-7">
|
||||
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (YYYY-mm-dd-his-custom-asset-report.csv) will download automatically, and you can open it in Excel.</p>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<p>Select the fields you'd like to include in your custom report, and click Generate. The file (YYYY-mm-dd-his-custom-asset-report.csv) will download automatically, and you can open it in Excel.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div> <!-- /.box-body-->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-download icon-white"></i> {{ trans('general.generate') }}</button>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-download icon-white"></i> {{ trans('general.generate') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div> <!--/.box.box-default-->
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,140 +9,138 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-striped table-bordered table-compact"
|
||||
name="depreciationReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="depreciationReportTable">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/categories/general.category_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-striped table-bordered table-compact"
|
||||
name="depreciationReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="depreciationReportTable">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1" data-visible="false">{{ trans('admin/categories/general.category_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-sm-1">{{ trans('general.name') }}</th>
|
||||
@endif
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/depreciations/general.depreciation_name') }}</th>
|
||||
@endif
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/depreciations/general.depreciation_name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/depreciations/general.number_of_months') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.eol') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ is_null($asset->company) ? '' : $asset->company->name }}</td>
|
||||
<td>
|
||||
@if ($asset->model)
|
||||
{{ $asset->model->category->name }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->deleted_at!='')
|
||||
<del>{{ $asset->asset_tag }}</del>
|
||||
@else
|
||||
{{ $asset->asset_tag }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.eol') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ is_null($asset->company) ? '' : $asset->company->name }}</td>
|
||||
<td>
|
||||
@if ($asset->model)
|
||||
{{ $asset->model->category->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->deleted_at!='')
|
||||
<del>{{ $asset->asset_tag }}</del>
|
||||
@else
|
||||
{{ $asset->asset_tag }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->months }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assigneduser)
|
||||
@if ($asset->assigneduser->deleted_at!='')
|
||||
<del>{{ $asset->assigneduser->present()->fullName() }}</del>
|
||||
@else
|
||||
<a href="{{ route('users.show', $asset->assigned_to) }}">
|
||||
{{ $asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->model->depreciation)
|
||||
{{ $asset->model->depreciation->months }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assigneduser)
|
||||
@if ($asset->assigneduser->deleted_at!='')
|
||||
<del>{{ $asset->assigneduser->present()->fullName() }}</del>
|
||||
@else
|
||||
<a href="{{ route('users.show', $asset->assigned_to) }}">
|
||||
{{ $asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{{ $asset->assetloc->name }}
|
||||
@elseif ($asset->defaultloc)
|
||||
{{ $asset->defaultloc->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->purchase_date }}</td>
|
||||
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($asset->assetloc)
|
||||
{{ $asset->assetloc->name }}
|
||||
@elseif ($asset->defaultloc)
|
||||
{{ $asset->defaultloc->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->purchase_date }}</td>
|
||||
<td>
|
||||
@if ($asset->model->eol) {{ $asset->present()->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if ($asset->model->eol) {{ $asset->present()->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($asset->purchase_cost > 0)
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc )
|
||||
@if ($asset->purchase_cost > 0)
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc )
|
||||
{{ $asset->assetloc->currency }}
|
||||
@else
|
||||
@else
|
||||
{{ $snipeSettings->default_currency }}
|
||||
@endif
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}</td>
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc )
|
||||
@endif
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc )
|
||||
{{ $asset->assetloc->currency }}
|
||||
@else
|
||||
@else
|
||||
{{ $snipeSettings->default_currency }}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }}</td>
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc)
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->getDepreciatedValue()) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
@if ($asset->assetloc)
|
||||
{{ $asset->assetloc->currency }}
|
||||
@else
|
||||
@else
|
||||
{{ $snipeSettings->default_currency }}
|
||||
@endif
|
||||
|
||||
-{{ \App\Helpers\Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue())) }}
|
||||
</td>
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /.table-responsive-->
|
||||
</div> <!-- /.box-body-->
|
||||
</div> <!--/box.box-default-->
|
||||
</div> <!-- /.col-md-12-->
|
||||
</div> <!--/.row-->
|
||||
|
||||
-{{ \App\Helpers\Helper::formatCurrencyOutput(($asset->purchase_cost - $asset->getDepreciatedValue())) }}</td>
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
|
|
|
@ -9,92 +9,86 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="page-header">
|
||||
|
||||
<div class="pull-right">
|
||||
<a href="{{ route('reports/export') }}" class="btn btn-flat gray pull-right"><i class="fa fa-download icon-white"></i>
|
||||
{{ trans('admin/hardware/table.dl_csv') }}</a>
|
||||
</div>
|
||||
|
||||
<h3>{{ trans('general.depreciation_report') }}</h3>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="table-responsive">
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-sm-1">{{ trans('general.name') }}</th>
|
||||
@endif
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.eol') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->assigned_to != '')
|
||||
<a href="{{ route('users.show', $asset->assigned_to) }}">
|
||||
{{ $asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {{ Location::find($asset->assigneduser->location_id)->city }}
|
||||
,
|
||||
{{ Location::find($asset->assigneduser->location_id)->state }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->purchase_date }}</td>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table id="example">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.title') }}</th>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<th class="col-sm-1">{{ trans('general.name') }}</th>
|
||||
@endif
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_date') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.eol') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($assets as $asset)
|
||||
<tr>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->model->name }}</td>
|
||||
@if ($snipeSettings->display_asset_name)
|
||||
<td>{{ $asset->name }}</td>
|
||||
@endif
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>
|
||||
@if ($asset->assigned_to != '')
|
||||
<a href="{{ route('users.show', $asset->assigned_to) }}">
|
||||
{{ $asset->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (($asset->assigned_to > 0) && ($asset->assigneduser->location_id > 0)) {{ Location::find($asset->assigneduser->location_id)->city }}
|
||||
,
|
||||
{{ Location::find($asset->assigneduser->location_id)->state }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->purchase_date }}</td>
|
||||
|
||||
<td>
|
||||
@if ($asset->model->eol) {{ $asset->present()->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($asset->purchase_cost > 0)
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($asset->depreciate()) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
-{{ number_format(($asset->purchase_cost - $asset->depreciate())) }}</td>
|
||||
@else
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<td>
|
||||
@if ($asset->model->eol) {{ $asset->present()->eol_date() }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@if ($asset->purchase_cost > 0)
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ \App\Helpers\Helper::formatCurrencyOutput($asset->purchase_cost) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
{{ number_format($asset->depreciate()) }}
|
||||
</td>
|
||||
<td class="align-right">
|
||||
{{ $snipeSettings->default_currency }}
|
||||
-{{ number_format(($asset->purchase_cost - $asset->depreciate())) }}
|
||||
</td>
|
||||
@else {{-- purchase_cost > 0 --}}
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -8,62 +8,67 @@
|
|||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="licensesReport"
|
||||
id="table"
|
||||
class="table table-striped"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="licensesReportTable">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.purchase_date') }}</th>
|
||||
<th class="col-sm-1 text-right" class="col-sm-1">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.depreciation') }}</th>
|
||||
<th class="col-sm-1 text-right">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1 text-right">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="licensesReport"
|
||||
id="table"
|
||||
class="table table-striped"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="licensesReportTable">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.seats') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.remaining_seats') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/licenses/form.expiration') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.purchase_date') }}</th>
|
||||
<th class="col-sm-1 text-right" class="col-sm-1">{{ trans('general.purchase_cost') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.depreciation') }}</th>
|
||||
<th class="col-sm-1 text-right">{{ trans('admin/hardware/table.book_value') }}</th>
|
||||
<th class="col-sm-1 text-right">{{ trans('admin/hardware/table.diff') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
@foreach ($licenses as $license)
|
||||
<tr>
|
||||
<td>{{ is_null($license->company) ? '' : $license->company->name }}</td>
|
||||
<td>{{ $license->name }}</td>
|
||||
<td>{{ mb_strimwidth($license->serial, 0, 50, "...") }}</td>
|
||||
<td>{{ $license->seats }}</td>
|
||||
<td>{{ $license->remaincount() }}</td>
|
||||
<td>{{ $license->expiration_date }}</td>
|
||||
<td>{{ $license->purchase_date }}</td>
|
||||
<td class="text-right">
|
||||
{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ ($license->depreciation) ? e($license->depreciation->name).' ('.$license->depreciation->months.' '.trans('general.months').')' : '' }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
-{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /.table-responsive-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@foreach ($licenses as $license)
|
||||
<tr>
|
||||
<td>{{ is_null($license->company) ? '' : $license->company->name }}</td>
|
||||
<td>{{ $license->name }}</td>
|
||||
<td>{{ mb_strimwidth($license->serial, 0, 50, "...") }}</td>
|
||||
<td>{{ $license->seats }}</td>
|
||||
<td>{{ $license->remaincount() }}</td>
|
||||
<td>{{ $license->expiration_date }}</td>
|
||||
<td>{{ $license->purchase_date }}</td>
|
||||
<td class="text-right">
|
||||
{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->purchase_cost) }}</td>
|
||||
<td>{{ ($license->depreciation) ? e($license->depreciation->name).' ('.$license->depreciation->months.' '.trans('general.months').')' : '' }}</td>
|
||||
<td class="text-right">{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput($license->getDepreciatedValue()) }}</td>
|
||||
<td class="text-right">-{{ $snipeSettings->default_currency }}{{ \App\Helpers\Helper::formatCurrencyOutput(($license->purchase_cost - $license->getDepreciatedValue())) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
|
@ -105,5 +110,3 @@
|
|||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
|
@ -13,91 +13,89 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="unacceptedAssetsReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="unacceptedAssets">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.category') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/form.name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($assetsForReport)
|
||||
@foreach ($assetsForReport as $assetItem)
|
||||
<tr>
|
||||
<td>{{ is_null($assetItem->company) ? '' : $assetItem->company->name }}</td>
|
||||
<td>{{ $assetItem->model->category->name }}</td>
|
||||
<td>{{ $assetItem->model->name }}</td>
|
||||
<td>{{ link_to_route('hardware.show',$assetItem->present()->name(), [$assetItem->id]) }}</td>
|
||||
<td>{{ $assetItem->asset_tag }}</td>
|
||||
<td>{{ link_to_route('users.show', $assetItem->assigneduser->present()->fullName(), [$assetItem->assigned_to])}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
name="unacceptedAssetsReport"
|
||||
id="table"
|
||||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="unacceptedAssets">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-sm-1">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th class="col-sm-1">{{ trans('general.category') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/form.model') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/form.name') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-sm-1">{{ trans('admin/hardware/table.checkoutto') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if ($assetsForReport)
|
||||
@foreach ($assetsForReport as $assetItem)
|
||||
<tr>
|
||||
<td>{{ is_null($assetItem->company) ? '' : $assetItem->company->name }}</td>
|
||||
<td>{{ $assetItem->model->category->name }}</td>
|
||||
<td>{{ $assetItem->model->name }}</td>
|
||||
<td>{{ link_to_route('hardware.show',$assetItem->present()->name(), [$assetItem->id]) }}</td>
|
||||
<td>{{ $assetItem->asset_tag }}</td>
|
||||
<td>{{ link_to_route('users.show', $assetItem->assigneduser->present()->fullName(), [$assetItem->assigned_to])}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ $snipeSettings->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'client',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script src="{{ asset('assets/js/bootstrap-table.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/cookie/bootstrap-table-cookie.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/mobile/bootstrap-table-mobile.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/bootstrap-table-export.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/tableExport.js') }}"></script>
|
||||
<script src="{{ asset('assets/js/extensions/export/jquery.base64.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#table').bootstrapTable({
|
||||
classes: 'table table-responsive table-no-bordered',
|
||||
undefinedText: '',
|
||||
iconsPrefix: 'fa',
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: {{ $snipeSettings->per_page }},
|
||||
pagination: true,
|
||||
sidePagination: 'client',
|
||||
sortable: true,
|
||||
cookie: true,
|
||||
mobileResponsive: true,
|
||||
showExport: true,
|
||||
showColumns: true,
|
||||
exportDataType: 'all',
|
||||
exportTypes: ['csv', 'txt','json', 'xml'],
|
||||
maintainSelected: true,
|
||||
paginationFirstText: "{{ trans('general.first') }}",
|
||||
paginationLastText: "{{ trans('general.last') }}",
|
||||
paginationPreText: "{{ trans('general.previous') }}",
|
||||
paginationNextText: "{{ trans('general.next') }}",
|
||||
pageList: ['10','25','50','100','150','200'],
|
||||
icons: {
|
||||
paginationSwitchDown: 'fa-caret-square-o-down',
|
||||
paginationSwitchUp: 'fa-caret-square-o-up',
|
||||
columns: 'fa-columns',
|
||||
refresh: 'fa-refresh'
|
||||
},
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<th>File</th>
|
||||
|
@ -24,20 +23,24 @@
|
|||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<td><a href="backups/download/{{ $file['filename'] }}">{{ $file['filename'] }}</a></td>
|
||||
<td>{{ date("M d, Y g:i A", $file['modified']) }} </td>
|
||||
<td>{{ $file['filesize'] }}</td>
|
||||
<td>
|
||||
<a data-html="false"
|
||||
class="btn delete-asset btn-danger btn-sm {{ (config('app.lock_passwords')) ? ' disabled': '' }}" data-toggle="modal" href=" {{ route('settings/delete-file', $file['filename']) }}" data-content="{{ trans('admin/settings/message.backup.delete_confirm') }}" data-title="{{ trans('general.delete') }} {{ htmlspecialchars($file['filename']) }} ?" onClick="return false;">
|
||||
<i class="fa fa-trash icon-white"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@foreach ($files as $file)
|
||||
<tr>
|
||||
<td><a href="backups/download/{{ $file['filename'] }}">{{ $file['filename'] }}</a></td>
|
||||
<td>{{ date("M d, Y g:i A", $file['modified']) }} </td>
|
||||
<td>{{ $file['filesize'] }}</td>
|
||||
<td>
|
||||
{{ Helper::generateDatatableButton(
|
||||
'delete',
|
||||
route('settings/delete-file', $file['filename']),
|
||||
config('app.lock_passwords'),
|
||||
trans('admin/settings/message.backup.delete_confirm'),
|
||||
$file['filename']
|
||||
)
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,11 +6,8 @@
|
|||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
|
@ -21,291 +18,267 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
@foreach ($settings as $setting)
|
||||
<tr>
|
||||
<td class="col-md-4">{{ trans('admin/settings/general.site_name') }}</td>
|
||||
<td class="col-md-8">{{ $setting->site_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
|
||||
</td>
|
||||
|
||||
@if ($setting->full_multiple_companies_support == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.two_factor_enabled_text') }}</td>
|
||||
|
||||
@if ($setting->two_factor_enabled == '')
|
||||
<td>{{ trans('admin/settings/general.two_factor_disabled') }}</td>
|
||||
@elseif ($setting->two_factor_enabled == '1')
|
||||
<td>{{ trans('admin/settings/general.two_factor_optional') }}</td>
|
||||
@elseif ($setting->two_factor_enabled == '2')
|
||||
<td>{{ trans('admin/settings/general.two_factor_required') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.default_currency') }}</td>
|
||||
<td>{{ $setting->default_currency }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.alert_email') }}</td>
|
||||
|
||||
<tbody>
|
||||
@foreach ($settings as $setting)
|
||||
<tr>
|
||||
<td class="col-md-4">{{ trans('admin/settings/general.site_name') }}</td>
|
||||
<td class="col-md-8">{{ $setting->site_name }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{{ trans('admin/settings/general.full_multiple_companies_support_text') }}
|
||||
</td>
|
||||
@if ($setting->alert_email)
|
||||
<td>{{ $setting->alert_email }}</td>
|
||||
@else
|
||||
<td>--</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.alerts_enabled') }}</td>
|
||||
|
||||
@if ($setting->full_multiple_companies_support == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.two_factor_enabled_text') }}</td>
|
||||
@if ($setting->alerts_enabled == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.header_color') }}</td>
|
||||
|
||||
@if ($setting->two_factor_enabled == '')
|
||||
<td>{{ trans('admin/settings/general.two_factor_disabled') }}</td>
|
||||
@elseif ($setting->two_factor_enabled == '1')
|
||||
<td>{{ trans('admin/settings/general.two_factor_optional') }}</td>
|
||||
@elseif ($setting->two_factor_enabled == '2')
|
||||
<td>{{ trans('admin/settings/general.two_factor_required') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.default_currency') }}</td>
|
||||
<td>{{ $setting->default_currency }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.alert_email') }}</td>
|
||||
@if ($setting->header_color)
|
||||
<td>{{ $setting->header_color }}</td>
|
||||
@else
|
||||
<td>default</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.auto_increment_assets') }}</td>
|
||||
|
||||
@if ($setting->alert_email)
|
||||
<td>{{ $setting->alert_email }}</td>
|
||||
@else
|
||||
<td>--</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.alerts_enabled') }}</td>
|
||||
@if ($setting->auto_increment_assets == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.require_accept_signature') }}</td>
|
||||
|
||||
@if ($setting->alerts_enabled == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if ($setting->require_accept_signature == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.load_remote_text') }}</td>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.header_color') }}</td>
|
||||
@if ($setting->load_remote == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.auto_increment_prefix') }}</td>
|
||||
<td>{{ $setting->auto_increment_prefix }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.per_page') }}</td>
|
||||
<td>{{ $setting->per_page }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.display_qr') }}</td>
|
||||
@if ($setting->qr_code == 1)
|
||||
<td>{{ trans('general.yes') }}
|
||||
({{ $setting->barcode_type }})
|
||||
{{ $setting->qr_text }}
|
||||
|
||||
@if ($setting->header_color)
|
||||
<td>{{ $setting->header_color }}</td>
|
||||
@else
|
||||
<td>default</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.auto_increment_assets') }}</td>
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.default_eula_text') }}</td>
|
||||
|
||||
@if ($setting->auto_increment_assets == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if ($setting->default_eula_text!='')
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.slack_integration') }} </td>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.require_accept_signature') }}</td>
|
||||
@if ($setting->slack_endpoint!='')
|
||||
<td>{{ trans('general.yes') }}
|
||||
|
||||
@if ($setting->require_accept_signature == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.load_remote_text') }}</td>
|
||||
|
||||
@if ($setting->load_remote == 1)
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.auto_increment_prefix') }}</td>
|
||||
<td>{{ $setting->auto_increment_prefix }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.per_page') }}</td>
|
||||
<td>{{ $setting->per_page }} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.display_qr') }}</td>
|
||||
@if ($setting->qr_code == 1)
|
||||
<td>{{ trans('general.yes') }}
|
||||
({{ $setting->barcode_type }})
|
||||
{{ $setting->qr_text }}
|
||||
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.default_eula_text') }}</td>
|
||||
|
||||
@if ($setting->default_eula_text!='')
|
||||
<td>{{ trans('general.yes') }}</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.slack_integration') }} </td>
|
||||
|
||||
@if ($setting->slack_endpoint!='')
|
||||
<td>{{ trans('general.yes') }}
|
||||
|
||||
@if ($setting->slack_channel!='')
|
||||
{{ $setting->slack_channel }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.ldap_integration') }}</td>
|
||||
|
||||
@if ($setting->ldap_enabled == 1)
|
||||
<td>
|
||||
{{ $setting->ldap_server }}
|
||||
@if ($setting->is_ad == '1')
|
||||
(Active Directory)
|
||||
@endif
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if ($setting->ldap_enabled == 1)
|
||||
<tr id="ldaptestrow">
|
||||
<td class="col-md-4">Test LDAP Connection</td>
|
||||
<td class="col-md-8">
|
||||
|
||||
<a class="btn btn-default btn-sm pull-left" id="ldaptest" style="margin-right: 10px;"> Test LDAP</a>
|
||||
|
||||
<span id="ldaptesticon">
|
||||
</span>
|
||||
<span id="ldaptestresult">
|
||||
</span>
|
||||
<span id="ldapteststatus">
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@if ($setting->slack_channel!='')
|
||||
{{ $setting->slack_channel }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.ldap_integration') }}</td>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($setting->ldap_enabled == 1)
|
||||
<td>
|
||||
{{ $setting->ldap_server }}
|
||||
@if ($setting->is_ad == '1')
|
||||
(Active Directory)
|
||||
@endif
|
||||
</td>
|
||||
@else
|
||||
<td>{{ trans('general.no') }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if ($setting->ldap_enabled == 1)
|
||||
<tr id="ldaptestrow">
|
||||
<td class="col-md-4">Test LDAP Connection</td>
|
||||
<td class="col-md-8">
|
||||
<a class="btn btn-default btn-sm pull-left" id="ldaptest" style="margin-right: 10px;"> Test LDAP</a>
|
||||
<span id="ldaptesticon">
|
||||
</span>
|
||||
<span id="ldaptestresult">
|
||||
</span>
|
||||
<span id="ldapteststatus">
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h4>{{ trans('admin/settings/general.system') }}</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">{{ trans('admin/settings/general.snipe_version') }}</td>
|
||||
<td class="col-md-8">
|
||||
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.php') }}</td>
|
||||
<td> {{ phpversion() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.laravel') }}</td>
|
||||
<td>
|
||||
{{ $setting->lar_ver() }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-solid box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-warning"></i> {{ trans('admin/settings/general.purge') }}</h3>
|
||||
</div>
|
||||
{{ Form::open(['method' => 'POST', 'route' => ['purge'], 'class' => 'form-horizontal', 'role' => 'form' ]) }}
|
||||
<!-- CSRF Token -->
|
||||
{{ Form::hidden('_token', csrf_token()) }}
|
||||
<div class="box-body">
|
||||
<p>{{ trans('admin/settings/general.confirm_purge_help') }}</p>
|
||||
|
||||
|
||||
|
||||
<div class="col-md-3{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
{{ Form::label('confirm_purge', trans('admin/settings/general.confirm_purge')) }}
|
||||
</div>
|
||||
<div class="col-md-9{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'disabled')) }}
|
||||
@else
|
||||
{{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control')) }}
|
||||
@endif
|
||||
|
||||
{!! $errors->first('ldap_version', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-danger">{{ trans('admin/settings/general.purge') }}</button>
|
||||
</div> <!-- /box body -->
|
||||
</form>
|
||||
</div>
|
||||
<h4>{{ trans('admin/settings/general.system') }}</h4>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="col-md-4">{{ trans('admin/settings/general.snipe_version') }}</td>
|
||||
<td class="col-md-8">
|
||||
{{ config('version.app_version') }} build {{ config('version.build_version') }} ({{ config('version.hash_version') }})
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.php') }}</td>
|
||||
<td> {{ phpversion() }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('admin/settings/general.laravel') }}</td>
|
||||
<td>
|
||||
{{ $setting->lar_ver() }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /box-body-->
|
||||
</div> <!--/box-default-->
|
||||
</div><!--/col-md-8-->
|
||||
</div><!--/row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-solid box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-warning"></i> {{ trans('admin/settings/general.purge') }}</h3>
|
||||
</div>
|
||||
{{ Form::open(['method' => 'POST', 'route' => ['purge'], 'class' => 'form-horizontal', 'role' => 'form' ]) }}
|
||||
<!-- CSRF Token -->
|
||||
{{csrf_field()}}
|
||||
<div class="box-body">
|
||||
<p>{{ trans('admin/settings/general.confirm_purge_help') }}</p>
|
||||
<div class="col-md-3{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
{{ Form::label('confirm_purge', trans('admin/settings/general.confirm_purge')) }}
|
||||
</div>
|
||||
<div class="col-md-9{{ $errors->has('confirm_purge') ? 'error' : '' }}">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control', 'disabled'=>'disabled')) }}
|
||||
@else
|
||||
{{ Form::text('confirm_purge', Input::old('confirm_purge'), array('class' => 'form-control')) }}
|
||||
@endif
|
||||
{!! $errors->first('ldap_version', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-danger">{{ trans('admin/settings/general.purge') }}</button>
|
||||
</div> <!--/box-footer-->
|
||||
{{ Form::close() }}
|
||||
</div> <!--/.box-solid-->
|
||||
</div><!-- /.col-md-8-->
|
||||
</div><!--/.row-->
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
$("#ldaptest").click(function(){
|
||||
$("#ldaptestrow").removeClass('success');
|
||||
$("#ldaptestrow").removeClass('danger');
|
||||
$("#ldapteststatus").html('');
|
||||
$("#ldaptesticon").html('<i class="fa fa-spinner spin"></i>');
|
||||
$.ajax({
|
||||
url: '{{ route('settings/ldaptest') }}',
|
||||
type: 'GET',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
// console.dir(data);
|
||||
//console.log(data.responseJSON.message);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('success');
|
||||
$("#ldapteststatus").html('<i class="fa fa-check text-success"></i> It worked!');
|
||||
//$('#ldapteststatus').html('<i class="fa fa-check text-success"></i>');
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
//console.dir(data);
|
||||
//console.log(data.responseJSON.message);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('danger');
|
||||
$("#ldaptesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
||||
$('#ldapteststatus').text(data.responseJSON.message);
|
||||
}
|
||||
|
||||
|
||||
<script>
|
||||
$("#ldaptest").click(function(){
|
||||
$("#ldaptestrow").removeClass('success');
|
||||
$("#ldaptestrow").removeClass('danger');
|
||||
$("#ldapteststatus").html('');
|
||||
$("#ldaptesticon").html('<i class="fa fa-spinner spin"></i>');
|
||||
$.ajax({
|
||||
url: '{{ route('settings/ldaptest') }}',
|
||||
type: 'GET',
|
||||
data: {},
|
||||
dataType: 'json',
|
||||
|
||||
success: function (data) {
|
||||
// console.dir(data);
|
||||
//console.log(data.responseJSON.message);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('success');
|
||||
$("#ldapteststatus").html('<i class="fa fa-check text-success"></i> It worked!');
|
||||
//$('#ldapteststatus').html('<i class="fa fa-check text-success"></i>');
|
||||
},
|
||||
|
||||
error: function (data) {
|
||||
//console.dir(data);
|
||||
//console.log(data.responseJSON.message);
|
||||
$("#ldaptesticon").html('');
|
||||
$("#ldaptestrow").addClass('danger');
|
||||
$("#ldaptesticon").html('<i class="fa fa-exclamation-triangle text-danger"></i>');
|
||||
$('#ldapteststatus').text(data.responseJSON.message);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@stop
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -11,20 +11,15 @@
|
|||
{{ trans('general.back') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{!! nl2br($output) !!}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
{!! nl2br($output) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@stop
|
||||
|
|
|
@ -8,21 +8,13 @@ Create a User ::
|
|||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-check"></i>
|
||||
Success! Your admin user has been added!
|
||||
</div>
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-check"></i>
|
||||
Success! Your admin user has been added!
|
||||
</div>
|
||||
|
||||
<p>Click here to go to your app login! <a href="{{ url('/') }}">{{ url('/') }}</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<p>Click here to go to your app login! <a href="{{ url('/') }}">{{ url('/') }}</a></p>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -9,218 +9,215 @@ Create a User ::
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<p>This page will do a system check to make sure your configuration looks correct. We'll add your first user on the next page. </p>
|
||||
<p>This page will do a system check to make sure your configuration looks correct. We'll add your first user on the next page. </p>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-lg-2">Setting</th>
|
||||
<th class="col-lg-1">Valid</th>
|
||||
<th class="col-lg-9">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr {!! ($start_settings['url_valid']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>URL</td>
|
||||
<td>
|
||||
@if ($start_settings['url_valid'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['url_valid'])
|
||||
That URL looks right! Good job!
|
||||
@else
|
||||
Uh oh! Snipe-IT thinks your URL is {{ $start_settings['url_config'] }}, but your real URL is {{ $start_settings['real_url'] }}
|
||||
Please update your <code>APP_URL</code> settings in your <code>.env</code> file
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-lg-2">Setting</th>
|
||||
<th class="col-lg-1">Valid</th>
|
||||
<th class="col-lg-9">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr{!! ($start_settings['url_valid']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>URL</td>
|
||||
<td>
|
||||
@if ($start_settings['url_valid'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
<tr {!! ($start_settings['db_conn']===true) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>Database</td>
|
||||
<td>
|
||||
@if ($start_settings['db_conn']===true)
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['db_conn']===true)
|
||||
Great work! Connected to <code>{{ $start_settings['db_name'] }}</code>
|
||||
@else
|
||||
D'oh! Looks like we can't connect to your database. Please update your database settings in your <code>.env</code> file. Your database says: <code>{{ $start_settings['db_error'] }}</code>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['url_valid'])
|
||||
That URL looks right! Good job!
|
||||
@else
|
||||
Uh oh! Snipe-IT thinks your URL is {{ $start_settings['url_config'] }}, but your real URL is {{ $start_settings['real_url'] }}
|
||||
Please update your <code>APP_URL</code> settings in your <code>.env</code> file
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr{!! ($start_settings['db_conn']===true) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>Database</td>
|
||||
<td>
|
||||
@if ($start_settings['db_conn']===true)
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['db_conn']===true)
|
||||
Great work! Connected to <code>{{ $start_settings['db_name'] }}</code>
|
||||
@else
|
||||
D'oh! Looks like we can't connect to your database. Please update your database settings in your <code>.env</code> file. Your database says: <code>{{ $start_settings['db_error'] }}</code>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr{!! (!$start_settings['env_exposed']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>Config File</td>
|
||||
<td>
|
||||
@if (!$start_settings['env_exposed'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['env_exposed'])
|
||||
Sweet. It doesn't look like your <code>.env</code> file is exposed to the outside world. (You should double check this in a browser though. You don't ever want anyone able to see that file. Ever. Ever ever.) <a href="../../.env">Click here to check now</a> (This should return a file not found or forbidden error.)
|
||||
@else
|
||||
Please make sure your <code>.env</code>. You don't ever want anyone able to see that file. Ever. Ever ever. <a href="../../.env">Click here to check now</a> (This should return a file not found or forbidden error.)
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! (!$start_settings['env_exposed']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>Config File</td>
|
||||
<td>
|
||||
@if (!$start_settings['env_exposed'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['env_exposed'])
|
||||
Sweet. It doesn't look like your <code>.env</code> file is exposed to the outside world. (You should double check this in a browser though. You don't ever want anyone able to see that file. Ever. Ever ever.) <a href="../../.env">Click here to check now</a> (This should return a file not found or forbidden error.)
|
||||
@else
|
||||
Please make sure your <code>.env</code>. You don't ever want anyone able to see that file. Ever. Ever ever. <a href="../../.env">Click here to check now</a> (This should return a file not found or forbidden error.)
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr{!! ($start_settings['prod']) ? ' class="success"' : ' class="warning"' !!}>
|
||||
<td>Environment</td>
|
||||
<td>
|
||||
@if ($start_settings['prod'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['prod'])
|
||||
Your app is set to production mode. Rock on!
|
||||
@else
|
||||
Your app is set <code>{{ $start_settings['env'] }}</code> instead of <code>production</code> mode. If you're not planning on developing on Snipe-IT, please update your <code>APP_ENV</code> settings in your <code>.env</code> file to <code>production</code>.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! ($start_settings['prod']) ? ' class="success"' : ' class="warning"' !!}>
|
||||
<td>Environment</td>
|
||||
<td>
|
||||
@if ($start_settings['prod'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['prod'])
|
||||
Your app is set to production mode. Rock on!
|
||||
@else
|
||||
Your app is set <code>{{ $start_settings['env'] }}</code> instead of <code>production</code> mode. If you're not planning on developing on Snipe-IT, please update your <code>APP_ENV</code> settings in your <code>.env</code> file to <code>production</code>.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr{!! (!$start_settings['owner_is_admin']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>File Owner</td>
|
||||
<td>
|
||||
@if (!$start_settings['owner_is_admin'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['owner_is_admin'])
|
||||
Your app files are owned by <code>{{ $start_settings['owner'] }}</code>. That doesn't look like a default root/admin account. Nice!
|
||||
@else
|
||||
It looks like your files are owned by <code>{{ $start_settings['owner'] }}</code>, which might be a root/admin account. It's never a good idea to run a website with escalated priveliges.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! (!$start_settings['owner_is_admin']) ? ' class="success"' : ' class="danger"' !!}>
|
||||
<td>File Owner</td>
|
||||
<td>
|
||||
@if (!$start_settings['owner_is_admin'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['owner_is_admin'])
|
||||
Your app files are owned by <code>{{ $start_settings['owner'] }}</code>. That doesn't look like a default root/admin account. Nice!
|
||||
@else
|
||||
It looks like your files are owned by <code>{{ $start_settings['owner'] }}</code>, which might be a root/admin account. It's never a good idea to run a website with escalated priveliges.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr{!! (!$start_settings['writable']) ? ' class="danger"' : ' class="success"' !!}>
|
||||
<td>Permissions</td>
|
||||
<td>
|
||||
@if ($start_settings['writable'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['writable'])
|
||||
Yippee! Your app storage directory seems writable.
|
||||
@else
|
||||
Uh-oh. Your <code>{{ storage_path() }}</code> directory (or sub-directories within) are not writable by the web-server. Those directories need to be writable by the web server in order for the app to work.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! (!$start_settings['writable']) ? ' class="danger"' : ' class="success"' !!}>
|
||||
<td>Permissions</td>
|
||||
<td>
|
||||
@if ($start_settings['writable'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['writable'])
|
||||
Yippee! Your app storage directory seems writable.
|
||||
@else
|
||||
Uh-oh. Your <code>{{ storage_path() }}</code> directory (or sub-directories within) are not writable by the web-server. Those directories need to be writable by the web server in order for the app to work.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr{!! ($start_settings['debug_exposed']) ? ' class="danger"' : ' class="success"' !!}>
|
||||
<td>Debug</td>
|
||||
<td>
|
||||
@if (!$start_settings['debug_exposed'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['debug_exposed'])
|
||||
Awesomesauce. Debug is either turned off, or you're running this in a non-production environment. (Don't forget to turn it off when you're ready to go live.)
|
||||
@else
|
||||
Yikes! You should turn off debug mode unless you encounter any issues. Please update your <code>APP_DEBUG</code> settings in your <code>.env</code> file
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! ($start_settings['debug_exposed']) ? ' class="danger"' : ' class="success"' !!}>
|
||||
<td>Debug</td>
|
||||
<td>
|
||||
@if (!$start_settings['debug_exposed'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-error"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (!$start_settings['debug_exposed'])
|
||||
Awesomesauce. Debug is either turned off, or you're running this in a non-production environment. (Don't forget to turn it off when you're ready to go live.)
|
||||
@else
|
||||
Yikes! You should turn off debug mode unless you encounter any issues. Please update your <code>APP_DEBUG</code> settings in your <code>.env</code> file
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr{!! ($start_settings['gd']) ? ' class="success"' : ' class="warning"' !!}>
|
||||
<td>Image Library</td>
|
||||
<td>
|
||||
@if ($start_settings['gd'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-warning"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['gd'])
|
||||
GD is installed. Go you!
|
||||
@else
|
||||
The GD library isn't installed. While this won't prevent the system from working, you won't be able to generate labels or upload images.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="mailrow">
|
||||
<td>Email</td>
|
||||
<td id="mailtesticon">
|
||||
</td>
|
||||
<td id="mailtestresult">
|
||||
<button class="btn btn-default" id="mailtest"> Test Email</button>
|
||||
<span id="mailtestresult"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr {!! ($start_settings['gd']) ? ' class="success"' : ' class="warning"' !!}>
|
||||
<td>Image Library</td>
|
||||
<td>
|
||||
@if ($start_settings['gd'])
|
||||
<i class="fa fa-check preflight-success"></i>
|
||||
@else
|
||||
<i class="fa fa-times preflight-warning"></i>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($start_settings['gd'])
|
||||
GD is installed. Go you!
|
||||
@else
|
||||
The GD library isn't installed. While this won't prevent the system from working, you won't be able to generate labels or upload images.
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
@section('button')
|
||||
<form action="{{ route('setup.migrate') }}" method="GET">
|
||||
<button class="btn btn-primary">Next: Create Database Tables</button>
|
||||
</form>
|
||||
@parent
|
||||
@stop
|
||||
<tr id="mailrow">
|
||||
<td>Email</td>
|
||||
<td id="mailtesticon">
|
||||
</td>
|
||||
<td id="mailtestresult">
|
||||
<button class="btn btn-default" id="mailtest"> Test Email</button>
|
||||
<span id="mailtestresult"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@stop
|
||||
|
||||
@section('button')
|
||||
<form action="{{ route('setup.migrate') }}" method="GET">
|
||||
<button class="btn btn-primary">Next: Create Database Tables</button>
|
||||
</form>
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
$("#mailtest").click(function(){
|
||||
$("#mailtest").click(function(){
|
||||
|
||||
$("#mailtestresult").html('<i class="fa fa-spinner fa-spin"></i> Sending Email');
|
||||
$("#mailtestresult").html('<i class="fa fa-spinner fa-spin"></i> Sending Email');
|
||||
|
||||
$.ajax({url: "{{ route('setup.mailtest') }}", success: function(result){
|
||||
if (result=='success') {
|
||||
$("#mailrow").addClass('success');
|
||||
$("#mailtesticon").html('<i class="fa fa-check preflight-success"></i>');
|
||||
$("#mailtestresult").html('No errors on this end! Check your <code>{{ config('mail.from.address') }}</code> email account for a test email.');
|
||||
} else {
|
||||
$("#mailrow").addClass('danger');
|
||||
$("#mailtesticon").html('<i class="fa fa-check preflight-error"></i>');
|
||||
$("#mailtestresult").html('Something went wrong. Your email was not sent. Check your mail settings in your <code>.env</code> file.');
|
||||
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
error: function (result) {
|
||||
$.ajax({url: "{{ route('setup.mailtest') }}", success: function(result){
|
||||
if (result=='success') {
|
||||
$("#mailrow").addClass('success');
|
||||
$("#mailtesticon").html('<i class="fa fa-check preflight-success"></i>');
|
||||
$("#mailtestresult").html('No errors on this end! Check your <code>{{ config('mail.from.address') }}</code> email account for a test email.');
|
||||
} else {
|
||||
$("#mailrow").addClass('danger');
|
||||
$("#mailtesticon").html('<i class="fa fa-check preflight-error"></i>');
|
||||
$("#mailtestresult").html('Something went wrong. The server returned an error. Check your mail settings in your <code>.env</code> file, and check your <code>storage/logs</code> for additional information..');
|
||||
$("#mailtestresult").html('Something went wrong. Your email was not sent. Check your mail settings in your <code>.env</code> file.');
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
},
|
||||
error: function (result) {
|
||||
$("#mailrow").addClass('danger');
|
||||
$("#mailtesticon").html('<i class="fa fa-check preflight-error"></i>');
|
||||
$("#mailtestresult").html('Something went wrong. The server returned an error. Check your mail settings in your <code>.env</code> file, and check your <code>storage/logs</code> for additional information..');
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -8,33 +8,27 @@ Create a User ::
|
|||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
|
||||
@if (trim($output)=='Nothing to migrate.')
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-warning"></i>
|
||||
There was nothing to migrate. Your database tables were already set up!
|
||||
</div>
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
@if (trim($output)=='Nothing to migrate.')
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-warning">
|
||||
<i class="fa fa-warning"></i>
|
||||
There was nothing to migrate. Your database tables were already set up!
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-success">
|
||||
<i class="fa fa-check"></i>
|
||||
Your database tables have been created
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-success">
|
||||
<i class="fa fa-check"></i>
|
||||
Your database tables have been created
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<p>Migration output: </p>
|
||||
<pre>{{ $output }}</pre>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<p>Migration output: </p>
|
||||
<pre>{{ $output }}</pre>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('button')
|
||||
|
|
|
@ -9,109 +9,103 @@ Create a User ::
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<p> This is the account information you'll use to access the site for the first time. All fields are required. </p>
|
||||
<p> This is the account information you'll use to access the site for the first time. All fields are required. </p>
|
||||
|
||||
<form action="{{ route('setup.user.save') }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<form action="{{ route('setup.user.save') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
<div class="col-lg-12" style="padding-top: 20px;">
|
||||
<!-- Site Name -->
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 {{ $errors->has('site_name') ? 'error' : '' }}">
|
||||
{{ Form::label('site_name', trans('general.site_name')) }}
|
||||
{{ Form::text('site_name', Input::old('site_name'), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
|
||||
<!-- Site Name -->
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-12 {{ $errors->has('site_name') ? 'error' : '' }}">
|
||||
{{ Form::label('site_name', trans('general.site_name')) }}
|
||||
{{ Form::text('site_name', Input::old('site_name'), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
{!! $errors->first('site_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('site_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- email domain -->
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email_domain') ? 'error' : '' }}">
|
||||
{{ Form::label('email_domain', trans('general.email_domain')) }}
|
||||
{{ Form::text('email_domain', Input::old('email_domain'), array('class' => 'form-control','placeholder' => 'example.com')) }}
|
||||
<span class="help-block">{{ trans('general.email_domain_help') }}</span>
|
||||
|
||||
<!-- email domain -->
|
||||
{!! $errors->first('email_domain', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email_domain') ? 'error' : '' }}">
|
||||
{{ Form::label('email_domain', trans('general.email_domain')) }}
|
||||
{{ Form::text('email_domain', Input::old('email_domain'), array('class' => 'form-control','placeholder' => 'example.com')) }}
|
||||
<span class="help-block">{{ trans('general.email_domain_help') }}</span>
|
||||
<!-- email format -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email_format') ? 'error' : '' }}">
|
||||
{{ Form::label('email_format', trans('general.email_format')) }}
|
||||
{!! Form::username_format('email_format', Input::old('email_format', 'filastname'), 'select2') !!}
|
||||
{!! $errors->first('email_format', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('email_domain', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<!-- Name -->
|
||||
<div class="row">
|
||||
<!-- first name -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('first_name') ? 'error' : '' }}">
|
||||
{{ Form::label('first_name', trans('general.first_name')) }}
|
||||
{{ Form::text('first_name', Input::old('first_name'), array('class' => 'form-control','placeholder' => 'Jane')) }}
|
||||
{!! $errors->first('first_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- email format -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email_format') ? 'error' : '' }}">
|
||||
{{ Form::label('email_format', trans('general.email_format')) }}
|
||||
{!! Form::username_format('email_format', Input::old('email_format', 'filastname'), 'select2') !!}
|
||||
{!! $errors->first('email_format', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- last name -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('last_name') ? 'error' : '' }}">
|
||||
{{ Form::label('last_name', trans('general.last_name')) }}
|
||||
{{ Form::text('last_name', Input::old('last_name'), array('class' => 'form-control','placeholder' => 'Smith')) }}
|
||||
{!! $errors->first('last_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- email-->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email') ? 'error' : '' }}">
|
||||
{{ Form::label('email', trans('admin/users/table.email')) }}
|
||||
{{ Form::email('email', config('mail.from.address'), array('class' => 'form-control','placeholder' => 'you@example.com')) }}
|
||||
{!! $errors->first('email', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- first name -->
|
||||
<!-- username -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('username') ? 'error' : '' }}">
|
||||
{{ Form::label('username', trans('admin/users/table.username')) }}
|
||||
{{ Form::text('username', Input::old('username'), array('class' => 'form-control','placeholder' => 'jsmith')) }}
|
||||
{!! $errors->first('username', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-lg-6 {{ $errors->has('first_name') ? 'error' : '' }}">
|
||||
{{ Form::label('first_name', trans('general.first_name')) }}
|
||||
{{ Form::text('first_name', Input::old('first_name'), array('class' => 'form-control','placeholder' => 'Jane')) }}
|
||||
|
||||
{!! $errors->first('first_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- last name -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('last_name') ? 'error' : '' }}">
|
||||
{{ Form::label('last_name', trans('general.last_name')) }}
|
||||
{{ Form::text('last_name', Input::old('last_name'), array('class' => 'form-control','placeholder' => 'Smith')) }}
|
||||
{!! $errors->first('last_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- email-->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('email') ? 'error' : '' }}">
|
||||
{{ Form::label('email', trans('admin/users/table.email')) }}
|
||||
{{ Form::email('email', config('mail.from.address'), array('class' => 'form-control','placeholder' => 'you@example.com')) }}
|
||||
{!! $errors->first('email', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- username -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('username') ? 'error' : '' }}">
|
||||
{{ Form::label('username', trans('admin/users/table.username')) }}
|
||||
{{ Form::text('username', Input::old('username'), array('class' => 'form-control','placeholder' => 'jsmith')) }}
|
||||
{!! $errors->first('username', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- password -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('password') ? 'error' : '' }}">
|
||||
{{ Form::label('password', trans('admin/users/table.password')) }}
|
||||
{{ Form::password('password', array('class' => 'form-control')) }}
|
||||
{!! $errors->first('password', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- password confirm -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('password_confirm') ? 'error' : '' }}">
|
||||
{{ Form::label('password_confirmation', trans('admin/users/table.password_confirm')) }}
|
||||
{{ Form::password('password_confirm', array('class' => 'form-control')) }}
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email credentials -->
|
||||
<div class="form-group col-lg-12">
|
||||
<label>Email credentials</label>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="email_creds">Email my credentials to the email address above
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- password -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('password') ? 'error' : '' }}">
|
||||
{{ Form::label('password', trans('admin/users/table.password')) }}
|
||||
{{ Form::password('password', array('class' => 'form-control')) }}
|
||||
{!! $errors->first('password', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
|
||||
<!-- password confirm -->
|
||||
<div class="form-group col-lg-6 {{ $errors->has('password_confirm') ? 'error' : '' }}">
|
||||
{{ Form::label('password_confirmation', trans('admin/users/table.password_confirm')) }}
|
||||
{{ Form::password('password_confirm', array('class' => 'form-control')) }}
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email credentials -->
|
||||
<div class="form-group col-lg-12">
|
||||
<label>Email credentials</label>
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" value="1" name="email_creds">Email my credentials to the email address above
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/.COL-LG-12-->
|
||||
@stop
|
||||
|
||||
@section('button')
|
||||
<button class="btn btn-primary">Next: Save User</button>
|
||||
</form>
|
||||
</form>
|
||||
@parent
|
||||
@stop
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
<a href="{{ route('suppliers.create') }}" class="btn btn-primary pull-right"> {{ trans('general.create') }}</a>
|
||||
@stop
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
|
|
@ -15,215 +15,213 @@
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.assets') }}
|
||||
</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out suppliers table -->
|
||||
<h6>Assets</h6>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3">Asset Tag</th>
|
||||
<th class="col-md-3"><span class="line"></span>Name</th>
|
||||
<th class="col-md-3"><span class="line"></span>User</th>
|
||||
<th class="col-md-2"><span class="line"></span>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@foreach ($supplier->assets as $supplierassets)
|
||||
<tr>
|
||||
|
||||
<td><a href="{{ route('hardware.show', $supplierassets->id) }}">{{ $supplierassets->asset_tag }}</a></td>
|
||||
<td><a href="{{ route('hardware.show', $supplierassets->id) }}">{{ $supplierassets->present()->name() }}</a></td>
|
||||
<td>
|
||||
@if ($supplierassets->assigneduser)
|
||||
<a href="{{ route('users.show', $supplierassets->assigned_to) }}">
|
||||
{{ $supplierassets->assigneduser->present()->fullName() }}
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($supplierassets->assigned_to != '')
|
||||
<a href="{{ route('checkin/hardware', $supplierassets->id) }}" class="btn btn-info btn-sm">Checkin</a>
|
||||
@else
|
||||
<a href="{{ route('checkout/hardware', $supplierassets->id) }}" class="btn btn-success btn-sm">Checkout</a>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> {{ trans('general.assets') }}
|
||||
</h3>
|
||||
</div>
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>Contact:</h4>
|
||||
<ul class="list-unstyled">
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
@if ($supplier->contact)
|
||||
<li><i class="fa fa-user"></i>{{ $supplier->contact }}</li>
|
||||
@endif
|
||||
@if ($supplier->phone)
|
||||
<li><i class="fa fa-phone"></i>{{ $supplier->phone }}</li>
|
||||
@endif
|
||||
@if ($supplier->fax)
|
||||
<li><i class="fa fa-print"></i>{{ $supplier->fax }}</li>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($supplier->email)
|
||||
<li><i class="fa fa-envelope-o"></i><a href="mailto:{{ $supplier->email }}">
|
||||
{{ $supplier->email }}
|
||||
</a></li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->url)
|
||||
<li><i class="fa fa-globe"></i><a href="{{ $supplier->url }}" target="_new">{{ $supplier->url }}</a></li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->address)
|
||||
<li><br>
|
||||
{{ $supplier->address }}
|
||||
|
||||
@if ($supplier->address2)
|
||||
<br>
|
||||
{{ $supplier->address2 }}
|
||||
<div class="box-body">
|
||||
<!-- checked out suppliers table -->
|
||||
<h6>Assets</h6>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-3">Asset Tag</th>
|
||||
<th class="col-md-3"><span class="line"></span>Name</th>
|
||||
<th class="col-md-3"><span class="line"></span>User</th>
|
||||
<th class="col-md-2"><span class="line"></span>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($supplier->assets as $supplierassets)
|
||||
<tr>
|
||||
<td>
|
||||
{!! $supplierassets->present()->assetTagUrl() !!}
|
||||
</td>
|
||||
<td>
|
||||
{!! $supplierassets->present()->nameUrl() !!}
|
||||
</td>
|
||||
<td>
|
||||
@if ($supplierassets->assigneduser)
|
||||
{!! $supplierassets->assigneduser->present()->nameUrl() !!}
|
||||
@endif
|
||||
@if (($supplier->city) || ($supplier->state))
|
||||
<br>
|
||||
{{ $supplier->city }} {{ strtoupper($supplier->state) }} {{ $supplier->zip }} {{ strtoupper($supplier->country) }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($supplierassets->assigned_to != '')
|
||||
<a href="{{ route('checkin/hardware', $supplierassets->id) }}" class="btn btn-info btn-sm">Checkin</a>
|
||||
@else
|
||||
<a href="{{ route('checkout/hardware', $supplierassets->id) }}" class="btn btn-success btn-sm">Checkout</a>
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->notes)
|
||||
<li><i class="fa fa-comment"></i>{{ $supplier->notes }}</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->image)
|
||||
<li><br /><img src="{{ url('/') }}/uploads/suppliers/{{ $supplier->image }}" /></li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!--/box-body-->
|
||||
</div>
|
||||
</div> <!--/col-md-9-->
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3">
|
||||
<h4>Contact:</h4>
|
||||
<ul class="list-unstyled">
|
||||
@if ($supplier->contact)
|
||||
<li><i class="fa fa-user"></i>{{ $supplier->contact }}</li>
|
||||
@endif
|
||||
@if ($supplier->phone)
|
||||
<li><i class="fa fa-phone"></i>{{ $supplier->phone }}</li>
|
||||
@endif
|
||||
@if ($supplier->fax)
|
||||
<li><i class="fa fa-print"></i>{{ $supplier->fax }}</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->email)
|
||||
<li>
|
||||
<i class="fa fa-envelope-o"></i>
|
||||
<a href="mailto:{{ $supplier->email }}">
|
||||
{{ $supplier->email }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->url)
|
||||
<li>
|
||||
<i class="fa fa-globe"></i>
|
||||
<a href="{{ $supplier->url }}" target="_new">{{ $supplier->url }}</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->address)
|
||||
<li><br>
|
||||
{{ $supplier->address }}
|
||||
|
||||
@if ($supplier->address2)
|
||||
<br>
|
||||
{{ $supplier->address2 }}
|
||||
@endif
|
||||
@if (($supplier->city) || ($supplier->state))
|
||||
<br>
|
||||
{{ $supplier->city }} {{ strtoupper($supplier->state) }} {{ $supplier->zip }} {{ strtoupper($supplier->country) }}
|
||||
@endif
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->notes)
|
||||
<li><i class="fa fa-comment"></i>{{ $supplier->notes }}</li>
|
||||
@endif
|
||||
|
||||
@if ($supplier->image)
|
||||
<li><br /><img src="{{ url('/') }}/uploads/suppliers/{{ $supplier->image }}" /></li>
|
||||
@endif
|
||||
</ul>
|
||||
</div> <!--/col-md-3-->
|
||||
</div> <!--/row-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title">Software</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">Name</th>
|
||||
<th class="col-md-4"><span class="line"></span>Serial</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($supplier->licenses as $license)
|
||||
<tr>
|
||||
<td>{!! $license->present()->nameUrl() !!}</td>
|
||||
<td>{!! $license->present()->serialUrl() !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title">Software</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-4">Name</th>
|
||||
<th class="col-md-4"><span class="line"></span>Serial</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($supplier->licenses as $license)
|
||||
<tr>
|
||||
<td><a href="{{ route('licenses.show', $license->id) }}">{{ $license->name }}</a></td>
|
||||
<td><a href="{{ route('licenses.show', $license->id) }}">{{ $license->serial }}</a></td>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> Improvements</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="box box-default">
|
||||
|
||||
@if ($supplier->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h3 class="box-title"> Improvements</h3>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/table.is_warranty') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th class="col-md-1"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
@if ($supplier->asset_maintenances)
|
||||
@foreach ($supplier->asset_maintenances as $improvement)
|
||||
@if (is_null($improvement->deleted_at))
|
||||
<tr>
|
||||
<td><a href="{{ route('hardware.show', $improvement->asset_id) }}">{{ $improvement->asset->name }}</a></td>
|
||||
<td>{{ $improvement->improvement_type }}</td>
|
||||
<td>{{ $improvement->start_date }}</td>
|
||||
<td>{{ $improvement->completion_date }}</td>
|
||||
<td>{{ $improvement->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}</td>
|
||||
<td>{{ sprintf( trans( 'general.currency' ) . '%01.2f', $improvement->cost) }}</td>
|
||||
<?php $totalCost += $improvement->cost; ?>
|
||||
<td><a href="{{ route('maintenances.edit', $improvement->id) }}" class="btn btn-warning"><i class="fa fa-pencil icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
<div class="box-body">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/table.asset_name') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.asset_maintenance_type') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.start_date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.completion_date') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/table.is_warranty') }}</th>
|
||||
<th class="col-md-2"><span class="line"></span>{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th class="col-md-1"><span class="line"></span>{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php $totalCost = 0; ?>
|
||||
@if ($supplier->asset_maintenances)
|
||||
@foreach ($supplier->asset_maintenances as $improvement)
|
||||
@if (is_null($improvement->deleted_at))
|
||||
<tr>
|
||||
<td><a href="{{ route('hardware.show', $improvement->asset_id) }}">{{ $improvement->asset->name }}</a></td>
|
||||
<td>{{ $improvement->improvement_type }}</td>
|
||||
<td>{{ $improvement->start_date }}</td>
|
||||
<td>{{ $improvement->completion_date }}</td>
|
||||
<td>{{ $improvement->is_warranty ? trans('admin/asset_maintenances/message.warranty') : trans('admin/asset_maintenances/message.not_warranty') }}</td>
|
||||
<td>{{ sprintf( trans( 'general.currency' ) . '%01.2f', $improvement->cost) }}</td>
|
||||
<?php $totalCost += $improvement->cost; ?>
|
||||
<td><a href="{{ route('maintenances.edit', $improvement->id) }}" class="btn btn-warning"><i class="fa fa-pencil icon-white"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{sprintf(trans( 'general.currency' ) . '%01.2f', $totalCost)}}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{sprintf(trans( 'general.currency' ) . '%01.2f', $totalCost)}}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /.row-->
|
||||
|
||||
@stop
|
||||
|
|
|
@ -9,113 +9,103 @@ Bulk Checkin & Delete
|
|||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
|
||||
<div class="box-body">
|
||||
<!-- CSRF Token -->
|
||||
{{csrf_field()}}
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-danger">
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
<strong>WARNING: </strong>
|
||||
You are about to delete the {{ count($users) }} user(s) listed below. Super admin names are highlighted in red.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-danger">
|
||||
<i class="fa fa-exclamation-circle"></i>
|
||||
<strong>WARNING: </strong>
|
||||
You are about to delete the {{ count($users) }} user(s) listed below. Super admin names are highlighted in red.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-warning">
|
||||
<p>{{ trans('feature_disabled') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-6">Name</th>
|
||||
<th class="col-md-5">Groups</th>
|
||||
<th class="col-md-5">Assets</th>
|
||||
<th class="col-md-5">Accessories</th>
|
||||
<th class="col-md-5">Licenses</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" class="warning">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
<label>Update all assets for these users to this status</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="warning">
|
||||
<label><input type="checkbox" name="edit_user['.e($user->id).']" checked> Check in all properties associated with these users</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
@foreach ($users as $user)
|
||||
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
|
||||
<td>
|
||||
@if (Auth::user()->id!=$user->id)
|
||||
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" checked="checked">
|
||||
@else
|
||||
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" disabled>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span{{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>{{ $user->present()->fullName() }} ({{ $user->username }})</span>
|
||||
|
||||
{{ (Auth::user()->id==$user->id ? ' (cannot delete yourself)' : '') }}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@foreach ($user->groups as $group)
|
||||
<a href=" {{ route('update/group', $group->id) }}" class="label label-default">
|
||||
{{ $group->name }}
|
||||
</a>
|
||||
@endforeach
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ number_format($user->assets->count()) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($user->accessories->count()) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($user->licenses->count()) }}
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="callout callout-warning">
|
||||
<p>{{ trans('feature_disabled') }}</p>
|
||||
</div>
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('button.submit') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1"></th>
|
||||
<th class="col-md-6">Name</th>
|
||||
<th class="col-md-5">Groups</th>
|
||||
<th class="col-md-5">Assets</th>
|
||||
<th class="col-md-5">Accessories</th>
|
||||
<th class="col-md-5">Licenses</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($users as $user)
|
||||
<tr {!! ($user->isSuperUser() ? ' class="danger"':'') !!}>
|
||||
<td>
|
||||
@if (Auth::id()!=$user->id)
|
||||
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" checked="checked">
|
||||
@else
|
||||
<input type="checkbox" name="edit_user[]" value="{{ $user->id }}" disabled>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<span {{ (Auth::user()->id==$user->id ? ' style="text-decoration: line-through"' : '') }}>
|
||||
{{ $user->present()->fullName() }} ({{ $user->username }})
|
||||
</span>
|
||||
{{ (Auth::id()==$user->id ? ' (cannot delete yourself)' : '') }}
|
||||
</td>
|
||||
<td>
|
||||
@foreach ($user->groups as $group)
|
||||
<a href=" {{ route('update/group', $group->id) }}" class="label label-default">
|
||||
{{ $group->name }}
|
||||
</a>
|
||||
@endforeach
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($user->assets()->count()) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($user->accessories()->count()) }}
|
||||
</td>
|
||||
<td>
|
||||
{{ number_format($user->licenses()->count()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" class="warning">
|
||||
{{ Form::select('status_id', $statuslabel_list , Input::old('status_id'), array('class'=>'select2', 'style'=>'width:250px')) }}
|
||||
<label>Update all assets for these users to this status</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6" class="warning">
|
||||
<label><input type="checkbox" name="edit_user['.e($user->id).']" checked> Check in all properties associated with these users</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div> <!--/table-responsive-->
|
||||
</div><!--/col-md-12-->
|
||||
</div> <!--/box-body-->
|
||||
<div class="box-footer text-right">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('button.submit') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<form class="form-horizontal" role="form" method="post" action="{{ route('users/bulksave') }}">
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -69,383 +69,370 @@
|
|||
</style>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<form class="form-horizontal" method="post" autocomplete="off" action="{{ ($user) ? route('users.update', ['user' => $user->id]) : route('users.store') }}" id="userForm">
|
||||
{{csrf_field()}}
|
||||
|
||||
@if($user->id)
|
||||
{{ method_field('PUT') }}
|
||||
@endif
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">Information</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">Permissions</a></li>
|
||||
</ul>
|
||||
|
||||
<form class="form-horizontal" method="post" autocomplete="off" action="{{ ($user) ? route('users.update', ['user' => $user->id]) : route('users.store') }}" id="userForm">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
@if($user->id)
|
||||
{{ method_field('PUT') }}
|
||||
@endif
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">Information</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">Permissions</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- First Name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="first_name">{{ trans('general.first_name') }}</label>
|
||||
<div class="col-md-8 {{ (\App\Helpers\Helper::checkIfRequired($user, 'first_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Last Name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="last_name">{{ trans('general.last_name') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'last_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- First Name -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="first_name">{{ trans('general.first_name') }}</label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'first_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ Input::old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<!-- Username -->
|
||||
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="username">{{ trans('admin/users/table.username') }}</label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'username')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="username"
|
||||
id="username"
|
||||
value="{{ Input::old('username', $user->username) }}"
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
@else
|
||||
(Managed via LDAP)
|
||||
@endif
|
||||
|
||||
<!-- Last Name -->
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="last_name">{{ trans('general.last_name') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'last_name')) ? ' required' : '' }}">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ Input::old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
{!! $errors->first('username', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Username -->
|
||||
<div class="form-group {{ $errors->has('username') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="username">{{ trans('admin/users/table.username') }}</label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'username')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="username"
|
||||
id="username"
|
||||
value="{{ Input::old('username', $user->username) }}"
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
@else
|
||||
(Managed via LDAP)
|
||||
@endif
|
||||
<!-- Password -->
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="password">
|
||||
{{ trans('admin/users/table.password') }}
|
||||
</label>
|
||||
<div class="col-md-5{{ (\App\Helpers\Helper::checkIfRequired($user, 'password')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
class="form-control"
|
||||
id="password"
|
||||
value=""
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@else
|
||||
(Managed via LDAP)
|
||||
@endif
|
||||
<span id="generated-password"></span>
|
||||
{!! $errors->first('password', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@if ($user->ldap_import!='1')
|
||||
<a href="#" class="left" id="genPassword">Generate</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $errors->first('username', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Password -->
|
||||
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="password">
|
||||
{{ trans('admin/users/table.password') }}
|
||||
</label>
|
||||
<div class="col-md-5{{ (\App\Helpers\Helper::checkIfRequired($user, 'password')) ? ' required' : '' }}">
|
||||
@if ($user->ldap_import!='1')
|
||||
<input
|
||||
type="password"
|
||||
name="password"
|
||||
class="form-control"
|
||||
id="password"
|
||||
value=""
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@else
|
||||
(Managed via LDAP)
|
||||
@endif
|
||||
<span id="generated-password"></span>
|
||||
{!! $errors->first('password', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@if ($user->ldap_import!='1')
|
||||
<a href="#" class="left" id="genPassword">Generate</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($user->ldap_import!='1')
|
||||
<!-- Password Confirm -->
|
||||
<div class="form-group {{ $errors->has('password_confirm') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="password_confirm">
|
||||
{{ trans('admin/users/table.password_confirm') }}
|
||||
</label>
|
||||
<div class="col-md-5 {{ ((\App\Helpers\Helper::checkIfRequired($user, 'first_name')) && (!$user->id)) ? ' required' : '' }}">
|
||||
<input
|
||||
type="password"
|
||||
name="password_confirm"
|
||||
id="password_confirm"
|
||||
class="form-control"
|
||||
value=""
|
||||
autocomplete="off"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('password_confirm', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Email -->
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="email">{{ trans('admin/users/table.email') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="email"
|
||||
id="email"
|
||||
value="{{ Input::old('email', $user->email) }}"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('email', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::canManageUsersCompanies())
|
||||
<!-- Company -->
|
||||
<div class="form-group {{ $errors->has('company_id') ? 'has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('company_id', trans('general.company')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $user->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- language -->
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-8">
|
||||
{!! Form::locales('locale', Input::old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Employee Number -->
|
||||
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="employee_num">{{ trans('admin/users/table.employee_num') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="employee_num"
|
||||
id="employee_num"
|
||||
value="{{ Input::old('employee_num', $user->employee_num) }}"
|
||||
/>
|
||||
{!! $errors->first('employee_num', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Jobtitle -->
|
||||
<div class="form-group {{ $errors->has('jobtitle') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="jobtitle">{{ trans('admin/users/table.title') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="jobtitle"
|
||||
id="jobtitle"
|
||||
value="{{ Input::old('jobtitle', $user->jobtitle) }}"
|
||||
/>
|
||||
{!! $errors->first('jobtitle', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Manager -->
|
||||
<div class="form-group {{ $errors->has('manager_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="manager_id">{{ trans('admin/users/table.manager') }}</label>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('manager_id', $manager_list , Input::old('manager_id', $user->manager_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('manager_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="location_id">{{ trans('admin/users/table.location') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $user->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="phone">{{ trans('admin/users/table.phone') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input class="form-control" type="text" name="phone" id="phone" value="{{ Input::old('phone', $user->phone) }}" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Activation Status -->
|
||||
<div class="form-group {{ $errors->has('activated') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="activated">{{ trans('admin/users/table.activated') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="controls">
|
||||
<select
|
||||
{{ ($user->id === Auth::user()->id ? ' disabled="disabled"' : '') }}
|
||||
name="activated"
|
||||
id="activated"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if ($user->id)
|
||||
<option value="1"{{ ($user->isActivated() ? ' selected="selected"' : '') }}>{{ trans('general.yes') }}</option>
|
||||
<option value="0"{{ ( ! $user->isActivated() ? ' selected="selected"' : '') }}>{{ trans('general.no') }}</option>
|
||||
@else
|
||||
<option value="1"{{ (Input::old('activated') == 1 ? ' selected="selected"' : '') }}>{{ trans('general.yes') }}</option>
|
||||
<option value="0">{{ trans('general.no') }}</option>
|
||||
@endif
|
||||
|
||||
</select>
|
||||
{!! $errors->first('activated', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($snipeSettings->two_factor_enabled!='')
|
||||
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('two_factor_optin', trans('admin/settings/general.two_factor')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),array('class' => 'minimal')) }}
|
||||
{{ trans('admin/settings/general.two_factor_enabled_text') }}
|
||||
|
||||
<p class="help-block">{{ trans('admin/users/general.two_factor_admin_optin_help') }}</p>
|
||||
</div>
|
||||
@if ($user->ldap_import!='1')
|
||||
<!-- Password Confirm -->
|
||||
<div class="form-group {{ $errors->has('password_confirm') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="password_confirm">
|
||||
{{ trans('admin/users/table.password_confirm') }}
|
||||
</label>
|
||||
<div class="col-md-5 {{ ((\App\Helpers\Helper::checkIfRequired($user, 'first_name')) && (!$user->id)) ? ' required' : '' }}">
|
||||
<input
|
||||
type="password"
|
||||
name="password_confirm"
|
||||
id="password_confirm"
|
||||
class="form-control"
|
||||
value=""
|
||||
autocomplete="off"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('password_confirm', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Email -->
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="email">{{ trans('admin/users/table.email') }} </label>
|
||||
<div class="col-md-8{{ (\App\Helpers\Helper::checkIfRequired($user, 'email')) ? ' required' : '' }}">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="email"
|
||||
id="email"
|
||||
value="{{ Input::old('email', $user->email) }}"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
autocomplete="off"
|
||||
readonly
|
||||
onfocus="this.removeAttribute('readonly');"
|
||||
>
|
||||
@if (config('app.lock_passwords') && ($user->id))
|
||||
<p class="help-block">{{ trans('admin/users/table.lock_passwords') }}</p>
|
||||
@endif
|
||||
{!! $errors->first('email', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Company -->
|
||||
@if (\App\Models\Company::canManageUsersCompanies())
|
||||
<!-- Company -->
|
||||
<div class="form-group {{ $errors->has('company_id') ? 'has-error' : '' }}">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('company_id', trans('general.company')) }}
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('company_id', $company_list , Input::old('company_id', $user->company_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('company_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- language -->
|
||||
<div class="form-group {{ $errors->has('locale') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="locale">{{ trans('general.language') }}</label>
|
||||
<div class="col-md-8">
|
||||
{!! Form::locales('locale', Input::old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Employee Number -->
|
||||
<div class="form-group {{ $errors->has('employee_num') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="employee_num">{{ trans('admin/users/table.employee_num') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="employee_num"
|
||||
id="employee_num"
|
||||
value="{{ Input::old('employee_num', $user->employee_num) }}"
|
||||
/>
|
||||
{!! $errors->first('employee_num', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Reset Two Factor -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
||||
<span id="two_factor_reseticon">
|
||||
</span>
|
||||
<span id="two_factor_resetresult">
|
||||
</span>
|
||||
<span id="two_factor_resetstatus">
|
||||
</span>
|
||||
<!-- Jobtitle -->
|
||||
<div class="form-group {{ $errors->has('jobtitle') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="jobtitle">{{ trans('admin/users/table.title') }}</label>
|
||||
<div class="col-md-8">
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
name="jobtitle"
|
||||
id="jobtitle"
|
||||
value="{{ Input::old('jobtitle', $user->jobtitle) }}"
|
||||
/>
|
||||
{!! $errors->first('jobtitle', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_reset_help') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Manager -->
|
||||
<div class="form-group {{ $errors->has('manager_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="manager_id">{{ trans('admin/users/table.manager') }}</label>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('manager_id', $manager_list , Input::old('manager_id', $user->manager_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('manager_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Location -->
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="location_id">{{ trans('admin/users/table.location') }}
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id', $user->location_id), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{!! $errors->first('location_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Phone -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="phone">{{ trans('admin/users/table.phone') }}</label>
|
||||
<div class="col-md-4">
|
||||
<input class="form-control" type="text" name="phone" id="phone" value="{{ Input::old('phone', $user->phone) }}" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Activation Status -->
|
||||
<div class="form-group {{ $errors->has('activated') ? 'has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="activated">{{ trans('admin/users/table.activated') }}</label>
|
||||
<div class="col-md-8">
|
||||
<div class="controls">
|
||||
<select
|
||||
{{ ($user->id === Auth::user()->id ? ' disabled="disabled"' : '') }}
|
||||
name="activated"
|
||||
id="activated"
|
||||
{{ ((config('app.lock_passwords') && ($user->id)) ? ' disabled' : '') }}
|
||||
>
|
||||
@if ($user->id)
|
||||
<option value="1"{{ ($user->isActivated() ? ' selected="selected"' : '') }}>{{ trans('general.yes') }}</option>
|
||||
<option value="0"{{ ( ! $user->isActivated() ? ' selected="selected"' : '') }}>{{ trans('general.no') }}</option>
|
||||
@else
|
||||
<option value="1"{{ (Input::old('activated') == 1 ? ' selected="selected"' : '') }}>{{ trans('general.yes') }}</option>
|
||||
<option value="0">{{ trans('general.no') }}</option>
|
||||
@endif
|
||||
</select>
|
||||
{!! $errors->first('activated', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
@if ($snipeSettings->two_factor_enabled!='')
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group">
|
||||
<div class="col-md-3 control-label">
|
||||
{{ Form::label('two_factor_optin', trans('admin/settings/general.two_factor')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::checkbox('two_factor_optin', '1', Input::old('two_factor_optin', $user->two_factor_optin),array('class' => 'minimal')) }}
|
||||
{{ trans('admin/settings/general.two_factor_enabled_text') }}
|
||||
|
||||
<!-- Notes -->
|
||||
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/users/table.notes') }}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="form-control" id="notes" name="notes">{{ Input::old('notes', $user->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">{{ trans('admin/users/general.two_factor_admin_optin_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Groups -->
|
||||
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="groups"> {{ trans('general.groups') }}</label>
|
||||
<div class="col-md-5">
|
||||
<!-- Reset Two Factor -->
|
||||
<div class="form-group">
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<a class="btn btn-default btn-sm pull-left" id="two_factor_reset" style="margin-right: 10px;"> {{ trans('admin/settings/general.two_factor_reset') }}</a>
|
||||
<span id="two_factor_reseticon">
|
||||
</span>
|
||||
<span id="two_factor_resetresult">
|
||||
</span>
|
||||
<span id="two_factor_resetstatus">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3 two_factor_resetrow">
|
||||
<p class="help-block">{{ trans('admin/settings/general.two_factor_reset_help') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
<!-- Notes -->
|
||||
<div class="form-group{!! $errors->has('notes') ? ' has-error' : '' !!}">
|
||||
<label for="notes" class="col-md-3 control-label">{{ trans('admin/users/table.notes') }}</label>
|
||||
<div class="col-md-8">
|
||||
<textarea class="form-control" id="notes" name="notes">{{ Input::old('notes', $user->notes) }}</textarea>
|
||||
{!! $errors->first('notes', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (count($userGroups->keys()) > 0)
|
||||
<!-- Groups -->
|
||||
<div class="form-group{{ $errors->has('groups') ? ' has-error' : '' }}">
|
||||
<label class="col-md-3 control-label" for="groups"> {{ trans('general.groups') }}</label>
|
||||
<div class="col-md-5">
|
||||
@if ((Config::get('app.lock_passwords') || (!Auth::user()->isSuperUser())))
|
||||
@if (count($userGroups->keys()) > 0)
|
||||
<ul>
|
||||
@foreach ($groups as $id => $group)
|
||||
{!! ($userGroups->keys()->contains($id) ? '<li>'.e($group).'</li>' : '') !!}
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
<span class="help-block">Only superadmins may edit group memberships.</p>
|
||||
@else
|
||||
<div class="controls">
|
||||
@endif
|
||||
<span class="help-block">Only superadmins may edit group memberships.</p>
|
||||
@else
|
||||
<div class="controls">
|
||||
<select
|
||||
name="groups[]"
|
||||
id="groups[]"
|
||||
multiple="multiple"
|
||||
class="form-control">
|
||||
|
||||
@foreach ($groups as $id => $group)
|
||||
<option value="{{ $id }}"
|
||||
{{ ($userGroups->keys()->contains($id) ? ' selected="selected"' : '') }}>
|
||||
{{ $group }}
|
||||
</option>
|
||||
@endforeach
|
||||
name="groups[]"
|
||||
id="groups[]"
|
||||
multiple="multiple"
|
||||
class="form-control"
|
||||
>
|
||||
@foreach ($groups as $id => $group)
|
||||
<option value="{{ $id }}" {{ ($userGroups->keys()->contains($id) ? ' selected="selected"' : '') }}>
|
||||
{{ $group }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
<span class="help-block">
|
||||
{{ trans('admin/users/table.groupnotes') }}
|
||||
</span>
|
||||
</div> <!--/controls-->
|
||||
@endif
|
||||
</div> <!--/col-md-5-->
|
||||
</div>
|
||||
|
||||
<!-- Email user -->
|
||||
@if (!$user->id)
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3">
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label for="email_user">
|
||||
{{ Form::checkbox('email_user', '1', Input::old('email_user'), array('id'=>'email_user','disabled'=>'disabled')) }}
|
||||
Email this user their credentials? <span class="help-text" id="email_user_warn">(Cannot send email. No user email address specified.)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/form-group-->
|
||||
@endif
|
||||
|
||||
</div> <!--/col-md-12-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Email user -->
|
||||
@if (!$user->id)
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-3">
|
||||
<div class="tab-pane" id="tab_2">
|
||||
<div class="col-md-12">
|
||||
@if (!Auth::user()->isSuperUser())
|
||||
<p class="alert alert-warning">Only superadmins may grant a user superadmin access.</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<div class="checkbox">
|
||||
<label for="email_user">
|
||||
{{ Form::checkbox('email_user', '1', Input::old('email_user'), array('id'=>'email_user','disabled'=>'disabled')) }}
|
||||
|
||||
Email this user their credentials? <span class="help-text" id="email_user_warn">(Cannot send email. No user email address specified.)</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<table class="table table-striped permissions">
|
||||
<thead>
|
||||
<tr class="permissions-row">
|
||||
<th class="col-md-5"><span class="line"></span>Permission</th>
|
||||
<th class="col-md-1"><span class="line"></span>Grant</th>
|
||||
<th class="col-md-1"><span class="line"></span>Deny</th>
|
||||
<th class="col-md-1"><span class="line"></span>Inherit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<div class="tab-pane" id="tab_2">
|
||||
<div class="col-md-12">
|
||||
@if (!Auth::user()->isSuperUser())
|
||||
<p class="alert alert-warning">Only superadmins may grant a user superadmin access.</p>
|
||||
@endif
|
||||
</div>
|
||||
<table class="table table-striped permissions">
|
||||
<thead>
|
||||
<tr class="permissions-row">
|
||||
<th class="col-md-5"><span class="line"></span>Permission</th>
|
||||
<th class="col-md-1"><span class="line"></span>Grant</th>
|
||||
<th class="col-md-1"><span class="line"></span>Deny</th>
|
||||
<th class="col-md-1"><span class="line"></span>Inherit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach ($permissions as $area => $permissionsArray)
|
||||
@if (count($permissionsArray) == 1)
|
||||
@foreach ($permissions as $area => $permissionsArray)
|
||||
@if (count($permissionsArray) == 1)
|
||||
<tbody class="permissions-group">
|
||||
<?php $localPermission = $permissionsArray[0] ?>
|
||||
<?php $localPermission = $permissionsArray[0]; ?>
|
||||
<tr class="header-row permissions-row">
|
||||
<td class="col-md-5 tooltip-base permissions-item"
|
||||
data-toggle="tooltip"
|
||||
|
@ -454,38 +441,37 @@
|
|||
>
|
||||
<h4>{{ $area . ': ' . $localPermission['label'] }}</h4>
|
||||
</td>
|
||||
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled"]) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant"]) }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled"]) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny"]) }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled"] ) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit"] ) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@else
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['disabled'=>"disabled"]) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '1',$userPermissions[$localPermission['permission'] ] == '1',['value'=>"grant"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['disabled'=>"disabled"]) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']', '-1',$userPermissions[$localPermission['permission'] ] == '-1',['value'=>"deny"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($localPermission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['disabled'=>"disabled"] ) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$localPermission['permission'].']','0',$userPermissions[$localPermission['permission'] ] == '0',['value'=>"inherit"] ) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@else
|
||||
<tbody class="permissions-group">
|
||||
<tr class="header-row permissions-row">
|
||||
<td class="col-md-5 header-name">
|
||||
<h3>{{ $area }}</h3>
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
<tr class="header-row permissions-row">
|
||||
<td class="col-md-5 header-name">
|
||||
<h3>{{ $area }}</h3>
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
{{ Form::radio("$area", '1',false,['value'=>"grant"]) }}
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
|
@ -495,57 +481,57 @@
|
|||
{{ Form::radio("$area", '0',false,['value'=>"inherit"] ) }}
|
||||
</td>
|
||||
</tr>
|
||||
@foreach ($permissionsArray as $index => $permission)
|
||||
<tr class="permissions-row">
|
||||
@if ($permission['display'])
|
||||
<td
|
||||
class="col-md-5 tooltip-base permissions-item"
|
||||
data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="{{ $permission['note'] }}"
|
||||
>
|
||||
{{ $permission['label'] }}
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled']) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled']) }}
|
||||
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled']) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit"]) }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($permissionsArray as $index => $permission)
|
||||
<tr class="permissions-row">
|
||||
@if ($permission['display'])
|
||||
<td
|
||||
class="col-md-5 tooltip-base permissions-item"
|
||||
data-toggle="tooltip"
|
||||
data-placement="right"
|
||||
title="{{ $permission['note'] }}"
|
||||
>
|
||||
{{ $permission['label'] }}
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[$permission['permission'] ] == '1', ["value"=>"grant", 'disabled'=>'disabled']) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '1', $userPermissions[ $permission['permission'] ] == '1', ["value"=>"grant"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny", 'disabled'=>'disabled']) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '-1', $userPermissions[$permission['permission'] ] == '-1', ["value"=>"deny"]) }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="col-md-1 permissions-item">
|
||||
@if (($permission['permission'] == 'superuser') && (!Auth::user()->isSuperUser()))
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit", 'disabled'=>'disabled']) }}
|
||||
@else
|
||||
{{ Form::radio('permission['.$permission['permission'].']', '0', $userPermissions[$permission['permission']] =='0', ["value"=>"inherit"]) }}
|
||||
@endif
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endif
|
||||
@endforeach
|
||||
</table>
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</table>
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-success"><i class="fa fa-check icon-white"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</form>
|
||||
</div> <!--/col-md-8-->
|
||||
</div><!--/row-->
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
|
|
@ -15,93 +15,77 @@ Create a User
|
|||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<form class="form-horizontal" role="form" method="post" enctype="multipart/form-data" action="">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
@if (Session::get('message'))
|
||||
<p class="alert-danger">
|
||||
You have an error in your CSV file:<br />
|
||||
{{ Session::get('message') }}
|
||||
</p>
|
||||
@endif
|
||||
@if (Session::get('message'))
|
||||
<p class="alert-danger">
|
||||
You have an error in your CSV file:<br />
|
||||
{{ Session::get('message') }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<p>
|
||||
Upload a CSV file with one or more users. Passwords will be auto-generated. The CSV should have the <strong>first</strong> fields as: </p>
|
||||
<p>
|
||||
Upload a CSV file with one or more users. Passwords will be auto-generated. The CSV should have the <strong>first</strong> fields as:
|
||||
</p>
|
||||
|
||||
<p><strong>firstName,lastName, username, email, location_id, phone, jobtitle, employee_num, company_id</strong>. </p>
|
||||
<p>
|
||||
<strong>firstName,lastName, username, email, location_id, phone, jobtitle, employee_num, company_id</strong>.
|
||||
</p>
|
||||
|
||||
<p>Any additional fields to the right of those fields will be ignored. Email is optional, however users will not be able to recover their passwords or receive EULAs if you do not provide an email address. If you wish to include a company association, you must reference the ID number of an existing company - companies will not be created on the fly.
|
||||
</p>
|
||||
<p>
|
||||
Any additional fields to the right of those fields will be ignored. Email is optional, however users will not be able to recover their passwords or receive EULAs if you do not provide an email address. If you wish to include a company association, you must reference the ID number of an existing company - companies will not be created on the fly.
|
||||
</p>
|
||||
|
||||
@if (config('app.lock_passwords'))
|
||||
<p>Note: Email notification for users is disabled for this installation.</p>
|
||||
@endif
|
||||
@if (config('app.lock_passwords'))
|
||||
<p>Note: Email notification for users is disabled for this installation.</p>
|
||||
@endif
|
||||
|
||||
<div class="form-group {!! $errors->first('user_import_csv', 'has-error') }}">
|
||||
<label for="first_name" class="col-sm-3 control-label">{{ trans('admin/users/general.usercsv') }}</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="file" name="user_import_csv" id="user_import_csv">
|
||||
</div>
|
||||
<div class="form-group {!! $errors->first('user_import_csv', 'has-error') }}">
|
||||
<label for="first_name" class="col-sm-3 control-label">{{ trans('admin/users/general.usercsv') }}</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="file" name="user_import_csv" id="user_import_csv">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Has Headers -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('has_headers', '1', Input::old('has_headers')) }} This CSV has a header row
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Email user -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('email_user', '1', Input::old('email_user')) }} Email these users their credentials? (Only possible where email address is included with user data.)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Activate -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('activate', '1', Input::old('activate')) }} Activate user?
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--/box-body-->
|
||||
<!-- Form Actions -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-default">{{ trans('button.submit') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Has Headers -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('has_headers', '1', Input::old('has_headers')) }} This CSV has a header row
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Email user -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('email_user', '1', Input::old('email_user')) }} Email these users their credentials? (Only possible where email address is included with user data.)
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Activate -->
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2 ">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::checkbox('activate', '1', Input::old('activate')) }} Activate user?
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Form Actions -->
|
||||
<div class="box-footer text-right">
|
||||
<button type="submit" class="btn btn-default">{{ trans('button.submit') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div></div></div></div>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#generate-password').pGenerator({
|
||||
'bind': 'click',
|
||||
'passwordElement': '#password',
|
||||
'displayElement': '#password-display',
|
||||
'passwordLength': 10,
|
||||
'uppercase': true,
|
||||
'lowercase': true,
|
||||
'numbers': true,
|
||||
'specialChars': false,
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
||||
|
|
|
@ -10,28 +10,26 @@
|
|||
@endif
|
||||
{{ trans('general.users') }}
|
||||
|
||||
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('header_right')
|
||||
@can('create', \App\Models\User::class)
|
||||
@if ($snipeSettings->ldap_enabled == 1)
|
||||
<a href="{{ route('ldap/user') }}" class="btn btn-default pull-right"><span class="fa fa-upload"></span> LDAP</a>
|
||||
@endif
|
||||
<a href="{{ route('import/user') }}" class="btn btn-default pull-right" style="margin-right: 5px;"><span class="fa fa-upload"></span> {{ trans('general.import') }}</a>
|
||||
<a href="{{ route('users.create') }}" class="btn btn-primary pull-right" style="margin-right: 5px;"> {{ trans('general.create') }}</a>
|
||||
@if ($snipeSettings->ldap_enabled == 1)
|
||||
<a href="{{ route('ldap/user') }}" class="btn btn-default pull-right"><span class="fa fa-upload"></span> LDAP</a>
|
||||
@endif
|
||||
<a href="{{ route('import/user') }}" class="btn btn-default pull-right" style="margin-right: 5px;"><span class="fa fa-upload"></span> {{ trans('general.import') }}</a>
|
||||
<a href="{{ route('users.create') }}" class="btn btn-primary pull-right" style="margin-right: 5px;"> {{ trans('general.create') }}</a>
|
||||
@endcan
|
||||
|
||||
@if (Input::get('status')=='deleted')
|
||||
<a class="btn btn-default pull-right" href="{{ route('users.index') }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_current') }}</a>
|
||||
@else
|
||||
<a class="btn btn-default pull-right" href="{{ route('users.index', ['status' => 'deleted']) }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_deleted') }}</a>
|
||||
@endif
|
||||
@if (Input::get('status')=='deleted')
|
||||
<a class="btn btn-default pull-right" href="{{ route('users.index') }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_current') }}</a>
|
||||
@else
|
||||
<a class="btn btn-default pull-right" href="{{ route('users.index', ['status' => 'deleted']) }}" style="margin-right: 5px;">{{ trans('admin/users/table.show_deleted') }}</a>
|
||||
@endif
|
||||
@can('view', \App\Models\User::class)
|
||||
<a class="btn btn-default pull-right" href="{{ route('users.export') }}" style="margin-right: 5px;">Export</a>
|
||||
@endcan
|
||||
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
|
@ -39,28 +37,24 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
|
||||
{{ Form::open([
|
||||
'method' => 'POST',
|
||||
'route' => ['users/bulkedit'],
|
||||
'class' => 'form-inline' ]) }}
|
||||
|
||||
@if (Input::get('status')!='deleted')
|
||||
@can('delete', \App\Models\User::class)
|
||||
<div id="toolbar">
|
||||
<select name="bulk_actions" class="form-control select2" style="width: 200px;">
|
||||
<option value="delete">Bulk Checkin & Delete</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</div>
|
||||
@endcan
|
||||
@can('delete', \App\Models\User::class)
|
||||
<div id="toolbar">
|
||||
<select name="bulk_actions" class="form-control select2" style="width: 200px;">
|
||||
<option value="delete">Bulk Checkin & Delete</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</div>
|
||||
@endcan
|
||||
@endif
|
||||
|
||||
|
||||
<table
|
||||
name="users"
|
||||
data-toolbar="#toolbar"
|
||||
|
@ -71,71 +65,59 @@
|
|||
data-cookie="true"
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="userTableDisplay-{{ config('version.hash_version') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-class="hidden-xs hidden-sm" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox">
|
||||
@if (Input::get('status')!='deleted')
|
||||
<div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;" style="hidden-xs hidden-sm"></div>
|
||||
@endif
|
||||
</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-sortable="false" data-field="companyName" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="employee_num" data-visible="false">{{ trans('admin/users/table.employee_num') }}</th>
|
||||
<th data-sortable="true" data-field="name">{{ trans('admin/users/table.name') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="jobtitle" data-visible="false">{{ trans('admin/users/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="email">
|
||||
<span class="hidden-md hidden-lg">{{ trans('admin/users/table.email') }}</span>
|
||||
<span class="hidden-xs"><i class="fa fa-envelope fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="true" data-field="username">{{ trans('admin/users/table.username') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="manager">{{ trans('admin/users/table.manager') }}</th>
|
||||
<th data-sortable="true" data-field="location">{{ trans('admin/users/table.location') }}</th>
|
||||
<th data-sortable="false" data-field="assets">
|
||||
<span class="hidden-md hidden-lg">Assets</span>
|
||||
<span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="licenses">
|
||||
<span class="hidden-md hidden-lg">Licenses</span>
|
||||
<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="accessories">
|
||||
<span class="hidden-md hidden-lg">Accessories</span>
|
||||
<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="consumables">
|
||||
<span class="hidden-md hidden-lg">Consumables</span>
|
||||
<span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="groups">{{ trans('general.groups') }}</th>
|
||||
<th data-sortable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
||||
<th data-sortable="true" data-field="two_factor_enrolled" data-visible="false">{{ trans('admin/users/general.two_factor_enrolled') }}</th>
|
||||
<th data-sortable="true" data-field="two_factor_optin" data-visible="false">{{ trans('admin/users/general.two_factor_active') }}</th>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-class="hidden-xs hidden-sm" data-switchable="false" data-searchable="false" data-sortable="false" data-field="checkbox">
|
||||
@if (Input::get('status')!='deleted')
|
||||
<div class="text-center"><input type="checkbox" id="checkAll" style="padding-left: 0px;" style="hidden-xs hidden-sm"></div>
|
||||
@endif
|
||||
</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-switchable="true" data-sortable="false" data-field="companyName" data-visible="false">{{ trans('admin/companies/table.title') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="employee_num" data-visible="false">{{ trans('admin/users/table.employee_num') }}</th>
|
||||
<th data-sortable="true" data-field="name">{{ trans('admin/users/table.name') }}</th>
|
||||
<th data-switchable="true" data-sortable="true" data-field="jobtitle" data-visible="false">{{ trans('admin/users/table.title') }}</th>
|
||||
<th data-sortable="true" data-field="email">
|
||||
<span class="hidden-md hidden-lg">{{ trans('admin/users/table.email') }}</span>
|
||||
<span class="hidden-xs"><i class="fa fa-envelope fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="true" data-field="username">{{ trans('admin/users/table.username') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="manager">{{ trans('admin/users/table.manager') }}</th>
|
||||
<th data-sortable="true" data-field="location">{{ trans('admin/users/table.location') }}</th>
|
||||
<th data-sortable="false" data-field="assets">
|
||||
<span class="hidden-md hidden-lg">Assets</span>
|
||||
<span class="hidden-xs"><i class="fa fa-barcode fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="licenses">
|
||||
<span class="hidden-md hidden-lg">Licenses</span>
|
||||
<span class="hidden-xs"><i class="fa fa-floppy-o fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="accessories">
|
||||
<span class="hidden-md hidden-lg">Accessories</span>
|
||||
<span class="hidden-xs"><i class="fa fa-keyboard-o fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="consumables">
|
||||
<span class="hidden-md hidden-lg">Consumables</span>
|
||||
<span class="hidden-xs"><i class="fa fa-tint fa-lg"></i></span>
|
||||
</th>
|
||||
<th data-sortable="false" data-field="groups">{{ trans('general.groups') }}</th>
|
||||
<th data-sortable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
||||
<th data-sortable="true" data-field="two_factor_enrolled" data-visible="false">{{ trans('admin/users/general.two_factor_enrolled') }}</th>
|
||||
<th data-sortable="true" data-field="two_factor_optin" data-visible="false">{{ trans('admin/users/general.two_factor_active') }}</th>
|
||||
|
||||
<th data-sortable="true" data-field="activated">{{ trans('general.activated') }}</th>
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{{-- <tfoot>
|
||||
<tr>
|
||||
<td colspan="12">
|
||||
<select name="bulk_actions" class="form-control">
|
||||
<option value="delete">Bulk Delete</option>
|
||||
</select>
|
||||
<button class="btn btn-default" id="bulkEdit" disabled>Go</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot> --}}
|
||||
<th data-sortable="true" data-field="activated">{{ trans('general.activated') }}</th>
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', ['exportFile' => 'users-export', 'search' => true])
|
||||
|
|
|
@ -17,39 +17,31 @@ LDAP User Sync
|
|||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
|
||||
|
||||
@if ($snipeSettings->ldap_enabled == 0)
|
||||
{{ trans('admin/users/message.ldap_not_configured') }}
|
||||
@else
|
||||
|
||||
|
||||
<div class="col-md-9">
|
||||
@if ($snipeSettings->ldap_enabled == 0)
|
||||
{{ trans('admin/users/message.ldap_not_configured') }}
|
||||
@else
|
||||
<form class="form-horizontal" role="form" method="post" action="" id="ldap-form">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-2 control-label" for="location_id">{{ trans('admin/users/table.location') }}
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
{{csrf_field()}}
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<!-- location_id-->
|
||||
<div class="form-group {{ $errors->has('location_id') ? 'has-error' : '' }}">
|
||||
<label class="col-md-2 control-label" for="location_id">{{ trans('admin/users/table.location') }}
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
{{ Form::select('location_id', $location_list , Input::old('location_id'), array('class'=>'select2', 'style'=>'width:350px')) }}
|
||||
|
||||
{!! $errors->first('location_id', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button type="submit" class="btn btn-warning" id="sync">
|
||||
<i id="sync-button-icon" class="fa fa-refresh icon-white"></i> <span id="sync-button-text">Synchronize</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button type="submit" class="btn btn-warning" id="sync">
|
||||
<i id="sync-button-icon" class="fa fa-refresh icon-white"></i> <span id="sync-button-text">Synchronize</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
@ -58,53 +50,48 @@ LDAP User Sync
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="col-md-12">
|
||||
@if (Session::get('summary'))
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Synchronization Results</h3>
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<th>Username</th><th>Employee Number</th>
|
||||
<th>First Name</th><th>Last Name</th>
|
||||
<th>Email</th><th>Notes</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Username</th><th>Employee Number</th>
|
||||
<th>First Name</th><th>Last Name</th>
|
||||
<th>Email</th><th>Notes</th>
|
||||
</tr>
|
||||
|
||||
@foreach (Session::get('summary') as $entry)
|
||||
<tr {!! ($entry['status']=='success') ? 'class="success"' : 'class="danger"' !!}>
|
||||
<td>{{ $entry['username'] }}</td>
|
||||
<td>{{ $entry['employee_number'] }}</td>
|
||||
<td>{{ $entry['firstname'] }}</td>
|
||||
<td>{{ $entry['lastname'] }}</td>
|
||||
<td>{{ $entry['email'] }}</td>
|
||||
<td>
|
||||
@if ($entry['status']=='success')
|
||||
<i class="fa fa-check"></i> {!! $entry['note'] !!}
|
||||
@else
|
||||
<span class="alert-msg">{!! $entry['note'] !!}</span>
|
||||
@endif
|
||||
@foreach (Session::get('summary') as $entry)
|
||||
<tr {!! ($entry['status']=='success') ? 'class="success"' : 'class="danger"' !!}>
|
||||
<td>{{ $entry['username'] }}</td>
|
||||
<td>{{ $entry['employee_number'] }}</td>
|
||||
<td>{{ $entry['firstname'] }}</td>
|
||||
<td>{{ $entry['lastname'] }}</td>
|
||||
<td>{{ $entry['email'] }}</td>
|
||||
<td>
|
||||
@if ($entry['status']=='success')
|
||||
<i class="fa fa-check"></i> {!! $entry['note'] !!}
|
||||
@else
|
||||
<span class="alert-msg">{!! $entry['note'] !!}</span>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -119,4 +106,3 @@ LDAP User Sync
|
|||
</script>
|
||||
|
||||
@stop
|
||||
@stop
|
||||
|
|
|
@ -10,367 +10,406 @@
|
|||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
|
||||
<li class="active">
|
||||
<a href="#info_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">Info</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#info_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-info-circle"></i></span> <span class="hidden-xs hidden-sm">Info</span></a></li>
|
||||
<li><a href="#asset_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-barcode"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.assets') }}</span></a></li>
|
||||
<li><a href="#licenses_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-floppy-o"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}</span></a></li>
|
||||
<li><a href="#accessories_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-keyboard-o"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}</span></a></li>
|
||||
<li><a href="#consumables_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-tint"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}</span></a></li>
|
||||
<li><a href="#files_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-paperclip"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}</span></a></li>
|
||||
<li><a href="#history_tab" data-toggle="tab"><span class="hidden-lg hidden-md"><i class="fa fa-clock-o"></i></span> <span class="hidden-xs hidden-sm">{{ trans('general.history') }}</span></a></li>
|
||||
<li>
|
||||
<a href="#asset_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-barcode"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@can('update', $user)
|
||||
<li class="dropdown pull-right">
|
||||
<li>
|
||||
<a href="#licenses_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-floppy-o"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-gear"></i> {{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('users.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/user', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
||||
@if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords')) && ($user->deleted_at==''))
|
||||
<li><a href="{{ route('users.destroy', $user->id) }}">{{ trans('button.delete') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="info_tab">
|
||||
<div class="row">
|
||||
@if ($user->deleted_at!='')
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-warning">
|
||||
<i class="icon fa fa-warning"></i>
|
||||
This user has been marked as deleted.
|
||||
@can('update', $user)
|
||||
<a href="{{ route('restore/user', $user->id) }}">Click here</a> to restore them.
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-1">
|
||||
<li>
|
||||
<a href="#accessories_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
</span> <span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#consumables_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-tint"></i></span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#files_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-paperclip"></i></span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#history_tab" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fa fa-clock-o"></i></span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.history') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@can('update', $user)
|
||||
<li class="dropdown pull-right">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<i class="fa fa-gear"></i> {{ trans('button.actions') }}
|
||||
<span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="{{ route('users.edit', $user->id) }}">{{ trans('admin/users/general.edit') }}</a></li>
|
||||
<li><a href="{{ route('clone/user', $user->id) }}">{{ trans('admin/users/general.clone') }}</a></li>
|
||||
@if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords')) && ($user->deleted_at==''))
|
||||
<li><a href="{{ route('users.destroy', $user->id) }}">{{ trans('button.delete') }}</a></li>
|
||||
@endif
|
||||
</ul>
|
||||
</li>
|
||||
@endcan
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="info_tab">
|
||||
<div class="row">
|
||||
@if ($user->deleted_at!='')
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-warning">
|
||||
<i class="icon fa fa-warning"></i>
|
||||
This user has been marked as deleted.
|
||||
@can('update', $user)
|
||||
<a href="{{ route('restore/user', $user->id) }}">Click here</a> to restore them.
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="col-md-1">
|
||||
@if ($user->avatar)
|
||||
<img src="/uploads/avatars/{{ $user->avatar }}" class="avatar img-thumbnail hidden-print">
|
||||
@else
|
||||
<img src="{{ $user->present()->gravatar() }}" class="avatar img-circle hidden-print">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="col-md-8">
|
||||
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped">
|
||||
@if (!is_null($user->company))
|
||||
<tr>
|
||||
<td>Company</td>
|
||||
<td>{{ $user->company->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<div class="table table-responsive">
|
||||
<table class="table table-striped">
|
||||
@if (!is_null($user->company))
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ $user->present()->fullName() }}</td>
|
||||
<td>Company</td>
|
||||
<td>{{ $user->company->name }}</td>
|
||||
</tr>
|
||||
@if ($user->jobtitle)
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>{{ $user->jobtitle }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($user->employee_num)
|
||||
<tr>
|
||||
<td>Employee No.</td>
|
||||
<td>{{ $user->employee_num }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>{{ $user->present()->fullName() }}</td>
|
||||
</tr>
|
||||
@if ($user->jobtitle)
|
||||
<tr>
|
||||
<td>Title</td>
|
||||
<td>{{ $user->jobtitle }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($user->manager)
|
||||
<tr>
|
||||
<td>Manager</td>
|
||||
<td><a href="{{ route('users.show', $user->manager->id) }}">{{ $user->manager->present()->fullName() }}</a></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->employee_num)
|
||||
<tr>
|
||||
<td>Employee No.</td>
|
||||
<td>{{ $user->employee_num }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($user->email)
|
||||
<tr>
|
||||
<td>Email</td>
|
||||
<td><a href="mailto:{{ $user->email }}">{{ $user->email }}</a></td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->manager)
|
||||
<tr>
|
||||
<td>Manager</td>
|
||||
<td>{{$user->manager->present()->nameUrl() }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($user->phone)
|
||||
<tr>
|
||||
<td>Phone</td>
|
||||
<td>{{ $user->phone }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->email)
|
||||
<tr>
|
||||
<td>Email</td>
|
||||
<td><a href="mailto:{{ $user->email }}">{{ $user->email }}</a></td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
@if ($user->userloc)
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>{{ $user->userloc->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->created_at)
|
||||
<tr>
|
||||
<td>{{ trans('general.created_at') }}</td>
|
||||
<td>
|
||||
{{ $user->created_at->format('F j, Y h:iA') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->phone)
|
||||
<tr>
|
||||
<td>Phone</td>
|
||||
<td>{{ $user->phone }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</table>
|
||||
</div>
|
||||
@if ($user->userloc)
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>{{ $user->userloc->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if ($user->created_at)
|
||||
<tr>
|
||||
<td>{{ trans('general.created_at') }}</td>
|
||||
<td>{{ $user->created_at->format('F j, Y h:iA') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div> <!--/col-md-8-->
|
||||
|
||||
<!-- Start button column -->
|
||||
<div class="col-md-2">
|
||||
@can('update', $user)
|
||||
<div class="col-md-12">
|
||||
|
||||
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default">{{ trans('admin/users/general.edit') }}</a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default">{{ trans('admin/users/general.clone') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
@if ((Auth::user()->id !== $user->id) && (!config('app.lock_passwords')))
|
||||
|
||||
@if ($user->deleted_at=='')
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('users.destroy', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-warning">{{ trans('button.delete') }}</a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<form action="{{ route('users/bulkedit') }}" method="POST">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="edit_user[{{ $user->id }}]" value="{{ $user->id }}" />
|
||||
<button style="width: 100%;" class="btn btn-sm btn-danger">{{ trans('button.checkin_and_delete') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('restore/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-warning">{{ trans('button.restore') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Start button column -->
|
||||
<div class="col-md-2">
|
||||
@can('update', $user)
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('users.edit', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default">{{ trans('admin/users/general.edit') }}</a>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('clone/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-default">{{ trans('admin/users/general.clone') }}</a>
|
||||
</div>
|
||||
@can('delete', $user)
|
||||
@if ($user->deleted_at=='')
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<form action="{{route('users.destroy',$user->id)}}" method="POST">
|
||||
{{csrf_field()}}
|
||||
{{ method_field("DELETE")}}
|
||||
<button style="width: 100%;" class="btn btn-sm btn-warning">{{ trans('button.delete')}}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<form action="{{ route('users/bulkedit') }}" method="POST">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<input type="hidden" name="edit_user[{{ $user->id }}]" value="{{ $user->id }}" />
|
||||
<button style="width: 100%;" class="btn btn-sm btn-danger">{{ trans('button.checkin_and_delete') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@else
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('restore/user', $user->id) }}" style="width: 100%;" class="btn btn-sm btn-warning">{{ trans('button.restore') }}</a>
|
||||
</div>
|
||||
@endif
|
||||
@endcan
|
||||
</div>
|
||||
<!-- End button column -->
|
||||
@endcan
|
||||
</div>
|
||||
<!-- End button column -->
|
||||
</div> <!--/.row-->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="asset_tab">
|
||||
<!-- checked out assets table -->
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-2">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1')
|
||||
{!! $asset->model->present()->nameUrl() !!}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('view', $asset)
|
||||
{!! $asset->present()->assetTagUrl() !!}
|
||||
@endcan
|
||||
</td>
|
||||
<td>{!! $asset->present()->nameUrl() !!}</td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $asset)
|
||||
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /asset_tab -->
|
||||
|
||||
<div class="tab-pane" id="licenses_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>
|
||||
{!! $license->present()->nameUrl() !!}
|
||||
</td>
|
||||
<td>
|
||||
{!! $license->present()->serialUrl() !!}
|
||||
</td>
|
||||
<td class="hidden-print">
|
||||
@can('update', $license)
|
||||
<a href="{{ route('licenses.checkin', array('licenseseat_id'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /licenses-tab -->
|
||||
|
||||
<div class="tab-pane" id="accessories_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">Name</th>
|
||||
<th class="col-md-1 hidden-print">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td>{!!$accessory->present()->nameUrl()!!}</td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $accessory)
|
||||
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /accessories-tab -->
|
||||
|
||||
<div class="tab-pane" id="consumables_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-8">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td>{!! $consumable->present()->nameUrl() !!}</a></td>
|
||||
<td>{{ $consumable->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /consumables-tab -->
|
||||
|
||||
<div class="tab-pane" id="files_tab">
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<p>{{ trans('admin/hardware/general.filetype_info') }}</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||
@can('update', $user)
|
||||
<span class="btn btn-info fileinput-button">
|
||||
<i class="fa fa-plus icon-white"></i>
|
||||
<span>Select File...</span>
|
||||
<!-- The file input field used as target for the file upload widget -->
|
||||
<input id="fileupload" type="file" name="file[]" data-url="{{ url('/') }}/api/users/{{ $user->id }}/upload">
|
||||
</span>
|
||||
@endcan
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input id="notes" type="text" name="notes">
|
||||
</div>
|
||||
<div class="col-md-6" id="progress-container" style="visibility: hidden; padding-bottom: 20px;">
|
||||
<!-- The global progress bar -->
|
||||
<div class="col-md-11">
|
||||
<div id="progress" class="progress progress-striped active" style="margin-top: 8px;">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
|
||||
<span id="progress-bar-text">0% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="pull-right progress-checkmark" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/lib/jquery.fileupload.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/lib/jquery.fileupload-ui.css') }}">
|
||||
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="asset_tab">
|
||||
<!-- checked out assets table -->
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-2">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
<th class="col-md-5"><span class="line"></span>{{ trans('general.file_name') }}</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
@foreach ($user->uploads as $file)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1') {{ $asset->model->name }}
|
||||
@endif
|
||||
@if ($file->note)
|
||||
{{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('view', $asset)
|
||||
<a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->asset_tag }}</a>
|
||||
@endcan
|
||||
{{ $file->filename }}
|
||||
</td>
|
||||
<td><a href="{{ route('hardware.show', $asset->id) }}">{{ $asset->name }}</a></td>
|
||||
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $asset)
|
||||
<a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
<td>
|
||||
@if ($file->filename)
|
||||
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">Download</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('update', $user)
|
||||
<a class="btn delete-asset btn-danger btn-sm" href="{{ route('users.destroyfile', [$user->id, $file->id]) }}" data-content="Are you sure you wish to delete this file?" data-title="Delete {{ $file->filename }}?"><i class="fa fa-trash icon-white"></i></a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="licenses_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-6">{{ trans('admin/hardware/form.serial') }}</th>
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('licenses.show', $license->id) }}">{{ $license->name }}</a>
|
||||
|
||||
</td>
|
||||
<td><a href="{{ route('licenses.show', $license->id) }}">{{ mb_strimwidth($license->serial, 0, 50, "...") }}</a></td>
|
||||
<td class="hidden-print">
|
||||
@can('update', $license)
|
||||
<a href="{{ route('licenses.checkin', array('licenseseat_id'=> $license->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="accessories_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">Name</th>
|
||||
<th class="col-md-1 hidden-print">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td><a href="{{ route('accessories.show', $accessory->id) }}">{{ $accessory->name }}</a></td>
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $accessory)
|
||||
<a href="{{ route('checkin/accessory', array('accessory_id'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm">Checkin</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="consumables_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-8">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-4">{{ trans('general.date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td><a href="{{ route('consumables.show', $consumable->id) }}">{{ $consumable->name }}</a></td>
|
||||
<td>{{ $consumable->created_at }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="files_tab">
|
||||
</div> <!--/ROW-->
|
||||
</div><!--/FILES_TAB-->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12">
|
||||
<p>{{ trans('admin/hardware/general.filetype_info') }}</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<!-- The fileinput-button span is used to style the file input field as button -->
|
||||
@can('update', $user)
|
||||
<span class="btn btn-info fileinput-button">
|
||||
<i class="fa fa-plus icon-white"></i>
|
||||
<span>Select File...</span>
|
||||
<!-- The file input field used as target for the file upload widget -->
|
||||
<input id="fileupload" type="file" name="file[]" data-url="{{ url('/') }}/api/users/{{ $user->id }}/upload">
|
||||
|
||||
</span>
|
||||
@endcan
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<input id="notes" type="text" name="notes">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" id="progress-container" style="visibility: hidden; padding-bottom: 20px;">
|
||||
<!-- The global progress bar -->
|
||||
<div class="col-md-11">
|
||||
<div id="progress" class="progress progress-striped active" style="margin-top: 8px;">
|
||||
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="45" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
|
||||
<span id="progress-bar-text">0% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="pull-right progress-checkmark" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/lib/jquery.fileupload.css') }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/css/lib/jquery.fileupload-ui.css') }}">
|
||||
|
||||
|
||||
<div class="col-md-12 col-sm-12">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
<th class="col-md-5"><span class="line"></span>{{ trans('general.file_name') }}</th>
|
||||
<th class="col-md-2"></th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->uploads as $file)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($file->note) {{ $file->note }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
{{ $file->filename }}
|
||||
</td>
|
||||
<td>
|
||||
@if ($file->filename)
|
||||
<a href="{{ route('show/userfile', [$user->id, $file->id]) }}" class="btn btn-default">Download</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@can('update', $user)
|
||||
<a class="btn delete-asset btn-danger btn-sm" href="{{ route('users.destroyfile', [$user->id, $file->id]) }}" data-content="Are you sure you wish to delete this file?" data-title="Delete {{ $file->filename }}?"><i class="fa fa-trash icon-white"></i></a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="history_tab">
|
||||
<div class="table-responsive">
|
||||
<div class="tab-pane" id="history_tab">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="example">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -380,47 +419,46 @@
|
|||
<th class="col-md-4"><span class="line"></span>{{ trans('general.asset') }}</th>
|
||||
<th class="col-md-3"><span class="line"></span>{{ trans('table.by') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($userlog as $log)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<i class="{{ ($log->parseItemIcon()) }}"></i>
|
||||
</td>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
|
||||
@if (($log->item) && ($log->itemType()=="asset"))
|
||||
<a href="{{ route('hardware.show', $log->item_id) }}">{{ $log->item->asset_tag }} - {{ $log->item->present()->name() }}</a>
|
||||
@elseif ($log->item)
|
||||
<a href="{{ route($log->parseItemRoute().'.show', $log->item_id) }}">
|
||||
{{ $log->item->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ trans('general.bad_data') }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->action_type != 'requested')
|
||||
@if (isset($log->user))
|
||||
<a href="{{route('users.show', $log->user_id)}}">{{ $log->user->present()->fullName() }}</a>
|
||||
@else
|
||||
Deleted Admin
|
||||
@endif
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($userlog as $log)
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<i class="{{ ($log->parseItemIcon()) }}"></i>
|
||||
</td>
|
||||
<td>{{ $log->created_at }}</td>
|
||||
<td>{{ $log->action_type }}</td>
|
||||
<td>
|
||||
@if (($log->item) && ($log->itemType()=="asset"))
|
||||
{!! $log->item->present()->nameUrl() !!}
|
||||
@elseif ($log->item)
|
||||
<a href="{{ route($log->parseItemRoute().'.show', $log->item_id) }}">
|
||||
{{ $log->item->name }}
|
||||
</a>
|
||||
@else
|
||||
{{ trans('general.bad_data') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($log->action_type != 'requested')
|
||||
@if (isset($log->user))
|
||||
{!! $log->user->present()->nameUrl() !!}
|
||||
@else
|
||||
Deleted Admin
|
||||
@endif
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script>
|
||||
|
@ -480,5 +518,3 @@ $(function () {
|
|||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
@stop
|
||||
|
|
Loading…
Reference in a new issue