From d008334f2d2936d99b15e9e281a36b46ff319f59 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 25 Oct 2017 20:07:10 -0700 Subject: [PATCH] Fixed #2857 - better CSS for requestable assets page when no results --- .../account/requestable-assets.blade.php | 203 +++++++++--------- 1 file changed, 105 insertions(+), 98 deletions(-) diff --git a/resources/views/account/requestable-assets.blade.php b/resources/views/account/requestable-assets.blade.php index 430570dd50..e518624899 100644 --- a/resources/views/account/requestable-assets.blade.php +++ b/resources/views/account/requestable-assets.blade.php @@ -27,120 +27,127 @@
+
+
- @if ($assets->count() > 0) + @if ($assets->count() > 0) -
- - - - - @if ($snipeSettings->display_asset_name) - - @endif - - - - - - - - - @foreach ($assets as $asset) +
+
{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/table.serial') }}{{ trans('admin/hardware/table.location') }}{{ trans('admin/hardware/table.status') }}{{ trans('admin/hardware/form.expected_checkin') }}{{ trans('table.actions') }}
+ + + + @if ($snipeSettings->display_asset_name) + + @endif + + + + + + + + + @foreach ($assets as $asset) - - - {{ csrf_field() }} - + + + {{ csrf_field() }} + - @if ($snipeSettings->display_asset_name) - - @endif + @if ($snipeSettings->display_asset_name) + + @endif - + - - @if ($asset->assigned_to != '' && $asset->assigned_to > 0) - - @else - - @endif + + @if ($asset->assigned_to != '' && $asset->assigned_to > 0) + + @else + + @endif + + + + + + @endforeach + +
{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/hardware/form.name') }}{{ trans('admin/hardware/table.serial') }}{{ trans('admin/hardware/table.location') }}{{ trans('admin/hardware/table.status') }}{{ trans('admin/hardware/form.expected_checkin') }}{{ trans('table.actions') }}
{!! $asset->model->present()->nameUrl() !!}
{!! $asset->model->present()->nameUrl() !!}{{ $asset->name }}{{ $asset->name }}{{ $asset->serial }}{{ $asset->serial }} - @if ($asset->assetloc) - {!! $asset->assetloc->present()->nameUrl() !!} - @endif - Checked out{{ trans('admin/hardware/general.requestable') }} + @if ($asset->assetloc) + {!! $asset->assetloc->present()->nameUrl() !!} + @endif + Checked out{{ trans('admin/hardware/general.requestable') }}{{ $asset->expected_checkin }} + @if ($asset->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 +
+
+ + @else + +
+ + {{ trans('general.no_results') }} +
+ + @endif - {{ $asset->expected_checkin }} - - @if ($asset->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 - - - - @endforeach - -
- - @else -
-
- - {{ trans('general.no_results') }} -
-
- @endif
+
+
+
- @if ($models->count() > 0) -

Requestable Models

- - - - - - - - - + @if ($models->count() > 0) +

Requestable Models

+
{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/accessories/general.remaining') }}{{ trans('general.quantity') }}{{ trans('table.actions') }}
+ + + + + + + + - - @foreach($models as $requestableModel) - - - {{ csrf_field() }} - - - - - - - @endforeach - -
{{ trans('admin/hardware/table.asset_model') }}{{ trans('admin/accessories/general.remaining') }}{{ trans('general.quantity') }}{{ trans('table.actions') }}
{{$requestableModel->name}}{{$requestableModel->assets->where('requestable', '1')->count()}} - @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 -
+ + @foreach($models as $requestableModel) + +
+ {{ csrf_field() }} + {{$requestableModel->name}} + {{$requestableModel->assets->where('requestable', '1')->count()}} + + + @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 + +
+ + @endforeach + + - @else -
-
- - {{ trans('general.no_results') }} + @else +
+ + {{ trans('general.no_results') }} +
+ @endif
- @endif