Still more

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-08-18 19:21:59 +01:00
parent 803bdb457c
commit d2e889e927
3 changed files with 58 additions and 28 deletions

View file

@ -114,13 +114,22 @@ class IconHelper
case 'paperclip': case 'paperclip':
return 'fas fa-paperclip'; return 'fas fa-paperclip';
case 'files': case 'files':
return 'fas fa-paperclip'; return 'fa-regular fa-file';
case 'more-info': case 'more-info':
return 'far fa-life-ring'; return 'far fa-life-ring';
case 'calendar': case 'calendar':
return 'fas fa-calendar'; return 'fas fa-calendar';
case 'plus': case 'plus':
return 'fas fa-plus'; return 'fas fa-plus';
case 'history':
return 'fas fa-history';
case 'more-files':
return 'fa-solid fa-laptop-file';
case 'maintenances':
return 'fas fa-wrench';
case 'seats':
return 'far fa-list-alt';
} }
} }

View file

@ -53,7 +53,7 @@
<li> <li>
<a href="#software" data-toggle="tab"> <a href="#software" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="far fa-save fa-2x" aria-hidden="true"></i> <x-icon type="licenses" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.licenses') }} <span class="hidden-xs hidden-sm">{{ trans('general.licenses') }}
{!! ($asset->licenses->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->licenses->count()).'</span>' : '' !!} {!! ($asset->licenses->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->licenses->count()).'</span>' : '' !!}
@ -64,7 +64,7 @@
<li> <li>
<a href="#components" data-toggle="tab"> <a href="#components" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="far fa-hdd fa-2x" aria-hidden="true"></i> <x-icon type="components" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.components') }} <span class="hidden-xs hidden-sm">{{ trans('general.components') }}
{!! ($asset->components->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->components->count()).'</span>' : '' !!} {!! ($asset->components->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->components->count()).'</span>' : '' !!}
@ -75,7 +75,7 @@
<li> <li>
<a href="#assets" data-toggle="tab"> <a href="#assets" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="fas fa-barcode fa-2x" aria-hidden="true"></i> <x-icon type="assets" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.assets') }} <span class="hidden-xs hidden-sm">{{ trans('general.assets') }}
{!! ($asset->assignedAssets()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->assignedAssets()->count()).'</span>' : '' !!} {!! ($asset->assignedAssets()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->assignedAssets()->count()).'</span>' : '' !!}
@ -88,7 +88,7 @@
<li> <li>
<a href="#history" data-toggle="tab"> <a href="#history" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="fas fa-history fa-2x" aria-hidden="true"></i> <x-icon type="history" class="fa-2x "/>
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.history') }} <span class="hidden-xs hidden-sm">{{ trans('general.history') }}
</span> </span>
@ -98,7 +98,7 @@
<li> <li>
<a href="#maintenances" data-toggle="tab"> <a href="#maintenances" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="fas fa-wrench fa-2x" aria-hidden="true"></i> <x-icon type="maintenances" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.maintenances') }} <span class="hidden-xs hidden-sm">{{ trans('general.maintenances') }}
{!! ($asset->assetmaintenances()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->assetmaintenances()->count()).'</span>' : '' !!} {!! ($asset->assetmaintenances()->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->assetmaintenances()->count()).'</span>' : '' !!}
@ -109,7 +109,7 @@
<li> <li>
<a href="#files" data-toggle="tab"> <a href="#files" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="far fa-file fa-2x" aria-hidden="true"></i> <x-icon type="files" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('general.files') }} <span class="hidden-xs hidden-sm">{{ trans('general.files') }}
{!! ($asset->uploads->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->uploads->count()).'</span>' : '' !!} {!! ($asset->uploads->count() > 0 ) ? '<span class="badge badge-secondary">'.number_format($asset->uploads->count()).'</span>' : '' !!}
@ -121,7 +121,7 @@
<li> <li>
<a href="#modelfiles" data-toggle="tab"> <a href="#modelfiles" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="fa-solid fa-laptop-file fa-2x" aria-hidden="true"></i> <x-icon type="more-files" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm"> <span class="hidden-xs hidden-sm">
{{ trans('general.additional_files') }} {{ trans('general.additional_files') }}
@ -300,7 +300,8 @@
</li> </li>
@if (isset($asset->expected_checkin)) @if (isset($asset->expected_checkin))
<li> <li>
<i class="fas fa-calendar"></i> {{ trans('admin/hardware/form.expected_checkin') }}: {{ Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }} <x-icon type="calendar" />
{{ trans('admin/hardware/form.expected_checkin') }}: {{ Helper::getFormattedDateObject($asset->expected_checkin, 'date', false) }}
</li> </li>
@endif @endif
</ul> </ul>

