mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Hopefully fixes tons of PEBKAC where users have the wrong app.url
This commit is contained in:
parent
8e5977ad84
commit
863e200430
|
@ -336,7 +336,7 @@ class AccessoriesController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked Out:',
|
||||
'value' => 'Accessory <'.config('app.url').'/admin/accessories/'.$accessory->id.'/view'.'|'.$accessory->name.'> checked out to <'.config('app.url').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.config('app.url').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
'value' => 'Accessory <'.\URL::to('/').'/admin/accessories/'.$accessory->id.'/view'.'|'.$accessory->name.'> checked out to <'.\URL::to('/').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.\URL::to('/').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
@ -456,7 +456,7 @@ class AccessoriesController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked In:',
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' <'.config('app.url').'/admin/accessories/'.e($accessory->id).'/view'.'|'.e($accessory->name).'> checked in by <'.config('app.url').'/admin/users/'.e($admin_user->id).'/view'.'|'.e($admin_user->fullName()).'>.'
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' <'.\URL::to('/').'/admin/accessories/'.e($accessory->id).'/view'.'|'.e($accessory->name).'> checked in by <'.\URL::to('/').'/admin/users/'.e($admin_user->id).'/view'.'|'.e($admin_user->fullName()).'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
|
|
@ -461,7 +461,7 @@ class AssetModelsController extends Controller
|
|||
'id' => $model->id,
|
||||
'manufacturer' => (string)link_to('/admin/settings/manufacturers/'.$model->manufacturer->id.'/view', $model->manufacturer->name),
|
||||
'name' => (string)link_to('/hardware/models/'.$model->id.'/view', $model->name),
|
||||
'image' => ($model->image!='') ? '<img src="'.config('app.url').'/uploads/models/'.$model->image.'" height=50 width=50>' : '',
|
||||
'image' => ($model->image!='') ? '<img src="'.\URL::to('/').'/uploads/models/'.$model->image.'" height=50 width=50>' : '',
|
||||
'modelnumber' => $model->model_number,
|
||||
'numassets' => $model->assets->count(),
|
||||
'depreciation' => (($model->depreciation) && ($model->depreciation->id > 0)) ? $model->depreciation->name.' ('.$model->depreciation->months.')' : trans('general.no_depreciation'),
|
||||
|
|
|
@ -150,7 +150,7 @@ class AssetsController extends Controller
|
|||
$asset = new Asset();
|
||||
$asset->model()->associate(AssetModel::find(e(Input::get('model_id'))));
|
||||
|
||||
$checkModel = config('app.url').'/api/models/'.e(Input::get('model_id')).'/check';
|
||||
$checkModel = \URL::to('/').'/api/models/'.e(Input::get('model_id')).'/check';
|
||||
|
||||
$asset->name = e(Input::get('name'));
|
||||
$asset->serial = e(Input::get('serial'));
|
||||
|
@ -659,7 +659,7 @@ class AssetsController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked In:',
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' asset <'.config('app.url').'/hardware/'.$asset->id.'/view'.'|'.e($asset->showAssetName()).'> checked in by <'.config('app.url').'/admin/users/'.Auth::user()->id.'/view'.'|'.e(Auth::user()->fullName()).'>.'
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' asset <'.\URL::to('/').'/hardware/'.$asset->id.'/view'.'|'.e($asset->showAssetName()).'> checked in by <'.\URL::to('/').'/admin/users/'.Auth::user()->id.'/view'.'|'.e(Auth::user()->fullName()).'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
@ -1793,14 +1793,14 @@ class AssetsController extends Controller
|
|||
$row = array(
|
||||
'checkbox' =>'<div class="text-center"><input type="checkbox" name="edit_asset['.$asset->id.']" class="one_required"></div>',
|
||||
'id' => $asset->id,
|
||||
'image' => (($asset->image) && ($asset->image!='')) ? '<img src="'.config('app.url').'/uploads/assets/'.$asset->image.'" height=50 width=50>' : ((($asset->model) && ($asset->model->image!='')) ? '<img src="'.config('app.url').'/uploads/models/'.$asset->model->image.'" height=40 width=50>' : ''),
|
||||
'image' => (($asset->image) && ($asset->image!='')) ? '<img src="'.\URL::to('/').'/uploads/assets/'.$asset->image.'" height=50 width=50>' : ((($asset->model) && ($asset->model->image!='')) ? '<img src="'.\URL::to('/').'/uploads/models/'.$asset->model->image.'" height=40 width=50>' : ''),
|
||||
'name' => '<a title="'.e($asset->name).'" href="hardware/'.$asset->id.'/view">'.e($asset->name).'</a>',
|
||||
'asset_tag' => '<a title="'.e($asset->asset_tag).'" href="hardware/'.$asset->id.'/view">'.e($asset->asset_tag).'</a>',
|
||||
'serial' => e($asset->serial),
|
||||
'model' => ($asset->model) ? (string)link_to('/hardware/models/'.$asset->model->id.'/view', e($asset->model->name)) : 'No model',
|
||||
'model_number' => ($asset->model && $asset->model->model_number) ? (string)$asset->model->model_number : '',
|
||||
'status_label' => ($asset->assigneduser) ? 'Deployed' : ((e($asset->assetstatus)) ? e($asset->assetstatus->name) : ''),
|
||||
'assigned_to' => ($asset->assigneduser) ? (string)link_to(config('app.url').'/admin/users/'.$asset->assigned_to.'/view', e($asset->assigneduser->fullName())) : '',
|
||||
'assigned_to' => ($asset->assigneduser) ? (string)link_to(\URL::to('/').'/admin/users/'.$asset->assigned_to.'/view', e($asset->assigneduser->fullName())) : '',
|
||||
'location' => (($asset->assigneduser) && ($asset->assigneduser->userloc!='')) ? (string)link_to('admin/settings/locations/'.$asset->assigneduser->userloc->id.'/view', e($asset->assigneduser->userloc->name)) : (($asset->defaultLoc!='') ? (string)link_to('admin/settings/locations/'.$asset->defaultLoc->id.'/view', e($asset->defaultLoc->name)) : ''),
|
||||
'category' => (($asset->model) && ($asset->model->category)) ?(string)link_to('/admin/settings/categories/'.$asset->model->category->id.'/view', e($asset->model->category->name)) : '',
|
||||
'manufacturer' => (($asset->model) && ($asset->model->manufacturer)) ? (string)link_to('/admin/settings/manufacturers/'.$asset->model->manufacturer->id.'/view', e($asset->model->manufacturer->name)) : '',
|
||||
|
@ -1808,7 +1808,7 @@ class AssetsController extends Controller
|
|||
'purchase_cost' => $purchase_cost,
|
||||
'purchase_date' => ($asset->purchase_date) ? $asset->purchase_date : '',
|
||||
'notes' => e($asset->notes),
|
||||
'order_number' => ($asset->order_number!='') ? '<a href="'.config('app.url').'/hardware?order_number='.e($asset->order_number).'">'.e($asset->order_number).'</a>' : '',
|
||||
'order_number' => ($asset->order_number!='') ? '<a href="'.\URL::to('/').'/hardware?order_number='.e($asset->order_number).'">'.e($asset->order_number).'</a>' : '',
|
||||
'last_checkout' => ($asset->last_checkout!='') ? e($asset->last_checkout) : '',
|
||||
'expected_checkin' => ($asset->expected_checkin!='') ? e($asset->expected_checkin) : '',
|
||||
'created_at' => ($asset->created_at!='') ? e($asset->created_at->format('F j, Y h:iA')) : '',
|
||||
|
|
|
@ -372,7 +372,7 @@ class ComponentsController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked Out:',
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' <'.config('app.url').'/admin/components/'.$component->id.'/view'.'|'.$component->name.'> checked out to <'.config('app.url').'/hardware/'.$asset->id.'/view|'.$asset->showAssetName().'> by <'.config('app.url').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' <'.\URL::to('/').'/admin/components/'.$component->id.'/view'.'|'.$component->name.'> checked out to <'.\URL::to('/').'/hardware/'.$asset->id.'/view|'.$asset->showAssetName().'> by <'.\URL::to('/').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
|
|
@ -337,7 +337,7 @@ class ConsumablesController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked Out:',
|
||||
'value' => 'Consumable <'.config('app.url').'/admin/consumables/'.$consumable->id.'/view'.'|'.$consumable->name.'> checked out to <'.config('app.url').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.config('app.url').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
'value' => 'Consumable <'.\URL::to('/').'/admin/consumables/'.$consumable->id.'/view'.'|'.$consumable->name.'> checked out to <'.\URL::to('/').'/admin/users/'.$user->id.'/view|'.$user->fullName().'> by <'.\URL::to('/').'/admin/users/'.$admin_user->id.'/view'.'|'.$admin_user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
|
|
@ -551,9 +551,9 @@ class LicensesController extends Controller
|
|||
|
||||
// Update the asset data
|
||||
if (e(Input::get('assigned_to')) == '') {
|
||||
$slack_msg = 'License <'.config('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.config('app.url').'/hardware/'.$asset->id.'/view|'.$asset->showAssetName().'> by <'.config('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
$slack_msg = 'License <'.\URL::to('/').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.\URL::to('/').'/hardware/'.$asset->id.'/view|'.$asset->showAssetName().'> by <'.\URL::to('/').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
} else {
|
||||
$slack_msg = 'License <'.config('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.config('app.url').'/admin/users/'.$user->id.'/view|'.$is_assigned_to->fullName().'> by <'.config('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
$slack_msg = 'License <'.\URL::to('/').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked out to <'.\URL::to('/').'/admin/users/'.$user->id.'/view|'.$is_assigned_to->fullName().'> by <'.\URL::to('/').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.';
|
||||
}
|
||||
|
||||
|
||||
|
@ -703,7 +703,7 @@ class LicensesController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'Checked In:',
|
||||
'value' => 'License: <'.config('app.url').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked in by <'.config('app.url').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.'
|
||||
'value' => 'License: <'.\URL::to('/').'/admin/licenses/'.$license->id.'/view'.'|'.$license->name.'> checked in by <'.\URL::to('/').'/admin/users/'.$user->id.'/view'.'|'.$user->fullName().'>.'
|
||||
],
|
||||
[
|
||||
'title' => 'Note:',
|
||||
|
|
|
@ -419,7 +419,7 @@ class LocationsController extends Controller
|
|||
|
||||
foreach ($assets as $asset) {
|
||||
$rows[] = array(
|
||||
'name' => (string)link_to(config('app.url').'/hardware/'.$asset->id.'/view', e($asset->showAssetName())),
|
||||
'name' => (string)link_to(\URL::to('/').'/hardware/'.$asset->id.'/view', e($asset->showAssetName())),
|
||||
'asset_tag' => e($asset->asset_tag),
|
||||
'serial' => e($asset->serial),
|
||||
'model' => e($asset->model->name),
|
||||
|
|
|
@ -59,9 +59,9 @@ class SettingsController extends Controller
|
|||
}
|
||||
$pageURL = $protocol . $host . $_SERVER['REQUEST_URI'];
|
||||
|
||||
$start_settings['url_valid'] = (config('app.url').'/setup' === $pageURL);
|
||||
$start_settings['url_valid'] = (\URL::to('/').'/setup' === $pageURL);
|
||||
|
||||
$start_settings['url_config'] = config('app.url');
|
||||
$start_settings['url_config'] = \URL::to('/');
|
||||
$start_settings['real_url'] = $pageURL;
|
||||
|
||||
$exposed_env = @file_get_contents($protocol . $host.'/.env');
|
||||
|
|
|
@ -974,7 +974,7 @@ class UsersController extends Controller
|
|||
$actions = '<nobr>';
|
||||
|
||||
foreach ($user->groups as $group) {
|
||||
$group_names .= '<a href="' . config('app.url') . '/admin/groups/' . $group->id . '/edit" class="label label-default">' . $group->name . '</a> ';
|
||||
$group_names .= '<a href="' . \URL::to('/') . '/admin/groups/' . $group->id . '/edit" class="label label-default">' . $group->name . '</a> ';
|
||||
}
|
||||
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ class UsersController extends Controller
|
|||
$rows[] = array(
|
||||
'id' => $user->id,
|
||||
'checkbox' => ($status!='deleted') ? '<div class="text-center hidden-xs hidden-sm"><input type="checkbox" name="edit_user['.e($user->id).']" class="one_required"></div>' : '',
|
||||
'name' => '<a title="'.e($user->fullName()).'" href="'.config('app.url').'/admin/users/'.e($user->id).'/view">'.e($user->fullName()).'</a>',
|
||||
'name' => '<a title="'.e($user->fullName()).'" href="'.\URL::to('/').'/admin/users/'.e($user->id).'/view">'.e($user->fullName()).'</a>',
|
||||
'jobtitle' => e($user->jobtitle),
|
||||
'email' => ($user->email!='') ?
|
||||
'<a href="mailto:'.e($user->email).'" class="hidden-md hidden-lg">'.e($user->email).'</a>'
|
||||
|
@ -1023,7 +1023,7 @@ class UsersController extends Controller
|
|||
.'</span>' : '',
|
||||
'username' => e($user->username),
|
||||
'location' => ($user->userloc) ? e($user->userloc->name) : '',
|
||||
'manager' => ($user->manager) ? '<a title="' . e($user->manager->fullName()) . '" href="'.config('app.url').'/' . e($user->manager->id) . '/view">' . e($user->manager->fullName()) . '</a>' : '',
|
||||
'manager' => ($user->manager) ? '<a title="' . e($user->manager->fullName()) . '" href="'.\URL::to('/').'/' . e($user->manager->id) . '/view">' . e($user->manager->fullName()) . '</a>' : '',
|
||||
'assets' => $user->assets->count(),
|
||||
'employee_num' => e($user->employee_num),
|
||||
'licenses' => $user->licenses->count(),
|
||||
|
|
|
@ -109,10 +109,10 @@ class ViewAssetsController extends Controller
|
|||
|
||||
if ($fullItemType == Asset::class) {
|
||||
$data['item_url'] = route('view/hardware', $item->id);
|
||||
$slackMessage = ' Asset <'.config('app.url').'/hardware/'.$item->id.'/view'.'|'.$item->showAssetName().'> requested by <'.config('app.url').'/users/'.$item->user_id.'/view'.'|'.$user->fullName().'>.';
|
||||
$slackMessage = ' Asset <'.\URL::to('/').'/hardware/'.$item->id.'/view'.'|'.$item->showAssetName().'> requested by <'.\URL::to('/').'/users/'.$item->user_id.'/view'.'|'.$user->fullName().'>.';
|
||||
} else {
|
||||
$data['item_url'] = route("view/${itemType}", $item->id);
|
||||
$slackMessage = $quantity. ' ' . class_basename(strtoupper($logaction->item_type)).' <'.$data['item_url'].'|'.$item->name.'> requested by <'.config('app.url').'/user/'.$item->id.'/view'.'|'.$user->fullName().'>.';
|
||||
$slackMessage = $quantity. ' ' . class_basename(strtoupper($logaction->item_type)).' <'.$data['item_url'].'|'.$item->name.'> requested by <'.\URL::to('/').'/user/'.$item->id.'/view'.'|'.$user->fullName().'>.';
|
||||
}
|
||||
|
||||
$settings = Setting::getSettings();
|
||||
|
@ -259,7 +259,7 @@ class ViewAssetsController extends Controller
|
|||
'fields' => [
|
||||
[
|
||||
'title' => 'REQUESTED:',
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' asset <'.config('app.url').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> requested by <'.config('app.url').'/hardware/'.$asset->id.'/view'.'|'.Auth::user()->fullName().'>.'
|
||||
'value' => class_basename(strtoupper($logaction->item_type)).' asset <'.\URL::to('/').'/hardware/'.$asset->id.'/view'.'|'.$asset->showAssetName().'> requested by <'.\URL::to('/').'/hardware/'.$asset->id.'/view'.'|'.Auth::user()->fullName().'>.'
|
||||
]
|
||||
|
||||
]
|
||||
|
|
|
@ -22,14 +22,14 @@ class CheckForSetup
|
|||
if (Setting::setupCompleted()) {
|
||||
|
||||
if ($request->is('setup*')) {
|
||||
return redirect(config('app.url'));
|
||||
return redirect(\URL::to('/'));
|
||||
} else {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!($request->is('setup*')) && !($request->is('.env'))) {
|
||||
return redirect(config('app.url').'/setup')->with('Request', $request);
|
||||
return redirect(\URL::to('/').'/setup')->with('Request', $request);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<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="{{ config('app.url') }}/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
|
||||
<img src="{{ URL::to('/') }}/uploads/avatars/{{ $user->avatar }}" class="avatar img-circle">
|
||||
{!! $errors->first('avatar_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -46,10 +46,10 @@ View Assets for {{ $user->fullName() }}
|
|||
<td>
|
||||
|
||||
@if (($asset->image) && ($asset->image!=''))
|
||||
<img src="{{ config('app.url') }}/uploads/assets/{{ $asset->image }}" height="50" width="50">
|
||||
<img src="{{ URL::to('/') }}/uploads/assets/{{ $asset->image }}" height="50" width="50">
|
||||
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<img src="{{ config('app.url') }}/uploads/models/{{ $asset->model->image }}" height="50" width="50">
|
||||
<img src="{{ URL::to('/') }}/uploads/models/{{ $asset->model->image }}" height="50" width="50">
|
||||
@endif
|
||||
|
||||
</td>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<button class="btn btn-lg btn-primary btn-block">{{ trans('auth/general.login') }}</button>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 text-right" style="padding-top: 10px;">
|
||||
<a href="{{ config('app.url') }}/password/reset">{{ trans('auth/general.forgot_password') }}</a>
|
||||
<a href="{{ URL::to('/') }}/password/reset">{{ trans('auth/general.forgot_password') }}</a>
|
||||
</div>
|
||||
</div> <!-- end login box -->
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<p><blockquote>{!! $eula !!}</blockquote></p>
|
||||
|
||||
@if ($require_acceptance==1)
|
||||
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
<p><strong><a href="{{ URL::to('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<p><blockquote>{!! $eula !!}</blockquote></p>
|
||||
|
||||
@if ($require_acceptance==1)
|
||||
<p><strong><a href="{{ config('app.url') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
<p><strong><a href="{{ URL::to('/') }}/account/accept-asset/{{ $log_id }}">{{ trans('mail.i_have_read') }}</a></strong></p>
|
||||
@endif
|
||||
|
||||
<p>{{ $snipeSettings->site_name }}</p>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<p>{{ trans('mail.a_user_canceled') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
<p>{{ trans('mail.a_user_canceled') }} <a href="{{ URL::to('/') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
|
||||
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
<p>{{ trans('mail.user') }} <a href="{{ URL::to('/') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
|
||||
{{ trans('mail.canceled') }} {{ $requested_date }}
|
||||
</p>
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
@section('content')
|
||||
|
||||
<p>{{ trans('mail.a_user_requested') }} <a href="{{ config('app.url') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
<p>{{ trans('mail.a_user_requested') }} <a href="{{ URL::to('/') }}"> {{ $snipeSettings->site_name }}</a>. </p>
|
||||
|
||||
<p>{{ trans('mail.user') }} <a href="{{ config('app.url') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
<p>{{ trans('mail.user') }} <a href="{{ URL::to('/') }}/admin/users/{{ $user_id }}/view">{{ $requested_by }}</a><br>
|
||||
{{ trans('mail.item') }} <a href="{{ $item_url }}">{{ $item_name }}</a> ({{ $item_type }}) <br>
|
||||
{{ trans('mail.requested') }} {{ $requested_date }}
|
||||
@if ($item_quantity > 1)
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
{{ trans('mail.login_first_admin') }}
|
||||
|
||||
URL: {{ config('app.url') }}
|
||||
URL: {{ URL::to('/') }}
|
||||
{{ trans('mail.username') }} {{ $username }}
|
||||
{{ trans('mail.password') }} {{ $password }}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
@for($i=0; $count > $i; $i++)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ config('app.url') }}/admin/{{ $data[$i]['type'] }}/{{ $data[$i]['id'] }}/view">{{ $data[$i]['name'] }}</a>
|
||||
<a href="{{ URL::to('/') }}/admin/{{ $data[$i]['type'] }}/{{ $data[$i]['id'] }}/view">{{ $data[$i]['name'] }}</a>
|
||||
</td>
|
||||
<td>{{ $data[$i]['type'] }}</td>
|
||||
<td>{{ $data[$i]['remaining'] }}</td>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<p>{{ trans('mail.admin_has_created', ['web' => $snipeSettings->site_name]) }} </p>
|
||||
|
||||
<p>URL: <a href="{{ config('app.url') }}">{{ config('app.url') }}</a><br>
|
||||
<p>URL: <a href="{{ URL::to('/') }}">{{ URL::to('/') }}</a><br>
|
||||
{{ trans('mail.login') }} {{ $username }} <br>
|
||||
{{ trans('mail.password') }} {{ $password }}
|
||||
</p>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="col-md-12">
|
||||
|
||||
<div class="error-page" style="padding-top: 200px">
|
||||
<img src="{{ config('app.url') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<img src="{{ URL::to('/') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-yellow"></i> 403 Forbidden.</h3>
|
||||
<p>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="col-md-12">
|
||||
|
||||
<div class="error-page" style="padding-top: 200px">
|
||||
<img src="{{ config('app.url') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<img src="{{ URL::to('/') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<div class="error-content">
|
||||
<h3><i class="fa fa-warning text-yellow"></i> 404 Page not found.</h3>
|
||||
<p>
|
||||
|
|
|
@ -14,9 +14,9 @@ System Unavailable
|
|||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
|
||||
<div class="error-page" style="padding-top: 200px">
|
||||
<img src="{{ \URL::to('/') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<img src="{{ URL::to('/') }}/assets/img/sad-panda.png" style="width: 200px; height: 200px;" class="pull-left">
|
||||
<div class="error-content">
|
||||
<h2><i class="fa fa-warning text-yellow"></i> System Unavailable</h2>
|
||||
<p>
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
});
|
||||
data._token = '{{ csrf_token() }}',
|
||||
// console.dir(data);
|
||||
$.post("{{config('app.url') }}/api/"+model+"s",data,function (result) {
|
||||
$.post("{{URL::to('/') }}/api/"+model+"s",data,function (result) {
|
||||
var id=result.id;
|
||||
var name=result.name || (result.first_name+" "+result.last_name);
|
||||
$('.modal-body input:visible').val("");
|
||||
|
@ -252,7 +252,7 @@ $(function() {
|
|||
$('#current_assets_box').fadeOut();
|
||||
$('#current_assets_content').html("");
|
||||
} else {
|
||||
$.get("{{config('app.url') }}/api/users/"+userid+"/assets",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
$.get("{{URL::to('/') }}/api/users/"+userid+"/assets",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
// console.warn("Ajax call came back okay for user " + userid + "! " + data.length + " Data is: "+data);
|
||||
if (data.length > 0) {
|
||||
$('#current_assets_box').fadeIn();
|
||||
|
@ -260,7 +260,7 @@ $(function() {
|
|||
$('#current_assets_content').append('');
|
||||
for (var i in data) {
|
||||
var asset = data[i];
|
||||
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ config('app.url') }}/hardware/" + asset.id + "/view\">" + asset.name;
|
||||
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ URL::to('/') }}/hardware/" + asset.id + "/view\">" + asset.name;
|
||||
if (asset.model.name!='') {
|
||||
table_html += " (" + asset.model.name + ")";
|
||||
}
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
data._token = '{{ csrf_token() }}',
|
||||
// console.dir(data);
|
||||
|
||||
$.post("{{config('app.url') }}/api/"+model+"s",data,function (result) {
|
||||
$.post("{{URL::to('/') }}/api/"+model+"s",data,function (result) {
|
||||
var id=result.id;
|
||||
var name=result.name || (result.first_name+" "+result.last_name);
|
||||
$('.modal-body input:visible').val("");
|
||||
|
@ -309,7 +309,7 @@ $(function() {
|
|||
$('#current_assets_content').html("");
|
||||
} else {
|
||||
|
||||
$.get("{{config('app.url') }}/api/users/"+userid+"/assets",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
$.get("{{URL::to('/') }}/api/users/"+userid+"/assets",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
// console.warn("Ajax call came back okay for user " + userid + "! " + data.length + " Data is: "+data);
|
||||
if (data.length > 0) {
|
||||
$('#current_assets_box').fadeIn();
|
||||
|
@ -320,7 +320,7 @@ $(function() {
|
|||
|
||||
for (var i in data) {
|
||||
var asset = data[i];
|
||||
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ config('app.url') }}/hardware/" + asset.id + "/view\">" + asset.name;
|
||||
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ URL::to('/') }}/hardware/" + asset.id + "/view\">" + asset.name;
|
||||
if (asset.model.name!='') {
|
||||
table_html += " (" + asset.model.name + ")";
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ if ($item->id && $item->assetloc) {
|
|||
<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="{{ config('app.url') }}/uploads/assets/{{ $item->image }}" />
|
||||
<img src="{{ URL::to('/') }}/uploads/assets/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -143,7 +143,7 @@ if ($item->id && $item->assetloc) {
|
|||
if(modelid=='') {
|
||||
$('#custom_fields_content').html("");
|
||||
} else {
|
||||
$.get("{{config('app.url') }}/hardware/models/"+modelid+"/custom_fields",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
$.get("{{URL::to('/') }}/hardware/models/"+modelid+"/custom_fields",{_token: "{{ csrf_token() }}"},function (data) {
|
||||
$('#custom_fields_content').html(data);
|
||||
});
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ if ($item->id && $item->assetloc) {
|
|||
if(status_id!=''){
|
||||
$(".status_spinner").css("display", "inline");
|
||||
$.ajax({
|
||||
url: "{{config('app.url') }}/api/statuslabels/"+status_id+"/deployable",
|
||||
url: "{{URL::to('/') }}/api/statuslabels/"+status_id+"/deployable",
|
||||
success: function(data) {
|
||||
$(".status_spinner").css("display", "none");
|
||||
|
||||
|
@ -371,7 +371,7 @@ $(function () {
|
|||
data._token = '{{ csrf_token() }}',
|
||||
//console.dir(data);
|
||||
|
||||
$.post("{{config('app.url') }}/api/"+model+"s",data,function (result) {
|
||||
$.post("{{URL::to('/') }}/api/"+model+"s",data,function (result) {
|
||||
var id=result.id;
|
||||
var name=result.name || (result.first_name+" "+result.last_name);
|
||||
$('.modal-body input:visible').val("");
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
<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="{{ config('app.url') }}/api/hardware/import" accept="text/csv">
|
||||
<input id="fileupload" type="file" name="files[]" data-url="{{ URL::to('/') }}/api/hardware/import" accept="text/csv">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-9" id="progress-container" style="visibility: hidden; padding-bottom: 20px;">
|
||||
|
|
|
@ -355,13 +355,13 @@
|
|||
<div class="col-md-4">
|
||||
|
||||
@if ($asset->image)
|
||||
<img src="{{ config('app.url') }}/uploads/assets/{{{ $asset->image }}}" class="assetimg img-responsive">
|
||||
<img src="{{ URL::to('/') }}/uploads/assets/{{{ $asset->image }}}" class="assetimg img-responsive">
|
||||
@elseif ($asset->model->image!='')
|
||||
<img src="{{ config('app.url') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
|
||||
<img src="{{ URL::to('/') }}/uploads/models/{{{ $asset->model->image }}}" class="assetimg img-responsive">
|
||||
@endif
|
||||
|
||||
@if ($snipeSettings->qr_code=='1')
|
||||
<img src="{{ config('app.url') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
|
||||
<img src="{{ URL::to('/') }}/hardware/{{ $asset->id }}/qr_code" class="img-thumbnail pull-right" style="height: 100px; width: 100px; margin-right: 10px;">
|
||||
@endif
|
||||
|
||||
@if (($asset->assigneduser) && ($asset->assigned_to > 0) && ($asset->deleted_at==''))
|
||||
|
@ -537,7 +537,7 @@
|
|||
<td class="text-right"><nobr>{{ $use_currency.$assetMaintenance->cost }}</nobr></td>
|
||||
<td>
|
||||
@if ($assetMaintenance->admin)
|
||||
<a href="{{ config('app.url') }}/admin/users/{{ $assetMaintenance->admin->id }}/view">{{ $assetMaintenance->admin->fullName() }}</a>
|
||||
<a href="{{ URL::to('/') }}/admin/users/{{ $assetMaintenance->admin->id }}/view">{{ $assetMaintenance->admin->fullName() }}</a>
|
||||
@endif
|
||||
</td>
|
||||
<?php $totalCost += $assetMaintenance->cost; ?>
|
||||
|
|
|
@ -109,21 +109,21 @@
|
|||
<ul class="nav navbar-nav navbar-left">
|
||||
<li class="left-navblock">
|
||||
@if ($snipeSettings->brand == '3')
|
||||
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
<a class="logo navbar-brand no-hover" href="{{ URL::to('/') }}">
|
||||
<img class="navbar-brand-img" src="{{ URL::to('/') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
{{ $snipeSettings->site_name }}
|
||||
</a>
|
||||
@elseif ($snipeSettings->brand == '2')
|
||||
<a class="logo navbar-brand no-hover" href="{{ config('app.url') }}">
|
||||
<img class="navbar-brand-img" src="{{ config('app.url') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
<a class="logo navbar-brand no-hover" href="{{ URL::to('/') }}">
|
||||
<img class="navbar-brand-img" src="{{ URL::to('/') }}/uploads/{{ $snipeSettings->logo }}">
|
||||
</a>
|
||||
@else
|
||||
<a class="logo no-hover" href="{{ config('app.url') }}">
|
||||
<a class="logo no-hover" href="{{ URL::to('/') }}">
|
||||
{{ $snipeSettings->site_name }}
|
||||
</a>
|
||||
@endif
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
<!-- Navbar Right Menu -->
|
||||
<div class="navbar-custom-menu">
|
||||
|
@ -252,7 +252,7 @@
|
|||
@for($i=0; count($alert_items) > $i; $i++)
|
||||
|
||||
<li><!-- Task item -->
|
||||
<a href="{{ config('app.url') }}/admin/{{ $alert_items[$i]['type'] }}/{{ $alert_items[$i]['id'] }}/view">
|
||||
<a href="{{ URL::to('/') }}/admin/{{ $alert_items[$i]['type'] }}/{{ $alert_items[$i]['id'] }}/view">
|
||||
<h3>{{ $alert_items[$i]['name'] }}
|
||||
<small class="pull-right">
|
||||
{{ $alert_items[$i]['remaining'] }} remaining
|
||||
|
@ -389,7 +389,7 @@
|
|||
</a>
|
||||
<!-- Sidebar toggle button-->
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="main-sidebar">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
//start ajax request
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: "{{config('app.url') }}/api/locations/"+id+"/check",
|
||||
url: "{{URL::to('/') }}/api/locations/"+id+"/check",
|
||||
//force to handle it as text
|
||||
dataType: "text",
|
||||
success: function(data) {
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete') }}
|
||||
<img src="{{ config('app.url') }}/uploads/models/{{ $item->image }}" />
|
||||
<img src="{{ URL::to('/') }}/uploads/models/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg"><br>:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -98,13 +98,13 @@
|
|||
|
||||
@if ($model->fieldset)
|
||||
<li>{{ trans('admin/models/general.fieldset') }}:
|
||||
<a href="{{ config('app.url') }}/admin/custom_fields/{{ $model->fieldset->id }}">{{ $model->fieldset->name }}</a>
|
||||
<a href="{{ URL::to('/') }}/admin/custom_fields/{{ $model->fieldset->id }}">{{ $model->fieldset->name }}</a>
|
||||
</li>
|
||||
|
||||
@endif
|
||||
|
||||
@if ($model->image)
|
||||
<li><br /><img src="{{ config('app.url') }}/uploads/models/{{ $model->image }}" class="img-responsive"></li>
|
||||
<li><br /><img src="{{ URL::to('/') }}/uploads/models/{{ $model->image }}" class="img-responsive"></li>
|
||||
@endif
|
||||
|
||||
@if ($model->deleted_at!='')
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
<td>{{ is_null($assetItem->company) ? '' : $assetItem->company->name }}</td>
|
||||
<td>{{ $assetItem->model->category->name }}</td>
|
||||
<td>{{ $assetItem->model->name }}</td>
|
||||
<td>{{ link_to(config('app.url').'/hardware/'.$assetItem->id.'/view',$assetItem->showAssetName()) }}</td>
|
||||
<td>{{ link_to(URL::to('/').'/hardware/'.$assetItem->id.'/view',$assetItem->showAssetName()) }}</td>
|
||||
<td>{{ $assetItem->asset_tag }}</td>
|
||||
<td>{{ link_to(config('app.url').'/admin/users/'.$assetItem->assigned_to.'/view', $assetItem->assigneduser->fullName())}}</td>
|
||||
<td>{{ link_to(URL::to('/').'/admin/users/'.$assetItem->assigned_to.'/view', $assetItem->assigneduser->fullName())}}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
|
|
|
@ -21,7 +21,7 @@ Create a User ::
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<p>Click here to go to your app login! <a href="{{ config('app.url') }}">{{ config('app.url') }}</a></p>
|
||||
<p>Click here to go to your app login! <a href="{{ URL::to('/') }}">{{ URL::to('/') }}</a></p>
|
||||
|
||||
</div>
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
<label class="col-md-3 control-label" for="image_delete">{{ trans('general.image_delete') }}</label>
|
||||
<div class="col-md-5">
|
||||
{{ Form::checkbox('image_delete') }}
|
||||
<img src="{{ config('app.url') }}/uploads/suppliers/{{ $item->image }}" />
|
||||
<img src="{{ URL::to('/') }}/uploads/suppliers/{{ $item->image }}" />
|
||||
{!! $errors->first('image_delete', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
@endif
|
||||
|
||||
@if ($supplier->image)
|
||||
<li><br /><img src="{{ config('app.url') }}/uploads/suppliers/{{ $supplier->image }}" /></li>
|
||||
<li><br /><img src="{{ URL::to('/') }}/uploads/suppliers/{{ $supplier->image }}" /></li>
|
||||
@endif
|
||||
|
||||
</ul>
|
||||
|
|
|
@ -82,7 +82,7 @@ Bulk Checkin & Delete
|
|||
</td>
|
||||
<td>
|
||||
@foreach ($user->groups as $group)
|
||||
<a href=" {{ config('app.url') }}/admin/groups/{{ $group->id }}'/edit" class="label label-default">
|
||||
<a href=" {{ URL::to('/') }}/admin/groups/{{ $group->id }}'/edit" class="label label-default">
|
||||
{{ $group->name }}
|
||||
</a>
|
||||
@endforeach
|
||||
|
|
|
@ -295,7 +295,7 @@
|
|||
<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="{{ config('app.url') }}/api/users/{{ $user->id }}/upload">
|
||||
<input id="fileupload" type="file" name="file[]" data-url="{{ URL::to('/') }}/api/users/{{ $user->id }}/upload">
|
||||
|
||||
</span>
|
||||
@endcan
|
||||
|
|
Loading…
Reference in a new issue