From 863e200430a3568b18d6090d1f434d5fb1aeca69 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 14 Dec 2016 08:20:05 -0800 Subject: [PATCH] Hopefully fixes tons of PEBKAC where users have the wrong app.url --- app/Http/Controllers/AccessoriesController.php | 4 ++-- app/Http/Controllers/AssetModelsController.php | 2 +- app/Http/Controllers/AssetsController.php | 10 +++++----- app/Http/Controllers/ComponentsController.php | 2 +- app/Http/Controllers/ConsumablesController.php | 2 +- app/Http/Controllers/LicensesController.php | 6 +++--- app/Http/Controllers/LocationsController.php | 2 +- app/Http/Controllers/SettingsController.php | 4 ++-- app/Http/Controllers/UsersController.php | 6 +++--- app/Http/Controllers/ViewAssetsController.php | 6 +++--- app/Http/Middleware/CheckForSetup.php | 4 ++-- resources/views/account/profile.blade.php | 2 +- resources/views/account/view-assets.blade.php | 4 ++-- resources/views/auth/login.blade.php | 2 +- .../views/emails/accept-accessory.blade.php | 2 +- resources/views/emails/accept-asset.blade.php | 2 +- resources/views/emails/asset-canceled.blade.php | 4 ++-- resources/views/emails/asset-requested.blade.php | 4 ++-- resources/views/emails/firstadmin.blade.php | 2 +- resources/views/emails/low-inventory.blade.php | 2 +- resources/views/emails/send-login.blade.php | 2 +- resources/views/errors/403.blade.php | 2 +- resources/views/errors/404.blade.php | 2 +- resources/views/errors/503.blade.php | 4 ++-- resources/views/hardware/bulk-checkout.blade.php | 6 +++--- resources/views/hardware/checkout.blade.php | 6 +++--- resources/views/hardware/edit.blade.php | 8 ++++---- resources/views/hardware/import.blade.php | 2 +- resources/views/hardware/view.blade.php | 8 ++++---- resources/views/layouts/default.blade.php | 16 ++++++++-------- resources/views/locations/edit.blade.php | 2 +- resources/views/models/edit.blade.php | 2 +- resources/views/models/view.blade.php | 4 ++-- .../views/reports/unaccepted_assets.blade.php | 4 ++-- resources/views/setup/done.blade.php | 2 +- resources/views/suppliers/edit.blade.php | 2 +- resources/views/suppliers/view.blade.php | 2 +- .../views/users/confirm-bulk-delete.blade.php | 2 +- resources/views/users/view.blade.php | 2 +- 39 files changed, 75 insertions(+), 75 deletions(-) diff --git a/app/Http/Controllers/AccessoriesController.php b/app/Http/Controllers/AccessoriesController.php index 58e5a721b5..6a4d403d8e 100755 --- a/app/Http/Controllers/AccessoriesController.php +++ b/app/Http/Controllers/AccessoriesController.php @@ -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:', diff --git a/app/Http/Controllers/AssetModelsController.php b/app/Http/Controllers/AssetModelsController.php index e4cec1fcc0..73b0e5f690 100755 --- a/app/Http/Controllers/AssetModelsController.php +++ b/app/Http/Controllers/AssetModelsController.php @@ -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!='') ? '' : '', + 'image' => ($model->image!='') ? '' : '', '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'), diff --git a/app/Http/Controllers/AssetsController.php b/app/Http/Controllers/AssetsController.php index 8ad41b9ccb..f151bfb6d9 100755 --- a/app/Http/Controllers/AssetsController.php +++ b/app/Http/Controllers/AssetsController.php @@ -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' =>'
', 'id' => $asset->id, - 'image' => (($asset->image) && ($asset->image!='')) ? '' : ((($asset->model) && ($asset->model->image!='')) ? '' : ''), + 'image' => (($asset->image) && ($asset->image!='')) ? '' : ((($asset->model) && ($asset->model->image!='')) ? '' : ''), 'name' => ''.e($asset->name).'', 'asset_tag' => ''.e($asset->asset_tag).'', '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!='') ? ''.e($asset->order_number).'' : '', + 'order_number' => ($asset->order_number!='') ? ''.e($asset->order_number).'' : '', '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')) : '', diff --git a/app/Http/Controllers/ComponentsController.php b/app/Http/Controllers/ComponentsController.php index 1bba51ca67..148a973e92 100644 --- a/app/Http/Controllers/ComponentsController.php +++ b/app/Http/Controllers/ComponentsController.php @@ -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:', diff --git a/app/Http/Controllers/ConsumablesController.php b/app/Http/Controllers/ConsumablesController.php index 92673ac45c..6e011bb648 100644 --- a/app/Http/Controllers/ConsumablesController.php +++ b/app/Http/Controllers/ConsumablesController.php @@ -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:', diff --git a/app/Http/Controllers/LicensesController.php b/app/Http/Controllers/LicensesController.php index b3465328ae..aa35bcd496 100755 --- a/app/Http/Controllers/LicensesController.php +++ b/app/Http/Controllers/LicensesController.php @@ -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:', diff --git a/app/Http/Controllers/LocationsController.php b/app/Http/Controllers/LocationsController.php index cee02f7a8a..90f73a595b 100755 --- a/app/Http/Controllers/LocationsController.php +++ b/app/Http/Controllers/LocationsController.php @@ -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), diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index 8d58d3a4e6..192a67961d 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -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'); diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 541f6ed423..792bcb943a 100755 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -974,7 +974,7 @@ class UsersController extends Controller $actions = ''; foreach ($user->groups as $group) { - $group_names .= '' . $group->name . ' '; + $group_names .= '' . $group->name . ' '; } @@ -1015,7 +1015,7 @@ class UsersController extends Controller $rows[] = array( 'id' => $user->id, 'checkbox' => ($status!='deleted') ? '' : '', - 'name' => ''.e($user->fullName()).'', + 'name' => ''.e($user->fullName()).'', 'jobtitle' => e($user->jobtitle), 'email' => ($user->email!='') ? '' @@ -1023,7 +1023,7 @@ class UsersController extends Controller .'' : '', 'username' => e($user->username), 'location' => ($user->userloc) ? e($user->userloc->name) : '', - 'manager' => ($user->manager) ? '' . e($user->manager->fullName()) . '' : '', + 'manager' => ($user->manager) ? '' . e($user->manager->fullName()) . '' : '', 'assets' => $user->assets->count(), 'employee_num' => e($user->employee_num), 'licenses' => $user->licenses->count(), diff --git a/app/Http/Controllers/ViewAssetsController.php b/app/Http/Controllers/ViewAssetsController.php index acbe21b929..33772dd638 100755 --- a/app/Http/Controllers/ViewAssetsController.php +++ b/app/Http/Controllers/ViewAssetsController.php @@ -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().'>.' ] ] diff --git a/app/Http/Middleware/CheckForSetup.php b/app/Http/Middleware/CheckForSetup.php index 4865d05f41..349d3ddac9 100644 --- a/app/Http/Middleware/CheckForSetup.php +++ b/app/Http/Middleware/CheckForSetup.php @@ -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); diff --git a/resources/views/account/profile.blade.php b/resources/views/account/profile.blade.php index 29e139bb12..7f8e40fa87 100755 --- a/resources/views/account/profile.blade.php +++ b/resources/views/account/profile.blade.php @@ -87,7 +87,7 @@
{{ Form::checkbox('avatar_delete') }} - + {!! $errors->first('avatar_delete', ':message') !!}
diff --git a/resources/views/account/view-assets.blade.php b/resources/views/account/view-assets.blade.php index 1885095159..a21ab5152a 100755 --- a/resources/views/account/view-assets.blade.php +++ b/resources/views/account/view-assets.blade.php @@ -46,10 +46,10 @@ View Assets for {{ $user->fullName() }} @if (($asset->image) && ($asset->image!='')) - + @elseif (($asset->model) && ($asset->model->image!='')) - + @endif diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 39881a0a61..1d0900c71e 100755 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -52,7 +52,7 @@ diff --git a/resources/views/emails/accept-accessory.blade.php b/resources/views/emails/accept-accessory.blade.php index afd3c22872..94e94d8e26 100644 --- a/resources/views/emails/accept-accessory.blade.php +++ b/resources/views/emails/accept-accessory.blade.php @@ -54,7 +54,7 @@