View file

@ -29,7 +29,7 @@
<li> <li>
<a href="#seats" data-toggle="tab"> <a href="#seats" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="far fa-list-alt fa-2x" aria-hidden="true"></i> <x-icon type="seats" class="fa-2x" />
</span> </span>
<span class="hidden-xs hidden-sm">{{ trans('admin/licenses/form.seats') }}</span> <span class="hidden-xs hidden-sm">{{ trans('admin/licenses/form.seats') }}</span>
<span class="badge badge-secondary">{{ number_format($license->availCount()->count()) }} / {{ number_format($license->seats) }}</span> <span class="badge badge-secondary">{{ number_format($license->availCount()->count()) }} / {{ number_format($license->seats) }}</span>
@ -41,7 +41,8 @@
<li> <li>
<a href="#files" data-toggle="tab"> <a href="#files" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="far fa-file fa-2x" aria-hidden="true"></i></span> <x-icon type="files" class="fa-2x" />
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }} <span class="hidden-xs hidden-sm">{{ trans('general.file_uploads') }}
{!! ($license->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($license->uploads->count()).'</badge>' : '' !!} {!! ($license->uploads->count() > 0 ) ? '<badge class="badge badge-secondary">'.number_format($license->uploads->count()).'</badge>' : '' !!}
</span> </span>
@ -52,7 +53,8 @@
<li> <li>
<a href="#history" data-toggle="tab"> <a href="#history" data-toggle="tab">
<span class="hidden-lg hidden-md"> <span class="hidden-lg hidden-md">
<i class="fas fa-history fa-2x" aria-hidden="true"></i></span> <x-icon type="history" class="fa-2x" />
</span>
<span class="hidden-xs hidden-sm">{{ trans('general.history') }}</span> <span class="hidden-xs hidden-sm">{{ trans('general.history') }}</span>
</a> </a>
</li> </li>
@ -610,29 +612,42 @@
<div class="col-md-3"> <div class="col-md-3">
@can('update', $license) @can('update', $license)
<a href="{{ route('licenses.edit', $license->id) }}" class="btn btn-block btn-primary" style="margin-bottom: 10px;">{{ trans('admin/licenses/general.edit') }}</a> <a href="{{ route('licenses.edit', $license->id) }}" class="btn btn-warning btn-social btn-block hidden-print" style="margin-bottom: 10px;">
<a href="{{ route('clone/license', $license->id) }}" class="btn btn-block btn-primary" style="margin-bottom: 10px;">{{ trans('admin/licenses/general.clone') }}</a> <x-icon type="edit" />
{{ trans('admin/licenses/general.edit') }}
</a>
<a href="{{ route('clone/license', $license->id) }}" class="btn btn-info btn-block btn-social hidden-print" style="margin-bottom: 10px;">
<x-icon type="clone" />
{{ trans('admin/licenses/general.clone') }}</a>
@endcan @endcan
@can('checkout', $license) @can('checkout', $license)
@if ($license->availCount()->count() > 0) @if ($license->availCount()->count() > 0)
<a href="{{ route('licenses.checkout', $license->id) }}" class="btn-block btn bg-maroon" style="margin-bottom: 10px;">
<a href="{{ route('licenses.checkout', $license->id) }}" class="btn bg-maroon btn-social btn-block hidden-print" style="margin-bottom: 10px;">
<x-icon type="checkout" />
{{ trans('general.checkout') }} {{ trans('general.checkout') }}
</a> </a>
<a href="#" class="btn-block btn bg-maroon" style="margin-bottom: 10px;" data-toggle="modal" data-tooltip="true" title="{{ trans('admin/licenses/general.bulk.checkout_all.enabled_tooltip') }}" data-target="#checkoutFromAllModal">
<a href="#" class="btn bg-maroon btn-social btn-block hidden-print" style="margin-bottom: 10px;" data-toggle="modal" data-tooltip="true" title="{{ trans('admin/licenses/general.bulk.checkout_all.enabled_tooltip') }}" data-target="#checkoutFromAllModal">
<x-icon type="checkout" />
{{ trans('admin/licenses/general.bulk.checkout_all.button') }} {{ trans('admin/licenses/general.bulk.checkout_all.button') }}
</a> </a>
@else @else
<a href="{{ route('licenses.checkout', $license->id) }}" class="btn btn-block bg-maroon disabled" style="margin-bottom: 10px;"> <span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkout_all.disabled_tooltip') }}">
{{ trans('general.checkout') }} <a href="#" class="btn bg-maroon btn-social btn-block hidden-print disabled" style="margin-bottom: 10px;" data-tooltip="true" title="{{ trans('general.checkout') }}">
</a> <x-icon type="checkout" />
{{ trans('general.checkout') }}
</a>
</span>
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkout_all.disabled_tooltip') }}"> <span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkout_all.disabled_tooltip') }}">
<a href="#" class="btn btn-block bg-maroon disabled" style="margin-bottom: 10px;" data-tooltip="true" title="{{ trans('general.checkout') }}"> <a href="#" class="btn bg-maroon btn-social btn-block hidden-print disabled" style="margin-bottom: 10px;" data-tooltip="true" title="{{ trans('general.checkout') }}">
{{ trans('admin/licenses/general.bulk.checkout_all.button') }} <x-icon type="checkout" />
</a> {{ trans('admin/licenses/general.bulk.checkout_all.button') }}
</span> </a>
</span>
@endif @endif
@endcan @endcan
@ -640,18 +655,21 @@
@if (($license->seats - $license->availCount()->count()) <= 0 ) @if (($license->seats - $license->availCount()->count()) <= 0 )
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip') }}"> <span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip') }}">
<a href="#" class="btn btn-block bg-purple disabled" style="margin-bottom: 25px;"> <a href="#" class="btn btn-primary bg-purple btn-social btn-block hidden-print disabled" style="margin-bottom: 25px;">
<x-icon type="checkin" />
{{ trans('admin/licenses/general.bulk.checkin_all.button') }} {{ trans('admin/licenses/general.bulk.checkin_all.button') }}
</a> </a>
</span> </span>
@elseif (! $license->reassignable) @elseif (! $license->reassignable)
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip_reassignable') }}"> <span data-tooltip="true" title=" {{ trans('admin/licenses/general.bulk.checkin_all.disabled_tooltip_reassignable') }}">
<a href="#" class="btn btn-block bg-purple disabled" style="margin-bottom: 25px;"> <a href="#" class="btn btn-primary bg-purple btn-social btn-block hidden-print disabled" style="margin-bottom: 25px;">
<x-icon type="checkin" />
{{ trans('admin/licenses/general.bulk.checkin_all.button') }} {{ trans('admin/licenses/general.bulk.checkin_all.button') }}
</a> </a>
</span> </span>
@else @else
<a href="#" class="btn btn-block bg-purple" style="margin-bottom: 25px;" data-toggle="modal" data-tooltip="true" data-target="#checkinFromAllModal" data-content="{{ trans('general.sure_to_delete') }} data-title="{{ trans('general.delete') }}" onClick="return false;"> <a href="#" class="btn btn-primary bg-purple btn-social btn-block hidden-print" style="margin-bottom: 25px;" data-toggle="modal" data-tooltip="true" data-target="#checkinFromAllModal" data-content="{{ trans('general.sure_to_delete') }} data-title="{{ trans('general.delete') }}" onClick="return false;">
<x-icon type="checkin" />
{{ trans('admin/licenses/general.bulk.checkin_all.button') }} {{ trans('admin/licenses/general.bulk.checkin_all.button') }}
</a> </a>
@endif @endif
@ -660,12 +678,14 @@
@can('delete', $license) @can('delete', $license)
@if ($license->availCount()->count() == $license->seats) @if ($license->availCount()->count() == $license->seats)
<button class="btn btn-block btn-danger delete-asset" data-toggle="modal" data-title="{{ trans('general.delete') }}" data-content="{{ trans('general.delete_confirm', ['item' => $license->name]) }}" data-target="#dataConfirmModal"> <button class="btn btn-block btn-danger btn-social delete-license" data-toggle="modal" data-title="{{ trans('general.delete') }}" data-content="{{ trans('general.delete_confirm', ['item' => $license->name]) }}" data-target="#dataConfirmModal">
<x-icon type="delete" />
{{ trans('general.delete') }} {{ trans('general.delete') }}
</button> </button>
@else @else
<span data-tooltip="true" title=" {{ trans('admin/licenses/general.delete_disabled') }}"> <span data-tooltip="true" title=" {{ trans('admin/licenses/general.delete_disabled') }}">
<a href="#" class="btn btn-block btn-danger disabled"> <a href="#" class="btn btn-block btn-danger btn-social delete-license disabled">
<x-icon type="delete" />
{{ trans('general.delete') }} {{ trans('general.delete') }}
</a> </a>
</span> </span>