all
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,50 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.asset_tag') }}: {{ $item_tag }}<br>
|
||||
{{ trans('general.asset_model') }}: {{ $item_model }}<br>
|
||||
{{ trans('admin/hardware/form.serial') }}: {{ $item_serial }}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.component') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.consumable') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<style>
|
||||
body {
|
||||
font-family:'Dejavu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@if ($logo)
|
||||
<center>
|
||||
<img src="{{ $logo }}">
|
||||
<p>{{$company_name}}</p>
|
||||
</center>
|
||||
@endif
|
||||
<br>
|
||||
|
||||
<p>
|
||||
{{ trans('general.date') }}: {{ date($date_settings) }} <br>
|
||||
{{ trans('general.license') }}: {{ $item_model }}<br>
|
||||
</p>
|
||||
|
||||
@if ($eula)
|
||||
<hr>
|
||||
{!! $eula !!}
|
||||
<hr>
|
||||
@endif
|
||||
|
||||
|
||||
<p>
|
||||
{{ trans('general.assigned_date') }}: {{$check_out_date}}<br>
|
||||
{{ trans('general.assignee') }}: {{$assigned_to}}<br>
|
||||
{{ trans('general.accepted_date') }}: {{$accepted_date}}
|
||||
</p>
|
||||
|
||||
|
||||
@if ($signature!='')
|
||||
<img src="{{ $signature }}" style="max-width: 600px; border-bottom: black solid 1px;">
|
||||
@endif
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,137 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{trans('general.accept', ['asset' => $acceptance->checkoutable->present()->name()])}}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<link rel="stylesheet" href="{{ url('css/signature-pad.min.css') }}">
|
||||
|
||||
<style>
|
||||
.form-horizontal .control-label, .form-horizontal .radio, .form-horizontal .checkbox, .form-horizontal .radio-inline, .form-horizontal .checkbox-inline {
|
||||
padding-top: 17px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#eula_div {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.m-signature-pad--body {
|
||||
border-style: solid;
|
||||
border-color: grey;
|
||||
border-width: thin;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<form class="form-horizontal" method="post" action="" autocomplete="off">
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-offset-1 col-md-10 col-md-offset-1">
|
||||
<div class="panel box box-default">
|
||||
<div class="box-body">
|
||||
<div class="col-md-12">
|
||||
@if ($acceptance->checkoutable->getEula())
|
||||
<div id="eula_div" style="padding-bottom: 20px">
|
||||
{!! $acceptance->checkoutable->getEula() !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<h3>{{$acceptance->checkoutable->present()->name()}}</h3>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label class="form-control">
|
||||
<input type="radio" name="asset_acceptance" id="accepted" value="accepted">
|
||||
{{trans('general.i_accept')}}
|
||||
</label>
|
||||
<label class="form-control">
|
||||
<input type="radio" name="asset_acceptance" id="declined" value="declined">
|
||||
{{trans('general.i_decline')}}
|
||||
</label>
|
||||
|
||||
</div>
|
||||
|
||||
@if ($snipeSettings->require_accept_signature=='1')
|
||||
<div class="col-md-12">
|
||||
<h3 style="padding-top: 20px">{{trans('general.sign_tos')}}</h3>
|
||||
<div id="signature-pad" class="m-signature-pad">
|
||||
<div class="m-signature-pad--body col-md-12 col-sm-12 col-lg-12 col-xs-12">
|
||||
<canvas style="width:100%;"></canvas>
|
||||
<input type="hidden" name="signature_output" id="signature_output">
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 text-center">
|
||||
<button type="button" class="btn btn-sm btn-default clear" data-action="clear" id="clear_button">{{trans('general.clear_signature')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</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" aria-hidden="true"></i> {{ trans('general.submit') }}</button>
|
||||
</div><!-- /.box-footer -->
|
||||
</div> <!-- / box-default -->
|
||||
</div> <!-- / col -->
|
||||
</div> <!-- / row -->
|
||||
</form>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
var wrapper = document.getElementById("signature-pad"),
|
||||
clearButton = wrapper.querySelector("[data-action=clear]"),
|
||||
saveButton = wrapper.querySelector("[data-action=save]"),
|
||||
canvas = wrapper.querySelector("canvas"),
|
||||
signaturePad;
|
||||
|
||||
// Adjust canvas coordinate space taking into account pixel ratio,
|
||||
// to make it look crisp on mobile devices.
|
||||
// This also causes canvas to be cleared.
|
||||
if (window.matchMedia("(min-width: 768px)").matches) {
|
||||
function resizeCanvas() {
|
||||
// When zoomed out to less than 100%, for some very strange reason,
|
||||
// some browsers report devicePixelRatio as less than 1
|
||||
// and only part of the canvas is cleared then.
|
||||
var ratio = Math.max(window.devicePixelRatio || 1, 1);
|
||||
canvas.width = canvas.offsetWidth * ratio;
|
||||
canvas.height = canvas.offsetHeight * ratio;
|
||||
canvas.getContext("2d").scale(ratio, ratio);
|
||||
}
|
||||
window.onresize = resizeCanvas;
|
||||
resizeCanvas();
|
||||
}
|
||||
|
||||
signaturePad = new SignaturePad(canvas);
|
||||
|
||||
$('#clear_button').on("click", function (event) {
|
||||
signaturePad.clear();
|
||||
});
|
||||
|
||||
$('#submit-button').on("click", function (event) {
|
||||
if (signaturePad.isEmpty()) {
|
||||
alert("Please provide signature first.");
|
||||
return false;
|
||||
} else {
|
||||
$('#signature_output').val(signaturePad.toDataURL());
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@stop
|
@ -0,0 +1,66 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.accept_assets', array('name' => empty($user) ? '' : $user->present()->full_name)) }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="box box-default">
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out Accessories table -->
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-cookie-id-table="pendingAcceptances"
|
||||
data-pagination="true"
|
||||
data-id-table="pendingAcceptances"
|
||||
data-search="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="false"
|
||||
data-sort-order="asc"
|
||||
id="pendingAcceptances"
|
||||
class="table table-striped snipe-table"
|
||||
data-export-options='{
|
||||
"fileName": "my-pending-acceptances-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name')}}</th>
|
||||
<th>{{ trans('table.actions')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($acceptances as $acceptance)
|
||||
<tr>
|
||||
@if ($acceptance->checkoutable)
|
||||
<td>{{ ($acceptance->checkoutable) ? $acceptance->checkoutable->present()->name : '' }}</td>
|
||||
<td><a href="{{ route('account.accept.item', $acceptance) }}" class="btn btn-default btn-sm">{{ trans('general.accept_decline') }}</a></td>
|
||||
@else
|
||||
<td> ----- </td>
|
||||
<td> {{ trans('general.error_user_company_accept_view') }} </td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div> <!-- .box-body-->
|
||||
</div><!--.box.box-default-->
|
||||
</div> <!-- .col-md-12-->
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table')
|
||||
@stop
|
49
Productivite/Snipe-IT/resources/views/account/api.blade.php
Normal file
49
Productivite/Snipe-IT/resources/views/account/api.blade.php
Normal file
@ -0,0 +1,49 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('account/general.personal_api_keys') }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
|
||||
@if (!config('app.lock_passwords'))
|
||||
<passport-personal-access-tokens
|
||||
token-url="{{ url('oauth/personal-access-tokens') }}"
|
||||
scopes-url="{{ url('oauth/scopes') }}">
|
||||
</passport-personal-access-tokens>
|
||||
@else
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="alert alert-warning"><i class="fas fa-exclamation-triangle faa-pulse animated"></i>
|
||||
{{ trans('account/general.api_key_warning') }}
|
||||
</div>
|
||||
|
||||
<p>{{ trans('account/general.api_base_url') }}<br>
|
||||
<code>{{ url('/api/v1') }}{!! trans('account/general.api_base_url_endpoint') !!}</code></p>
|
||||
|
||||
<p>{{ trans('account/general.api_token_expiration_time') }}
|
||||
<strong>{{ config('passport.expiration_years') }} {{ trans('general.years') }} </strong>.</p>
|
||||
|
||||
|
||||
<p>{!! trans('account/general.api_reference') !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
});
|
||||
</script>
|
||||
@endsection
|
@ -0,0 +1,69 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.changepassword') }}
|
||||
@stop
|
||||
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off']) }}
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
|
||||
<!-- Old Password -->
|
||||
<div class="form-group {{ $errors->has('current_password') ? ' has-error' : '' }}">
|
||||
<label for="current_password" class="col-md-3 control-label"> {{ trans('general.current_password') }} </label>
|
||||
</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="current_password" id="current_password" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
{!! $errors->first('current_password', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group {{ $errors->has('password') ? ' has-error' : '' }}">
|
||||
<label for="password" class="col-md-3 control-label">{{ trans('general.new_password') }}</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="password" id="password" {{ (config('app.lock_passwords') ? ' disabled' : '') }}>
|
||||
{!! $errors->first('password', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group {{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
|
||||
<label for="password_confirmation" class="col-md-3 control-label">{{ trans('general.new_password') }}</label>
|
||||
<div class="col-md-5 required">
|
||||
<input class="form-control" type="password" name="password_confirmation" id="password_confirmation" {{ (config('app.lock_passwords') ? ' disabled' : '') }} aria-label="password_confirmation">
|
||||
{!! $errors->first('password_confirmation', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
@if (config('app.lock_passwords')===true)
|
||||
<p class="text-warning"><i class="fas fa-lock"></i> {{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</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-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
|
||||
</div> <!-- .box-default -->
|
||||
{{ Form::close() }}
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
@stop
|
163
Productivite/Snipe-IT/resources/views/account/profile.blade.php
Normal file
163
Productivite/Snipe-IT/resources/views/account/profile.blade.php
Normal file
@ -0,0 +1,163 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.editprofile') }}
|
||||
@stop
|
||||
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
{{ Form::open(['method' => 'POST', 'files' => true, 'class' => 'form-horizontal', 'autocomplete' => 'off']) }}
|
||||
<!-- CSRF Token -->
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}" />
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
<!-- 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-8 required">
|
||||
<input class="form-control" type="text" name="first_name" id="first_name" value="{{ old('first_name', $user->first_name) }}" />
|
||||
{!! $errors->first('first_name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></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-8 required">
|
||||
<input class="form-control" type="text" name="last_name" id="last_name" value="{{ old('last_name', $user->last_name) }}" />
|
||||
{!! $errors->first('last_name', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@can('self.edit_location')
|
||||
<!-- Location -->
|
||||
@include ('partials.forms.edit.location-profile-select', ['translated_name' => trans('general.location')])
|
||||
@endcan
|
||||
|
||||
|
||||
<!-- 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-7">
|
||||
|
||||
@if (!config('app.lock_passwords'))
|
||||
{!! Form::locales('locale', old('locale', $user->locale), 'select2') !!}
|
||||
{!! $errors->first('locale', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
@else
|
||||
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($snipeSettings->allow_user_skin=='1')
|
||||
<!-- Skin -->
|
||||
<div class="form-group {{ $errors->has('skin') ? 'error' : '' }}">
|
||||
<label for="website" class="col-md-3 control-label">{{ Form::label('skin', trans('general.skin')) }}</label>
|
||||
<div class="col-md-8">
|
||||
{!! Form::user_skin('skin', old('skin', $user->skin), 'select2') !!}
|
||||
{!! $errors->first('skin', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- 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="{{ old('phone', $user->phone) }}" />
|
||||
{!! $errors->first('phone', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 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-8">
|
||||
<input class="form-control" type="text" name="website" id="website" value="{{ old('website', $user->website) }}" />
|
||||
{!! $errors->first('website', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></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-8">
|
||||
<input class="form-control" type="text" name="gravatar" id="gravatar" value="{{ old('gravatar', $user->gravatar) }}" />
|
||||
{!! $errors->first('gravatar', '<span class="alert-msg" aria-hidden="true"><i class="fas fa-times" aria-hidden="true"></i> :message</span>') !!}
|
||||
<p>
|
||||
<img src="//secure.gravatar.com/avatar/{{ md5(strtolower(trim($user->gravatar))) }}" width="30" height="30" alt="{{ $user->present()->fullName() }} avatar image">
|
||||
{!! trans('general.gravatar_url') !!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Avatar -->
|
||||
|
||||
@if (($user->avatar) && ($user->avatar!=''))
|
||||
<div class="form-group{{ $errors->has('image_delete') ? ' has-error' : '' }}">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<label for="image_delete" class="form-control">
|
||||
{{ Form::checkbox('image_delete', '1', old('image_delete'), ['id' => 'image_delete', 'aria-label'=>'image_delete']) }}
|
||||
{{ trans('general.image_delete') }}
|
||||
</label>
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-9 col-md-offset-3">
|
||||
<img src="{{ Storage::disk('public')->url(app('users_upload_path').e($user->avatar)) }}" class="img-responsive">
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@include ('partials.forms.edit.image-upload', ['fieldname' => 'avatar', 'image_path' => app('users_upload_path')])
|
||||
|
||||
|
||||
<!-- Two factor opt in -->
|
||||
@if ($snipeSettings->two_factor_enabled=='1')
|
||||
<div class="form-group {{ $errors->has('two_factor_optin') ? 'has-error' : '' }}">
|
||||
<div class="col-md-7 col-md-offset-3">
|
||||
@can('self.two_factor')
|
||||
<label class="form-control">{{ Form::checkbox('two_factor_optin', '1', old('two_factor_optin', $user->two_factor_optin)) }}
|
||||
@else
|
||||
<label class="form-control form-control--disabled">{{ Form::checkbox('two_factor_optin', '1', old('two_factor_optin', $user->two_factor_optin),['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> <!-- .box-body -->
|
||||
<div class="text-right box-footer">
|
||||
<a class="btn btn-link" href="{{ URL::previous() }}">{{ trans('button.cancel') }}</a>
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-check icon-white" aria-hidden="true"></i> {{ trans('general.save') }}</button>
|
||||
</div>
|
||||
</div> <!-- .box-default -->
|
||||
{{ Form::close() }}
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
@ -0,0 +1,198 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
@section('title0')
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
{{ trans('general.assets') }}
|
||||
@stop
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
@yield('title0') @parent
|
||||
@stop
|
||||
|
||||
{{-- Page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
@if (($assets->count() < 1) && ($models->count() < 1))
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert-info fade in">
|
||||
<i class="fas fa-info-circle faa-pulse animated"></i>
|
||||
<strong>{{ trans('general.notification_info') }}: </strong>
|
||||
{{ trans('general.no_requestable') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
@if ($assets->count() > 0)
|
||||
<li class="active">
|
||||
<a href="#assets" data-toggle="tab" title="{{ trans('general.assets') }}">{{ trans('general.assets') }}
|
||||
<badge class="badge badge-secondary"> {{ $assets->count()}}</badge>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@if ($models->count() > 0)
|
||||
<li>
|
||||
<a href="#models" data-toggle="tab" title="{{ trans('general.asset_models') }}">{{ trans('general.asset_models') }}
|
||||
<badge class="badge badge-secondary"> {{ $models->count()}}</badge>
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@if ($assets->count() > 0)
|
||||
<div class="tab-pane fade in active" id="assets">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-click-to-select="true"
|
||||
data-cookie-id-table="requestableAssetsListingTable"
|
||||
data-pagination="true"
|
||||
data-id-table="requestableAssetsListingTable"
|
||||
data-search="true"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="false"
|
||||
data-show-footer="false"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
data-toolbar="#assetsBulkEditToolbar"
|
||||
data-bulk-button-id="#bulkAssetEditButton"
|
||||
data-bulk-form-id="#assetsBulkForm"
|
||||
id="assetsListingTable"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.assets.requestable', ['requestable' => true]) }}">
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1" data-field="image" data-formatter="imageFormatter" data-sortable="true">{{ trans('general.image') }}</th>
|
||||
<th class="col-md-2" data-field="asset_tag" data-sortable="true" >{{ trans('general.asset_tag') }}</th>
|
||||
<th class="col-md-2" data-field="model" data-sortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-2" data-field="model_number" data-sortable="true">{{ trans('admin/models/table.modelnumber') }}</th>
|
||||
<th class="col-md-2" data-field="name" data-sortable="true">{{ trans('admin/hardware/form.name') }}</th>
|
||||
<th class="col-md-3" data-field="serial" data-sortable="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-md-2" data-field="location" data-sortable="true">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th class="col-md-2" data-field="status" data-sortable="true">{{ trans('admin/hardware/table.status') }}</th>
|
||||
<th class="col-md-2" data-field="expected_checkin" data-formatter="dateDisplayFormatter" data-sortable="true">{{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
|
||||
@foreach(\App\Models\CustomField::get() as $field)
|
||||
@if (($field->field_encrypted=='0') && ($field->show_in_requestable_list=='1'))
|
||||
<th class="col-md-2" data-field="custom_fields.{{ $field->db_column }}" data-sortable="true">{{ $field->name }}</th>
|
||||
@endif
|
||||
@endforeach
|
||||
<th class="col-md-1" data-formatter="assetRequestActionsFormatter" data-field="actions" data-sortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($models->count() > 0)
|
||||
<div class="tab-pane fade in {{ ($assets->count() == 0) ? 'active' : '' }}" id="models">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<table
|
||||
name="requested-assets"
|
||||
data-toolbar="#toolbar"
|
||||
class="table table-striped snipe-table"
|
||||
id="table"
|
||||
data-advanced-search="true"
|
||||
data-id-table="advancedTable"
|
||||
data-cookie-id-table="requestableAssets">
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th class="col-md-1" data-sortable="true">{{ trans('general.image') }}</th>
|
||||
<th class="col-md-6" data-sortable="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-3" data-sortable="true">{{ trans('admin/accessories/general.remaining') }}</th>
|
||||
|
||||
<th class="col-md-2 actions" data-sortable="false">{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($models as $requestableModel)
|
||||
<tr>
|
||||
|
||||
<td>
|
||||
|
||||
@if ($requestableModel->image)
|
||||
<a href="{{ config('app.url') }}/uploads/models/{{ $requestableModel->image }}" data-toggle="lightbox" data-type="image">
|
||||
<img src="{{ config('app.url') }}/uploads/models/{{ $requestableModel->image }}" style="max-height: {{ $snipeSettings->thumbnail_max_h }}px; width: auto;" class="img-responsive">
|
||||
</a>
|
||||
@endif
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@can('view', \App\Models\AssetModel::class)
|
||||
<a href="{{ route('models.show', ['model' => $requestableModel->id]) }}">{{ $requestableModel->name }}</a>
|
||||
@else
|
||||
{{ $requestableModel->name }}
|
||||
@endcan
|
||||
</td>
|
||||
|
||||
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
|
||||
|
||||
<td>
|
||||
<form action="{{ route('account/request-item', ['itemType' => 'asset_model', 'itemId' => $requestableModel->id])}}" method="POST" accept-charset="utf-8">
|
||||
{{ csrf_field() }}
|
||||
<input type="text" style="width: 70px; margin-right: 10px;" class="form-control pull-left" name="request-quantity" value="" placeholder="{{ trans('general.qty') }}">
|
||||
@if ($requestableModel->isRequestedBy(Auth::user()))
|
||||
{{ Form::submit(trans('button.cancel'), ['class' => 'btn btn-danger btn-sm'])}}
|
||||
@else
|
||||
{{ Form::submit(trans('button.request'), ['class' => 'btn btn-primary btn-sm'])}}
|
||||
@endif
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div> <!-- .tab-content-->
|
||||
</div> <!-- .nav-tabs-custom -->
|
||||
|
||||
@endif
|
||||
</div> <!-- .col-md-12> -->
|
||||
</div> <!-- .row -->
|
||||
@stop
|
||||
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table', [
|
||||
'exportFile' => 'requested-export',
|
||||
'search' => true,
|
||||
'clientSearch' => true,
|
||||
])
|
||||
|
||||
|
||||
<script nonce="{{ csrf_token() }}">
|
||||
|
||||
$( "a[name='Request']").click(function(event) {
|
||||
// event.preventDefault();
|
||||
quantity = $(this).closest('td').siblings().find('input').val();
|
||||
currentUrl = $(this).attr('href');
|
||||
// $(this).attr('href', currentUrl + '?quantity=' + quantity);
|
||||
// alert($(this).attr('href'));
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
|
@ -0,0 +1,60 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.requested_assets')}}
|
||||
@stop
|
||||
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="box box-default">
|
||||
<div class="box-body">
|
||||
|
||||
<table
|
||||
data-cookie-id-table="userRequests"
|
||||
data-pagination="true"
|
||||
data-id-table="userRequests"
|
||||
data-side-pagination="server"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="true"
|
||||
data-sort-order="desc"
|
||||
id="userRequests"
|
||||
class="table table-striped snipe-table"
|
||||
data-url="{{ route('api.assets.requested') }}"
|
||||
data-export-options='{
|
||||
"fileName": "my-requested-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="image" data-formatter="imageFormatter">{{ trans('general.image') }}</th>
|
||||
<th data-field="name">{{ trans('general.item_name') }}</th>
|
||||
<th data-field="type">{{ trans('general.type') }}</th>
|
||||
<th data-field="qty">{{ trans('general.qty') }}</th>
|
||||
<th data-field="location">{{ trans('admin/hardware/table.location') }}</th>
|
||||
<th data-field="expected_checkin" data-formatter="dateDisplayFormatter"> {{ trans('admin/hardware/form.expected_checkin') }}</th>
|
||||
<th data-field="request_date" data-formatter="dateDisplayFormatter"> {{ trans('general.requested_date') }}</th>
|
||||
|
||||
@foreach(\App\Models\CustomField::get() as $field)
|
||||
@if (($field->field_encrypted=='0') && ($field->show_in_requestable_list=='1'))
|
||||
<th data-field="custom_fields.{{ $field->db_column }}">{{ $field->name }}</th>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div> <!-- .box-body -->
|
||||
</div> <!-- .box-default -->
|
||||
</div> <!-- .col-md-9 -->
|
||||
</div> <!-- .row-->
|
||||
|
||||
@stop
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table')
|
||||
@stop
|
@ -0,0 +1,647 @@
|
||||
@extends('layouts/default')
|
||||
|
||||
{{-- Page title --}}
|
||||
@section('title')
|
||||
{{ trans('general.hello_name', array('name' => $user->present()->getFullNameAttribute())) }}
|
||||
@parent
|
||||
@stop
|
||||
|
||||
{{-- Account page content --}}
|
||||
@section('content')
|
||||
|
||||
@if ($acceptances = \App\Models\CheckoutAcceptance::forUser(Auth::user())->pending()->count())
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="alert alert alert-warning fade in">
|
||||
<i class="fas fa-exclamation-triangle faa-pulse animated"></i>
|
||||
|
||||
<strong>
|
||||
<a href="{{ route('account.accept') }}" style="color: white;">
|
||||
{{ trans('general.unaccepted_profile_warning', array('count' => $acceptances)) }}
|
||||
</a>
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs hidden-print">
|
||||
|
||||
<li class="active">
|
||||
<a href="#details" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-info-circle fa-2x"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('admin/users/general.info') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#asset" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
|
||||
{!! ($user->assets()->AssetsForShow()->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->assets()->AssetsForShow()->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#licenses" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="far fa-save fa-2x"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
|
||||
{!! ($user->licenses->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->licenses->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#accessories" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="far fa-keyboard fa-2x"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.accessories') }}
|
||||
{!! ($user->accessories->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->accessories->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#consumables" data-toggle="tab">
|
||||
<span class="hidden-lg hidden-md">
|
||||
<i class="fas fa-tint fa-2x"></i>
|
||||
</span>
|
||||
<span class="hidden-xs hidden-sm">{{ trans('general.consumables') }}
|
||||
{!! ($user->consumables->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($user->consumables->count()).'</badge>' : '' !!}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="details">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<!-- Start button column -->
|
||||
<div class="col-md-3 col-xs-12 col-sm-push-9">
|
||||
|
||||
|
||||
|
||||
<div class="col-md-12 text-center">
|
||||
|
||||
</div>
|
||||
<div class="col-md-12 text-center">
|
||||
<img src="{{ $user->present()->gravatar() }}" class=" img-thumbnail hidden-print" style="margin-bottom: 20px;" alt="{{ $user->present()->fullName() }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="{{ route('profile') }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print">
|
||||
{{ trans('general.editprofile') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('account.password.index') }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print" target="_blank" rel="noopener">
|
||||
{{ trans('general.changepassword') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@can('self.api')
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('user.api') }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print" target="_blank" rel="noopener">
|
||||
{{ trans('general.manage_api_keys') }}
|
||||
</a>
|
||||
</div>
|
||||
@endcan
|
||||
|
||||
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
<a href="{{ route('profile.print') }}" style="width: 100%;" class="btn btn-sm btn-primary hidden-print" target="_blank" rel="noopener">
|
||||
{{ trans('admin/users/general.print_assigned') }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-12" style="padding-top: 5px;">
|
||||
@if (!empty($user->email))
|
||||
<form action="{{ route('profile.email_assets') }}" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener">{{ trans('admin/users/general.email_assigned') }}</button>
|
||||
</form>
|
||||
@else
|
||||
<button style="width: 100%;" class="btn btn-sm btn-primary hidden-print" rel="noopener" disabled title="{{ trans('admin/users/message.user_has_no_email') }}">{{ trans('admin/users/general.email_assigned') }}</button>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
</div>
|
||||
|
||||
<!-- End button column -->
|
||||
|
||||
<div class="col-md-9 col-xs-12 col-sm-pull-3">
|
||||
|
||||
<div class="row-new-striped">
|
||||
|
||||
<div class="row">
|
||||
<!-- name -->
|
||||
|
||||
<div class="col-md-3 col-sm-2">
|
||||
{{ trans('admin/users/table.name') }}
|
||||
</div>
|
||||
<div class="col-md-9 col-sm-2">
|
||||
{{ $user->present()->fullName() }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- company -->
|
||||
@if (!is_null($user->company))
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.company') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ $user->company->name }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
<!-- username -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.username') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
@if ($user->isSuperUser())
|
||||
<label class="label label-danger"><i class="fas fa-crown" title="superuser"></i></label>
|
||||
@elseif ($user->hasAccess('admin'))
|
||||
<label class="label label-warning"><i class="fas fa-crown" title="admin"></i></label>
|
||||
@endif
|
||||
{{ $user->username }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- address -->
|
||||
@if (($user->address) || ($user->city) || ($user->state) || ($user->country))
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.address') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
|
||||
@if ($user->address)
|
||||
{{ $user->address }} <br>
|
||||
@endif
|
||||
@if ($user->city)
|
||||
{{ $user->city }}
|
||||
@endif
|
||||
@if ($user->state)
|
||||
{{ $user->state }}
|
||||
@endif
|
||||
@if ($user->country)
|
||||
{{ $user->country }}
|
||||
@endif
|
||||
@if ($user->zip)
|
||||
{{ $user->zip }}
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->jobtitle)
|
||||
<!-- jobtitle -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.job') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ $user->jobtitle }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->employee_num)
|
||||
<!-- employee_num -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.employee_num') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ $user->employee_num }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->manager)
|
||||
<!-- manager -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.manager') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<a href="{{ route('users.show', $user->manager->id) }}">
|
||||
{{ $user->manager->getFullNameAttribute() }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
|
||||
@if ($user->email)
|
||||
<!-- email -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.email') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<a href="mailto:{{ $user->email }}">{{ $user->email }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->website)
|
||||
<!-- website -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.website') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<a href="{{ $user->website }}" target="_blank">{{ $user->website }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->phone)
|
||||
<!-- phone -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.phone') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<a href="tel:{{ $user->phone }}">{{ $user->phone }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->userloc)
|
||||
<!-- location -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('admin/users/table.location') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ link_to_route('locations.show', $user->userloc->name, [$user->userloc->id]) }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- last login -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.last_login') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ \App\Helpers\Helper::getFormattedDateObject($user->last_login, 'datetime', false) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if ($user->department)
|
||||
<!-- empty -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.department') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ $user->department->name }}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($user->created_at)
|
||||
<!-- created at -->
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{{ trans('general.created_at') }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ \App\Helpers\Helper::getFormattedDateObject($user->created_at, 'datetime')['formatted']}}
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div> <!--/end striped container-->
|
||||
</div> <!-- end col-md-9 -->
|
||||
|
||||
|
||||
|
||||
</div> <!--/.row-->
|
||||
</div><!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="asset">
|
||||
<!-- checked out assets table -->
|
||||
|
||||
|
||||
<div class="table table-responsive">
|
||||
@if ($user->id)
|
||||
<div class="box-header with-border">
|
||||
<div class="box-heading">
|
||||
<h2 class="box-title"> {{ trans('admin/users/general.assets_user', array('name' => $user->first_name)) }}</h2>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@endif
|
||||
|
||||
<div class="box-body">
|
||||
<!-- checked out assets table -->
|
||||
<div class="table-responsive">
|
||||
|
||||
<table
|
||||
data-cookie="true"
|
||||
data-cookie-id-table="userAssets"
|
||||
data-pagination="true"
|
||||
data-id-table="userAssets"
|
||||
data-search="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-sort-order="asc"
|
||||
id="userAssets"
|
||||
class="table table-striped snipe-table"
|
||||
data-export-options='{
|
||||
"fileName": "my-assets-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">#</th>
|
||||
<th class="col-md-1">{{ trans('general.image') }}</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="true">{{ trans('general.category') }}</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="true">{{ trans('admin/hardware/table.asset_tag') }}</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="true">{{ trans('general.name') }}</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="true">{{ trans('admin/hardware/table.asset_model') }}</th>
|
||||
<th class="col-md-3" data-switchable="true" data-visible="true">{{ trans('admin/hardware/table.serial') }}</th>
|
||||
<th class="col-md-2" data-switchable="true" data-visible="false">{{ trans('admin/hardware/form.default_location') }}</th>
|
||||
@can('self.view_purchase_cost')
|
||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
@endcan
|
||||
@foreach ($field_array as $db_column => $field_name)
|
||||
<th class="col-md-1" data-switchable="true" data-visible="true">{{ $field_name }}</th>
|
||||
@endforeach
|
||||
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$counter = 1
|
||||
@endphp
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>{{ $counter }}</td>
|
||||
<td>
|
||||
@if (($asset->image) && ($asset->image!=''))
|
||||
<img src="{{ Storage::disk('public')->url(app('assets_upload_path').e($asset->image)) }}" style="max-height: 30px; width: auto" class="img-responsive">
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<img src="{{ Storage::disk('public')->url(app('models_upload_path').e($asset->model->image)) }}" style="max-height: 30px; width: auto" class="img-responsive">
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if (($asset->model) && ($asset->model->category))
|
||||
{{ $asset->model->category->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->asset_tag }}</td>
|
||||
<td>{{ $asset->name }}</td>
|
||||
<td>
|
||||
@if ($asset->physical=='1')
|
||||
{{ $asset->model->name }}
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ $asset->serial }}</td>
|
||||
<td>{{ ($asset->defaultLoc) ? $asset->defaultLoc->name : '' }}</td>
|
||||
@can('self.view_purchase_cost')
|
||||
<td>
|
||||
{!! Helper::formatCurrencyOutput($asset->purchase_cost) !!}
|
||||
</td>
|
||||
@endcan
|
||||
|
||||
@foreach ($field_array as $db_column => $field_value)
|
||||
<td>
|
||||
{{ $asset->{$db_column} }}
|
||||
</td>
|
||||
@endforeach
|
||||
|
||||
</tr>
|
||||
|
||||
@php
|
||||
$counter++
|
||||
@endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> <!-- .table-responsive-->
|
||||
</div>
|
||||
</div><!-- /asset -->
|
||||
<div class="tab-pane" id="licenses">
|
||||
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-cookie-id-table="userLicenses"
|
||||
data-pagination="true"
|
||||
data-id-table="userLicenses"
|
||||
data-search="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-export="true"
|
||||
data-show-refresh="false"
|
||||
data-sort-order="asc"
|
||||
id="userLicenses"
|
||||
class="table table-striped snipe-table"
|
||||
data-export-options='{
|
||||
"fileName": "my-licenses-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ trans('general.name') }}</th>
|
||||
<th>{{ trans('admin/licenses/form.license_key') }}</th>
|
||||
<th>{{ trans('admin/licenses/form.to_name') }}</th>
|
||||
<th>{{ trans('admin/licenses/form.to_email') }}</th>
|
||||
<th>{{ trans('general.category') }}</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->licenses as $license)
|
||||
<tr>
|
||||
<td>{{ $license->name }}</td>
|
||||
<td>
|
||||
@can('viewKeys', $license)
|
||||
{{ $license->serial }}
|
||||
@else
|
||||
------------
|
||||
@endcan
|
||||
</td>
|
||||
<td>
|
||||
@can('viewKeys', $license)
|
||||
{{ $license->license_name }}
|
||||
@else
|
||||
------------
|
||||
@endcan
|
||||
</td>
|
||||
@can('viewKeys', $license)
|
||||
<td>{{$license->license_email}}</td>
|
||||
@else
|
||||
------------
|
||||
@endcan
|
||||
<td>{{ ($license->category) ? $license->category->name : trans('general.deleted') }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- .table-responsive-->
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="accessories">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-cookie-id-table="userAccessoryTable"
|
||||
data-id-table="userAccessoryTable"
|
||||
id="userAccessoryTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="false"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
class="table table-striped snipe-table table-hover"
|
||||
data-export-options='{
|
||||
"fileName": "export-accessory-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">{{ trans('general.name') }}</th>
|
||||
@can('self.view_purchase_cost')
|
||||
<th class="col-md-6" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
@endcan
|
||||
<th class="col-md-1 hidden-print">{{ trans('general.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->accessories as $accessory)
|
||||
<tr>
|
||||
<td>{{ $accessory->name }}</td>
|
||||
@can('self.view_purchase_cost')
|
||||
<td>
|
||||
{!! Helper::formatCurrencyOutput($accessory->purchase_cost) !!}
|
||||
</td>
|
||||
@endcan
|
||||
<td class="hidden-print">
|
||||
@can('checkin', $accessory)
|
||||
<a href="{{ route('accessories.checkin.show', array('accessoryID'=> $accessory->pivot->id, 'backto'=>'user')) }}" class="btn btn-primary btn-sm hidden-print">{{ trans('general.checkin') }}</a>
|
||||
@endcan
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /accessories-tab -->
|
||||
|
||||
<div class="tab-pane" id="consumables">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
data-cookie-id-table="userConsumableTable"
|
||||
data-id-table="userConsumableTable"
|
||||
id="userConsumableTable"
|
||||
data-search="true"
|
||||
data-pagination="true"
|
||||
data-side-pagination="client"
|
||||
data-show-columns="true"
|
||||
data-show-fullscreen="true"
|
||||
data-show-export="true"
|
||||
data-show-footer="true"
|
||||
data-show-refresh="false"
|
||||
data-sort-order="asc"
|
||||
data-sort-name="name"
|
||||
class="table table-striped snipe-table table-hover"
|
||||
data-export-options='{
|
||||
"fileName": "export-consumable-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
|
||||
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","download","icon"]
|
||||
}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{ trans('general.name') }}</th>
|
||||
@can('self.view_purchase_cost')
|
||||
<th class="col-md-2" data-footer-formatter="sumFormatter" data-fieldname="purchase_cost">{{ trans('general.purchase_cost') }}</th>
|
||||
@endcan
|
||||
<th class="col-md-2">{{ trans('general.date') }}</th>
|
||||
<th class="col-md-5">{{ trans('general.notes') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->consumables as $consumable)
|
||||
<tr>
|
||||
<td>{{ $consumable->name }}</td>
|
||||
@can('self.view_purchase_cost')
|
||||
<td>
|
||||
{!! Helper::formatCurrencyOutput($consumable->purchase_cost) !!}
|
||||
</td>
|
||||
@endcan
|
||||
<td>{{ Helper::getFormattedDateObject($consumable->pivot->created_at, 'datetime', false) }}</td>
|
||||
<td>{{ $consumable->pivot->note }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div><!-- /consumables-tab -->
|
||||
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@stop
|
||||
|
||||
@section('moar_scripts')
|
||||
@include ('partials.bootstrap-table')
|
||||
@stop
|
Reference in New Issue
Block a user