{!! $eula !!}

@if ($require_acceptance==1) -

{{ trans('mail.i_have_read') }}

+

{{ trans('mail.i_have_read') }}

@endif

{{ $snipeSettings->site_name }}

diff --git a/resources/views/emails/accept-asset.blade.php b/resources/views/emails/accept-asset.blade.php index 8b8b5eba83..c0bd7cc7a9 100755 --- a/resources/views/emails/accept-asset.blade.php +++ b/resources/views/emails/accept-asset.blade.php @@ -84,7 +84,7 @@

{!! $eula !!}

@if ($require_acceptance==1) -

{{ trans('mail.i_have_read') }}

+

{{ trans('mail.i_have_read') }}

@endif

{{ $snipeSettings->site_name }}

diff --git a/resources/views/emails/asset-canceled.blade.php b/resources/views/emails/asset-canceled.blade.php index beb6a7f585..ee2359ebfc 100644 --- a/resources/views/emails/asset-canceled.blade.php +++ b/resources/views/emails/asset-canceled.blade.php @@ -2,9 +2,9 @@ @section('content') -

{{ trans('mail.a_user_canceled') }} {{ $snipeSettings->site_name }}.

+

{{ trans('mail.a_user_canceled') }} {{ $snipeSettings->site_name }}.

-

