Compare commits
14 Commits
v1.2.7-beta
...
v1.2.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 527650d03b | |||
| 126121065c | |||
| 48ccf844fa | |||
| 7556f989df | |||
| 8207597a58 | |||
| 1137768f84 | |||
| 5f6925858b | |||
| 77d1d93ebc | |||
| c95af84452 | |||
| 62b5ec5b02 | |||
| 9f9a9a51b3 | |||
| 6f9daa28eb | |||
| d408bb9086 | |||
| 5f3bc8e74b |
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
return array (
|
||||
'app_version' => 'v1.2.6.1-231',
|
||||
'hash_version' => 'v1.2.6.1-231-g767e2c6',
|
||||
'app_version' => 'v1.2.7-beta',
|
||||
'hash_version' => 'v1.2.7-beta-10-g48ccf84',
|
||||
);
|
||||
@@ -15,6 +15,8 @@ use User;
|
||||
use Actionlog;
|
||||
use Mail;
|
||||
use Datatable;
|
||||
use Slack;
|
||||
use Config;
|
||||
|
||||
class AccessoriesController extends AdminController
|
||||
{
|
||||
@@ -233,6 +235,7 @@ class AccessoriesController extends AdminController
|
||||
return Redirect::to('accessories')->with('error', Lang::get('admin/accessories/message.not_found'));
|
||||
}
|
||||
|
||||
$admin_user = Sentry::getUser();
|
||||
$assigned_to = e(Input::get('assigned_to'));
|
||||
|
||||
|
||||
@@ -271,6 +274,46 @@ class AccessoriesController extends AdminController
|
||||
$logaction->location_id = $user->location_id;
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->slack_endpoint) {
|
||||
|
||||
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked Out:',
|
||||
'value' => strtoupper($logaction->asset_type).' <'.Config::get('app.url').'/admin/accessories/'.$accessory->id.'/view'.'|'.$accessory->name.'> checked out to <'.Config::get('app.url').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.Config::get('app.url').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
|
||||
|
||||
]
|
||||
])->send('Accessory Checked Out');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$log = $logaction->logaction('checkout');
|
||||
|
||||
$accessory_user = DB::table('accessories_users')->where('assigned_to','=',$accessory->assigned_to)->where('accessory_id','=',$accessory->id)->first();
|
||||
@@ -336,6 +379,8 @@ class AccessoriesController extends AdminController
|
||||
$logaction = new Actionlog();
|
||||
$logaction->checkedout_to = $accessory_user->assigned_to;
|
||||
$return_to = $accessory_user->assigned_to;
|
||||
$admin_user = Sentry::getUser();
|
||||
|
||||
|
||||
// Was the accessory updated?
|
||||
if(DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) {
|
||||
@@ -343,7 +388,45 @@ class AccessoriesController extends AdminController
|
||||
$logaction->accessory_id = $accessory->id;
|
||||
$logaction->location_id = NULL;
|
||||
$logaction->asset_type = 'accessory';
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->user_id = $admin_user->id;
|
||||
$logaction->note = e(Input::get('note'));
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->slack_endpoint) {
|
||||
|
||||
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked In:',
|
||||
'value' => strtoupper($logaction->asset_type).' <'.Config::get('app.url').'/admin/accessories/'.$accessory->id.'/view'.'|'.$accessory->name.'> checked in by <'.Config::get('app.url').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
]
|
||||
])->send('Accessory Checked In');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$log = $logaction->logaction('checkin from');
|
||||
|
||||
if ($backto=='user') {
|
||||
|
||||
@@ -460,12 +460,18 @@ class AssetsController extends AdminController
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Asset Checked Out',
|
||||
'value' => strtoupper($logaction->asset_type).' asset '.$asset->showAssetName().' checked out to '.$logaction->userlog->fullName().' by '.Sentry::getUser()->fullName()
|
||||
'title' => 'Checked Out:',
|
||||
'value' => strtoupper($logaction->asset_type).' asset <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> checked out to <'.Config::get('app.url').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.Sentry::getUser()->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
|
||||
|
||||
]
|
||||
])->send('A new checkout has been posted');
|
||||
])->send('Asset Checked Out');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
@@ -574,12 +580,16 @@ class AssetsController extends AdminController
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Asset Checked In',
|
||||
'value' => strtoupper($logaction->asset_type).' asset '.$asset->showAssetName().' checked in by '.Sentry::getUser()->fullName()
|
||||
'title' => 'Checked In:',
|
||||
'value' => strtoupper($logaction->asset_type).' asset <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> checked in by <'.Config::get('app.url').'/hardware/'.$asset->id.'/view'.'|'.Sentry::getUser()->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
]
|
||||
])->send('A new checkin has been posted');
|
||||
])->send('Asset Checked In');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ use Validator;
|
||||
use View;
|
||||
use Response;
|
||||
use Datatable;
|
||||
use Slack;
|
||||
use Config;
|
||||
|
||||
class LicensesController extends AdminController
|
||||
{
|
||||
@@ -132,6 +134,7 @@ class LicensesController extends AdminController
|
||||
|
||||
// Was the license created?
|
||||
if($license->save()) {
|
||||
|
||||
$insertedId = $license->id;
|
||||
// Save the license seat data
|
||||
for ($x=0; $x<$license->seats; $x++) {
|
||||
@@ -439,6 +442,7 @@ class LicensesController extends AdminController
|
||||
|
||||
$assigned_to = e(Input::get('assigned_to'));
|
||||
$asset_id = e(Input::get('asset_id'));
|
||||
$user = Sentry::getUser();
|
||||
|
||||
// Declare the rules for the form validation
|
||||
$rules = array(
|
||||
@@ -480,13 +484,13 @@ class LicensesController extends AdminController
|
||||
|
||||
|
||||
|
||||
// Check if the asset exists
|
||||
// Check if the asset exists
|
||||
if (is_null($licenseseat = LicenseSeat::find($seatId))) {
|
||||
// Redirect to the asset management page with error
|
||||
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
|
||||
}
|
||||
|
||||
if ( e(Input::get('asset_id')) == '') {
|
||||
if (Input::get('asset_id') == '') {
|
||||
$licenseseat->asset_id = NULL;
|
||||
} else {
|
||||
$licenseseat->asset_id = e(Input::get('asset_id'));
|
||||
@@ -512,12 +516,55 @@ class LicensesController extends AdminController
|
||||
$logaction->asset_id = $licenseseat->license_id;
|
||||
|
||||
|
||||
$license = License::find($licenseseat->license_id);
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
|
||||
// Update the asset data
|
||||
if ( e(Input::get('assigned_to')) == '') {
|
||||
$logaction->checkedout_to = NULL;
|
||||
$logaction->checkedout_to = NULL;
|
||||
$slack_msg = strtoupper($logaction->asset_type).' license <'.Config::get('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.Config::get('app.url').'/hardware/'.$is_asset_id->id.'/view|'.$is_asset_id->showAssetName().'> by <'.Config::get('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
} else {
|
||||
$logaction->checkedout_to = e(Input::get('assigned_to'));
|
||||
$logaction->checkedout_to = e(Input::get('assigned_to'));
|
||||
$slack_msg = strtoupper($logaction->asset_type).' license <'.Config::get('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.Config::get('app.url').'/admin/users/'.$is_assigned_to->id.'/view|'.$is_assigned_to->fullName().'> by <'.Config::get('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($settings->slack_endpoint) {
|
||||
|
||||
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked Out:',
|
||||
'value' => $slack_msg
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
|
||||
|
||||
]
|
||||
])->send('License Checked Out');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$log = $logaction->logaction('checkout');
|
||||
|
||||
@@ -557,6 +604,8 @@ class LicensesController extends AdminController
|
||||
// Redirect to the asset management page with error
|
||||
return Redirect::to('admin/licenses')->with('error', Lang::get('admin/licenses/message.not_found'));
|
||||
}
|
||||
|
||||
$license = License::find($licenseseat->license_id);
|
||||
|
||||
// Declare the rules for the form validation
|
||||
$rules = array(
|
||||
@@ -579,6 +628,8 @@ class LicensesController extends AdminController
|
||||
// Update the asset data
|
||||
$licenseseat->assigned_to = NULL;
|
||||
$licenseseat->asset_id = NULL;
|
||||
|
||||
$user = Sentry::getUser();
|
||||
|
||||
// Was the asset updated?
|
||||
if($licenseseat->save()) {
|
||||
@@ -586,8 +637,47 @@ class LicensesController extends AdminController
|
||||
$logaction->location_id = NULL;
|
||||
$logaction->asset_type = 'software';
|
||||
$logaction->note = e(Input::get('note'));
|
||||
$logaction->user_id = Sentry::getUser()->id;
|
||||
$logaction->user_id = $user->id;
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
||||
if ($settings->slack_endpoint) {
|
||||
|
||||
|
||||
$slack_settings = [
|
||||
'username' => $settings->botname,
|
||||
'channel' => $settings->slack_channel,
|
||||
'link_names' => true
|
||||
];
|
||||
|
||||
$client = new \Maknz\Slack\Client($settings->slack_endpoint,$slack_settings);
|
||||
|
||||
try {
|
||||
$client->attach([
|
||||
'color' => 'good',
|
||||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked In:',
|
||||
'value' => strtoupper($logaction->asset_type).' <'.Config::get('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked in by <'.Config::get('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
'value' => e($logaction->note)
|
||||
],
|
||||
|
||||
]
|
||||
])->send('License Checked In');
|
||||
|
||||
} catch (Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$log = $logaction->logaction('checkin from');
|
||||
|
||||
|
||||
|
||||
if ($backto=='user') {
|
||||
return Redirect::to("admin/users/".$return_to.'/view')->with('success', Lang::get('admin/licenses/message.checkin.success'));
|
||||
|
||||
@@ -453,7 +453,7 @@ class ReportsController extends AdminController
|
||||
}
|
||||
}
|
||||
if (e(Input::get('depreciation')) == '1') {
|
||||
$depreciation = $asset->depreciate();
|
||||
$depreciation = $asset->getDepreciatedValue();
|
||||
$row[] = '"'.number_format($asset->purchase_cost).'"';
|
||||
$row[] = '"'.number_format($depreciation).'"';
|
||||
$row[] = '"'.number_format($asset->purchase_cost - $depreciation).'"';
|
||||
|
||||
@@ -70,6 +70,9 @@ class SettingsController extends AdminController
|
||||
"qr_text" => 'min:1|max:31',
|
||||
"logo" => 'mimes:jpeg,bmp,png,gif',
|
||||
"alert_email" => 'email',
|
||||
"slack_endpoint" => 'url',
|
||||
"slack_channel" => 'regex:/(?<!\w)#\w+/',
|
||||
"slack_botname" => 'alpha_dash',
|
||||
);
|
||||
|
||||
if (Config::get('app.lock_passwords')==false) {
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
<div class="col-md-9 bio">
|
||||
|
||||
@if ($license->serial)
|
||||
<div class="col-md-12" style="padding-bottom: 10px; margin-left: 15px;">
|
||||
<div class="col-md-12 col-sm-12" style="padding-bottom: 10px; margin-left: 15px; word-wrap: break-word;">
|
||||
<strong>@lang('admin/licenses/form.serial'): </strong>
|
||||
{{{ wordwrap($license->serial, 10, "\n", true) }}}
|
||||
{{{ $license->serial }}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
@endif
|
||||
|
||||
@if ($model->image)
|
||||
<li><br /><img src="/uploads/models/{{{ $model->image }}}" class="img-responsive" /></li>
|
||||
<li><br /><img src="{{ Config::get('app.url') }}/uploads/models/{{{ $model->image }}}" /></li>
|
||||
@endif
|
||||
|
||||
@if ($model->deleted_at!='')
|
||||
|
||||
@@ -53,9 +53,9 @@ padding: 0px 20px;
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (Config::get('app.lock_passwords')===true)
|
||||
{{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled')) }}
|
||||
{{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
@else
|
||||
{{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control')) }}
|
||||
{{ Form::text('site_name', Input::old('site_name', $setting->site_name), array('class' => 'form-control','placeholder' => 'Snipe-IT Asset Management')) }}
|
||||
|
||||
@endif
|
||||
|
||||
@@ -82,7 +82,7 @@ padding: 0px 20px;
|
||||
{{ Form::label('alert_email', Lang::get('admin/settings/general.alert_email')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::text('alert_email', Input::old('alert_email', $setting->alert_email), array('class' => 'form-control')) }}
|
||||
{{ Form::text('alert_email', Input::old('alert_email', $setting->alert_email), array('class' => 'form-control','placeholder' => 'admin@yourcompany.com')) }}
|
||||
|
||||
|
||||
{{ Form::checkbox('alerts_enabled', '1', Input::old('alerts_enabled', $setting->alerts_enabled)) }}
|
||||
@@ -181,10 +181,10 @@ padding: 0px 20px;
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if ($setting->qr_code == 1)
|
||||
{{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control')) }}
|
||||
{{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control','placeholder' => 'Property of Your Company')) }}
|
||||
{{ $errors->first('qr_text', '<br><span class="alert-msg">:message</span>') }}
|
||||
@else
|
||||
{{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control', 'disabled'=>'disabled')) }}
|
||||
{{ Form::text('qr_text', Input::old('qr_text', $setting->qr_text), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'Property of Your Company')) }}
|
||||
<p class="help-inline">
|
||||
@lang('admin/settings/general.qr_help')
|
||||
</p>
|
||||
@@ -210,7 +210,7 @@ padding: 0px 20px;
|
||||
{{ Form::label('default_eula_text', Lang::get('admin/settings/general.default_eula_text')) }}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control')) }}
|
||||
{{ Form::textarea('default_eula_text', Input::old('default_eula_text', $setting->default_eula_text), array('class' => 'form-control','placeholder' => 'Add your default EULA text')) }}
|
||||
{{ $errors->first('default_eula_text', '<br><span class="alert-msg">:message</span>') }}
|
||||
|
||||
<p class="help-inline">@lang('admin/settings/general.default_eula_help_text')</p>
|
||||
@@ -231,9 +231,9 @@ padding: 0px 20px;
|
||||
<div class="col-md-9">
|
||||
|
||||
@if (Config::get('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled')) }}
|
||||
{{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }}
|
||||
@else
|
||||
{{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control')) }}
|
||||
{{ Form::text('slack_endpoint', Input::old('slack_endpoint', $setting->slack_endpoint), array('class' => 'form-control','placeholder' => 'https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXX')) }}
|
||||
@endif
|
||||
|
||||
{{ $errors->first('slack_endpoint', '<br><span class="alert-msg">:message</span>') }}
|
||||
@@ -246,9 +246,9 @@ padding: 0px 20px;
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (Config::get('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','disabled'=>'disabled')) }}
|
||||
{{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','disabled'=>'disabled','placeholder' => '#IT-Ops')) }}
|
||||
@else
|
||||
{{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control')) }}
|
||||
{{ Form::text('slack_channel', Input::old('slack_channel', $setting->slack_channel), array('class' => 'form-control','placeholder' => '#IT-Ops')) }}
|
||||
@endif
|
||||
{{ $errors->first('slack_channel', '<br><span class="alert-msg">:message</span>') }}
|
||||
</div>
|
||||
@@ -260,9 +260,9 @@ padding: 0px 20px;
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
@if (Config::get('app.lock_passwords')===true)
|
||||
{{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','disabled'=>'disabled')) }}
|
||||
{{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','disabled'=>'disabled','placeholder' => 'Snipe-IT Bot')) }}
|
||||
@else
|
||||
{{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control')) }}
|
||||
{{ Form::text('slack_botname', Input::old('slack_botname', $setting->slack_botname), array('class' => 'form-control','placeholder' => 'Snipe-IT Bot')) }}
|
||||
@endif
|
||||
{{ $errors->first('slack_botname', '<br><span class="alert-msg">:message</span>') }}
|
||||
</div>
|
||||
|
||||
@@ -23,8 +23,17 @@
|
||||
({{{ $user->employee_num }}})
|
||||
@endif</h3>
|
||||
<span class="area">{{{ $user->jobtitle }}}
|
||||
|
||||
|
||||
<!-- groups table -->
|
||||
@if (count($user->groups) > 0)
|
||||
|
||||
</span>
|
||||
@foreach ($user->groups as $group)
|
||||
<a href="{{ route('update/group', $group->id) }}" class="badge badge-default">{{{ $group->name }}}</a>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
@if ($user->deleted_at != NULL)
|
||||
<a href="{{ route('restore/user', $user->id) }}" class="btn-flat white large pull-right edit"><i class="fa fa-pencil"></i> Restore This User</a>
|
||||
@@ -65,65 +74,36 @@
|
||||
|
||||
@endif
|
||||
|
||||
<h6>@lang('general.groups')</h6>
|
||||
<!-- groups table -->
|
||||
@if (count($user->groups) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->groups as $group)
|
||||
<tr>
|
||||
<td><a href="{{ route('update/group', $group->id) }}">{{{ $group->name }}}</a></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>
|
||||
@lang('general.no_results')
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<br><br><br>
|
||||
<h6>@lang('admin/users/general.assets_user', array('name' => $user->first_name))</h6>
|
||||
<br>
|
||||
<!-- checked out assets table -->
|
||||
@if (count($user->assets) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Asset Type</th>
|
||||
<th class="col-md-2">Asset Tag</th>
|
||||
<th class="col-md-2">Name</th>
|
||||
<th class="col-md-1 hidden-print">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1') {{{ $asset->model->name }}}
|
||||
@endif
|
||||
</td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{{ $asset->asset_tag }}}</a></td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{{ $asset->name }}}</a></td>
|
||||
|
||||
<td class="hidden-print"> <a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn-flat info">Checkin</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-responsive">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">Asset Type</th>
|
||||
<th class="col-md-2">Asset Tag</th>
|
||||
<th class="col-md-2">Name</th>
|
||||
<th class="col-md-1 hidden-print">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($user->assets as $asset)
|
||||
<tr>
|
||||
<td>
|
||||
@if ($asset->physical=='1') {{{ $asset->model->name }}}
|
||||
@endif
|
||||
</td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{{ $asset->asset_tag }}}</a></td>
|
||||
<td><a href="{{ route('view/hardware', $asset->id) }}">{{{ $asset->name }}}</a></td>
|
||||
|
||||
<td class="hidden-print"> <a href="{{ route('checkin/hardware', array('assetId'=> $asset->id, 'backto'=>'user')) }}" class="btn-flat info">Checkin</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
|
||||
<div class="col-md-12">
|
||||
@@ -134,13 +114,13 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<br><br><br>
|
||||
<br>
|
||||
<h6>@lang('admin/users/general.software_user', array('name' => $user->first_name))</h6>
|
||||
<br>
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->licenses) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="display">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">Name</th>
|
||||
@@ -160,7 +140,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
||||
<div class="col-md-12">
|
||||
@@ -174,13 +153,13 @@
|
||||
|
||||
|
||||
|
||||
<br><br><br>
|
||||
<br>
|
||||
<h6>@lang('general.accessories')</h6>
|
||||
<br>
|
||||
<!-- checked out licenses table -->
|
||||
@if (count($user->accessories) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="display">
|
||||
<table class="display table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-5">Name</th>
|
||||
@@ -198,7 +177,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
|
||||
<div class="col-md-12">
|
||||
@@ -211,11 +189,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<h6>@lang('admin/users/general.history_user', array('name' => $user->first_name))</h6>
|
||||
<br>
|
||||
<!-- checked out assets table -->
|
||||
@if (count($user->userlog) > 0)
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -247,6 +226,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
|
||||
|
||||
@@ -259,17 +239,18 @@
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- side address column -->
|
||||
<div class="col-md-3 address pull-right hidden-print">
|
||||
|
||||
|
||||
|
||||
<h6> @lang('admin/users/general.contact_user', array('name' => $user->first_name)) </h6>
|
||||
|
||||
@if ($user->location_id)
|
||||
<div class="col-md-12">
|
||||
<iframe width="300" height="133" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&q={{{ $user->userloc->address }}},{{{ $user->userloc->city }}},{{{ strtoupper($user->userloc->state) }}},{{{ strtoupper($user->userloc->country) }}}&output=embed" style="float: none;"></iframe>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<iframe width="300" height="133" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?&q={{{ $user->userloc->address }}},{{{ $user->userloc->city }}},{{{ strtoupper($user->userloc->state) }}},{{{ strtoupper($user->userloc->country) }}}&output=embed" style="float: none;"></iframe>
|
||||
</div>
|
||||
@endif
|
||||
<ul>
|
||||
@if ($user->phone)
|
||||
@@ -292,11 +273,15 @@
|
||||
{{{ $user->notes }}}</li>
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($user->last_login!='')
|
||||
<br /><h6>@lang('admin/users/general.last_login')
|
||||
{{{ $user->last_login->diffForHumans() }}}</h6>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
border: 2px solid #e9ecee;
|
||||
position: relative;
|
||||
top: 3px;
|
||||
width: 120px;
|
||||
}
|
||||
.user-profile .header .name {
|
||||
font-weight: 600;
|
||||
|
||||
Reference in New Issue
Block a user