{{ trans('mail.user') }} {{ $requested_by }}
+

{{ trans('mail.user') }} {{ $requested_by }}
{{ trans('mail.item') }} {{ $item_name }} ({{ $item_type }})
{{ trans('mail.canceled') }} {{ $requested_date }}

diff --git a/resources/views/emails/asset-requested.blade.php b/resources/views/emails/asset-requested.blade.php index c5999a19e6..8784d1a071 100644 --- a/resources/views/emails/asset-requested.blade.php +++ b/resources/views/emails/asset-requested.blade.php @@ -2,9 +2,9 @@ @section('content') -

{{ trans('mail.a_user_requested') }} {{ $snipeSettings->site_name }}.

+

{{ trans('mail.a_user_requested') }} {{ $snipeSettings->site_name }}.

-

{{ trans('mail.user') }} {{ $requested_by }}
+

{{ trans('mail.user') }} {{ $requested_by }}
{{ trans('mail.item') }} {{ $item_name }} ({{ $item_type }})
{{ trans('mail.requested') }} {{ $requested_date }} @if ($item_quantity > 1) diff --git a/resources/views/emails/firstadmin.blade.php b/resources/views/emails/firstadmin.blade.php index 16f610de28..0c1c430ac4 100644 --- a/resources/views/emails/firstadmin.blade.php +++ b/resources/views/emails/firstadmin.blade.php @@ -2,6 +2,6 @@ {{ trans('mail.login_first_admin') }} -URL: {{ config('app.url') }} +URL: {{ URL::to('/') }} {{ trans('mail.username') }} {{ $username }} {{ trans('mail.password') }} {{ $password }} diff --git a/resources/views/emails/low-inventory.blade.php b/resources/views/emails/low-inventory.blade.php index 7707c37cc3..a5e9b961ad 100644 --- a/resources/views/emails/low-inventory.blade.php +++ b/resources/views/emails/low-inventory.blade.php @@ -15,7 +15,7 @@ @for($i=0; $count > $i; $i++) - {{ $data[$i]['name'] }} + {{ $data[$i]['name'] }} {{ $data[$i]['type'] }} {{ $data[$i]['remaining'] }} diff --git a/resources/views/emails/send-login.blade.php b/resources/views/emails/send-login.blade.php index b34bef7695..595c40fd34 100644 --- a/resources/views/emails/send-login.blade.php +++ b/resources/views/emails/send-login.blade.php @@ -5,7 +5,7 @@

{{ trans('mail.admin_has_created', ['web' => $snipeSettings->site_name]) }}

-

URL: {{ config('app.url') }}
+

URL: {{ URL::to('/') }}
{{ trans('mail.login') }} {{ $username }}
{{ trans('mail.password') }} {{ $password }}

diff --git a/resources/views/errors/403.blade.php b/resources/views/errors/403.blade.php index 86a6c1e2d7..753aeaea60 100644 --- a/resources/views/errors/403.blade.php +++ b/resources/views/errors/403.blade.php @@ -16,7 +16,7 @@
- +

403 Forbidden.

diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index d92d7f9ce0..f1671714ba 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -16,7 +16,7 @@

- +

404 Page not found.

diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php index 226729ad82..e22c6b9209 100644 --- a/resources/views/errors/503.blade.php +++ b/resources/views/errors/503.blade.php @@ -14,9 +14,9 @@ System Unavailable

- +
- +

System Unavailable

diff --git a/resources/views/hardware/bulk-checkout.blade.php b/resources/views/hardware/bulk-checkout.blade.php index 08823f1bc3..968eabb7ab 100644 --- a/resources/views/hardware/bulk-checkout.blade.php +++ b/resources/views/hardware/bulk-checkout.blade.php @@ -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 += "" + asset.name; + table_html += "" + asset.name; if (asset.model.name!='') { table_html += " (" + asset.model.name + ")"; } diff --git a/resources/views/hardware/checkout.blade.php b/resources/views/hardware/checkout.blade.php index 11225e8a30..1a14cf51b3 100755 --- a/resources/views/hardware/checkout.blade.php +++ b/resources/views/hardware/checkout.blade.php @@ -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 += "" + asset.name; + table_html += "" + asset.name; if (asset.model.name!='') { table_html += " (" + asset.model.name + ")"; diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 089c50ad63..a023c7b1f5 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -117,7 +117,7 @@ if ($item->id && $item->assetloc) {

@@ -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(""); diff --git a/resources/views/hardware/import.blade.php b/resources/views/hardware/import.blade.php index e5c1d4b415..62b99401e2 100644 --- a/resources/views/hardware/import.blade.php +++ b/resources/views/hardware/import.blade.php @@ -100,7 +100,7 @@ Select Import File... - +
-

Click here to go to your app login! {{ config('app.url') }}

+

Click here to go to your app login! {{ URL::to('/') }}

diff --git a/resources/views/suppliers/edit.blade.php b/resources/views/suppliers/edit.blade.php index d9215b87dc..5805d088c9 100755 --- a/resources/views/suppliers/edit.blade.php +++ b/resources/views/suppliers/edit.blade.php @@ -47,7 +47,7 @@
{{ Form::checkbox('image_delete') }} - + {!! $errors->first('image_delete', ':message') !!}
diff --git a/resources/views/suppliers/view.blade.php b/resources/views/suppliers/view.blade.php index 96ba8f5a7d..bc39fd8bf8 100755 --- a/resources/views/suppliers/view.blade.php +++ b/resources/views/suppliers/view.blade.php @@ -119,7 +119,7 @@ @endif @if ($supplier->image) -

  • +

  • @endif diff --git a/resources/views/users/confirm-bulk-delete.blade.php b/resources/views/users/confirm-bulk-delete.blade.php index 05198ebc83..da16c7b4de 100644 --- a/resources/views/users/confirm-bulk-delete.blade.php +++ b/resources/views/users/confirm-bulk-delete.blade.php @@ -82,7 +82,7 @@ Bulk Checkin & Delete @foreach ($user->groups as $group) - + {{ $group->name }} @endforeach diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php index 3b9e379fd9..7fc9b87975 100755 --- a/resources/views/users/view.blade.php +++ b/resources/views/users/view.blade.php @@ -295,7 +295,7 @@ Select File... - + @endcan