mirror of
https://github.com/grokability/snipe-it.git
synced 2026-03-12 17:52:00 +08:00
Added tooltips
This commit is contained in:
@@ -43,11 +43,11 @@
|
||||
|
||||
{{ $slot }}
|
||||
|
||||
<x-info-element icon_type="notes">
|
||||
<x-info-element icon_type="notes" title="{{ trans('general.notes') }}">
|
||||
{!! nl2br(Helper::parseEscapedMarkedownInline($contact->notes)) !!}
|
||||
</x-info-element>
|
||||
|
||||
@if ($contact->license_name)
|
||||
@if ($contact->serial)
|
||||
@can('viewKeys', $contact)
|
||||
<x-info-element>
|
||||
<x-copy-to-clipboard copy_what="license_key">
|
||||
@@ -60,14 +60,14 @@
|
||||
@endif
|
||||
|
||||
@if ($contact->license_name)
|
||||
<x-info-element icon_type="contact-card">
|
||||
<x-info-element icon_type="contact-card" title="{{ trans('admin/licenses/form.to_name') }}">
|
||||
{{ trans('admin/licenses/form.to_name') }}
|
||||
{{ $contact->license_name }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->license_email)
|
||||
<x-info-element icon_type="email">
|
||||
<x-info-element icon_type="email" title="{{ trans('admin/licenses/form.to_email') }}">
|
||||
{{ trans('admin/licenses/form.to_email') }}
|
||||
<x-info-element.email>
|
||||
{{ $contact->license_email }}
|
||||
@@ -76,42 +76,42 @@
|
||||
@endif
|
||||
|
||||
@if ($contact->termination_date)
|
||||
<x-info-element icon_type="terminates">
|
||||
<x-info-element icon_type="terminates" title="{{ trans('general.termination_date') }}">
|
||||
{{ Helper::getFormattedDateObject($contact->termination_date, 'date', false) }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->expiration_date)
|
||||
<x-info-element icon_type="expiration">
|
||||
<x-info-element icon_type="expiration" title="{{ trans('general.expires') }}">
|
||||
{{ Helper::getFormattedDateObject($contact->expiration_date, 'date', false) }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->model_number)
|
||||
<x-info-element icon_type="number">
|
||||
<x-info-element icon_type="number" title="{{ trans('general.model_number') }}">
|
||||
{{ $contact->model_number }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->order_number)
|
||||
<x-info-element icon_type="order">
|
||||
<x-info-element icon_type="order" title="{{ trans('general.order_number') }}">
|
||||
{{ $contact->order_number }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->purchase_order)
|
||||
<x-info-element icon_type="purchase_order">
|
||||
<x-info-element icon_type="purchase_order" title="{{ trans('admin/licenses/form.purchase_order') }}">
|
||||
{{ $contact->purchase_order }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if (function_exists('numRemaining'))
|
||||
<x-info-element icon_type="available">
|
||||
<x-info-element icon_type="available" title="{{ trans('general.remaining') }}">
|
||||
{{ $contact->numRemaining() }}
|
||||
{{ trans('general.remaining') }}
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="checkedout">
|
||||
<x-info-element icon_type="checkedout" title="{{ trans('general.available') }}">
|
||||
{{ $contact->checkouts_count }}
|
||||
{{ trans('general.checked_out') }}
|
||||
</x-info-element>
|
||||
@@ -119,39 +119,39 @@
|
||||
|
||||
|
||||
@if ($contact->company)
|
||||
<x-info-element icon_type="company" icon_color="{{ $contact->company->tag_color }}">
|
||||
<x-info-element icon_type="company" icon_color="{{ $contact->company->tag_color }}" title="{{ trans('general.company') }}">
|
||||
{!! $contact->company->present()->nameUrl !!}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->category)
|
||||
<x-info-element icon_type="category" icon_color="{{ $contact->category->tag_color }}">
|
||||
<x-info-element icon_type="category" icon_color="{{ $contact->category->tag_color }}" title="{{ trans('general.category') }}">
|
||||
{!! $contact->category->present()->nameUrl !!}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->location)
|
||||
<x-info-element icon_type="location" icon_color="{{ $contact->location->tag_color }}">
|
||||
<x-info-element icon_type="location" icon_color="{{ $contact->location->tag_color }}" title="{{ trans('general.location') }}">
|
||||
{!! $contact->location->present()->nameUrl !!}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($contact->manager)
|
||||
<x-info-element icon_type="manager">
|
||||
<x-info-element icon_type="manager" title="{{ trans('admin/users/table.manager') }}">
|
||||
{!! $contact->manager->present()->nameUrl !!}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($contact->fieldset)
|
||||
<x-info-element icon_type="fieldset">
|
||||
<x-info-element icon_type="fieldset" title="{{ trans('general.fieldset') }}">
|
||||
{!! $contact->fieldset->present()->nameUrl !!}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->manufacturer)
|
||||
<x-info-element icon_type="manufacturer">
|
||||
<x-info-element icon_type="manufacturer" title="{{ trans('general.manufacturer') }}">
|
||||
<strong>{{ trans('general.manufacturer') }}</strong>
|
||||
</x-info-element>
|
||||
|
||||
@@ -159,25 +159,25 @@
|
||||
{!! $contact->manufacturer->present()->formattedNameLink !!}
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="phone" class="subitem">
|
||||
<x-info-element icon_type="phone" class="subitem" title="{{ trans('general.phone') }}">
|
||||
<x-info-element.phone>
|
||||
{{ $contact->manufacturer->support_phone }}
|
||||
</x-info-element.phone>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="email" class="subitem">
|
||||
<x-info-element icon_type="email" class="subitem" title="{{ trans('general.email') }}">
|
||||
<x-info-element.email>
|
||||
{{ $contact->manufacturer->support_email }}
|
||||
</x-info-element.email>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="external-link" class="subitem">
|
||||
<x-info-element icon_type="external-link" class="subitem" title="{{ trans('general.url') }}">
|
||||
<x-info-element.url>
|
||||
{{ $contact->manufacturer->url }}
|
||||
</x-info-element.url>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="external-link" class="subitem">
|
||||
<x-info-element icon_type="external-link" class="subitem" title="{{ trans('general.url') }}">
|
||||
<x-info-element.url>
|
||||
{{ $contact->manufacturer->support_url }}
|
||||
</x-info-element.url>
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
|
||||
@if ($contact->supplier)
|
||||
<x-info-element icon_type="manufacturer">
|
||||
<x-info-element icon_type="manufacturer" title="{{ trans('general.supplier') }}">
|
||||
<strong>{{ trans('general.supplier') }}</strong>
|
||||
</x-info-element>
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
{!! $contact->supplier->present()->formattedNameLink !!}
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="contact-card" class="subitem">
|
||||
<x-info-element icon_type="contact-card" class="subitem" title="{{ trans('admin/suppliers/table.contact') }}">
|
||||
{{ $contact->supplier->contact }}
|
||||
</x-info-element>
|
||||
|
||||
@@ -204,20 +204,19 @@
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
<x-info-element icon_type="phone" class="subitem">
|
||||
<x-info-element.phone>
|
||||
{{ $contact->supplier->phone }}
|
||||
<x-info-element icon_type="phone" class="subitem" title="{{ trans('general.phone') }}">
|
||||
<x-info-element.phone title="{{ trans('general.phone') }}">
|
||||
{{ $contact->supplier->phone }}
|
||||
</x-info-element.phone>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="email" class="subitem">
|
||||
<x-info-element icon_type="email" class="subitem" title="{{ trans('general.email') }}">
|
||||
<x-info-element.email>
|
||||
{{ $contact->supplier->email }}
|
||||
</x-info-element.email>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="external-link" class="subitem">
|
||||
<x-info-element icon_type="external-link" class="subitem" title="{{ trans('general.url') }}">
|
||||
<x-info-element.url>
|
||||
{{ $contact->supplier->url }}
|
||||
</x-info-element.url>
|
||||
@@ -228,37 +227,37 @@
|
||||
|
||||
|
||||
@if ($contact->parent)
|
||||
<x-info-element icon_type="parent">
|
||||
<x-info-element icon_type="parent" title="{{ trans('admin/locations/table.parent') }}">
|
||||
{{ $contact->parent->display_name }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->depreciation && $contact->purchase_date)
|
||||
<x-info-element icon_type="depreciation">
|
||||
<x-info-element icon_type="depreciation" title="{{ trans('general.depreciation') }}">
|
||||
{!! $contact->depreciation->present()->nameUrl !!}
|
||||
({{ $contact->depreciation->months.' '.trans('general.months')}})
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="depreciation-calendar">
|
||||
<x-info-element icon_type="depreciation-calendar" title="{{ trans('general.depreciates') }}">
|
||||
{{ Helper::getFormattedDateObject($contact->depreciated_date(), 'date', false) }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->eol)
|
||||
<x-info-element icon_type="eol">
|
||||
<x-info-element icon_type="eol" title="{{ trans('general.eol') }}">
|
||||
{{ $contact->eol .' '.trans('general.months') }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
|
||||
<x-info-element icon_type="email">
|
||||
<x-info-element.email>
|
||||
<x-info-element icon_type="email" title="{{ trans('general.email') }}">
|
||||
<x-info-element.email title="{{ trans('general.email') }}">
|
||||
{{ $contact->email }}
|
||||
</x-info-element.email>
|
||||
</x-info-element>
|
||||
|
||||
@if ($contact->phone)
|
||||
<x-info-element icon_type="phone">
|
||||
<x-info-element icon_type="phone" title="{{ trans('general.phone') }}">
|
||||
<x-info-element.phone>
|
||||
{{ $contact->phone }}
|
||||
</x-info-element.phone>
|
||||
@@ -266,7 +265,7 @@
|
||||
@endif
|
||||
|
||||
@if ($contact->fax)
|
||||
<x-info-element icon_type="fax">
|
||||
<x-info-element icon_type="fax" title="{{ trans('general.fax') }}">
|
||||
<x-info-element.phone>
|
||||
{{ $contact->fax }}
|
||||
</x-info-element.phone>
|
||||
@@ -274,13 +273,13 @@
|
||||
@endif
|
||||
|
||||
<x-info-element icon_type="external-link">
|
||||
<x-info-element.url>
|
||||
<x-info-element.url title="{{ trans('general.url') }}">
|
||||
{{ $contact->url }}
|
||||
</x-info-element.url>
|
||||
</x-info-element>
|
||||
|
||||
<x-info-element icon_type="external-link">
|
||||
<x-info-element.url>
|
||||
<x-info-element.url title="{{ trans('general.url') }}">
|
||||
{{ $contact->support_url }}
|
||||
</x-info-element.url>
|
||||
</x-info-element>
|
||||
@@ -310,14 +309,14 @@
|
||||
@endif
|
||||
|
||||
@if ($contact->months)
|
||||
<x-info-element>
|
||||
<x-info-element title="{{ trans('general.months') }}">
|
||||
{{ $contact->months }}
|
||||
{{ trans('general.months') }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->depreciation_type)
|
||||
<x-info-element>
|
||||
<x-info-element title="{{ trans('general.depreciation_type') }}">
|
||||
@if ($contact->depreciation_type == 'amount')
|
||||
{{ trans('general.depreciation_options.amount') }}
|
||||
@elseif ($contact->depreciation_type == 'percent')
|
||||
@@ -328,7 +327,7 @@
|
||||
|
||||
@if ($contact->purchase_cost)
|
||||
<x-info-element>
|
||||
<x-icon type="cost" class="fa-fw" />
|
||||
<x-icon type="cost" class="fa-fw" title="{{ trans('general.purchase_cost') }}" />
|
||||
{{ Helper::formatCurrencyOutput($contact->purchase_cost) }}
|
||||
</x-info-element>
|
||||
@endif
|
||||
@@ -336,7 +335,7 @@
|
||||
|
||||
@if ($contact->purchase_date)
|
||||
<x-info-element>
|
||||
<x-icon type="calendar" class="fa-fw" />
|
||||
<x-icon type="calendar" class="fa-fw" title="{{ trans('general.purchase_date') }}" />
|
||||
{{ trans('general.purchased_plain') }}
|
||||
{{ Helper::getFormattedDateObject($contact->purchase_date, 'datetime', false) }}
|
||||
</x-info-element>
|
||||
@@ -344,54 +343,47 @@
|
||||
|
||||
|
||||
@if ($contact->maintained)
|
||||
<x-info-element title="{{ trans('general.maintained') }}">
|
||||
@if ($contact->maintained == 1)
|
||||
<x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/licenses/form.maintained') }}
|
||||
</x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/licenses/form.maintained') }}
|
||||
@else
|
||||
<x-info-element>
|
||||
<x-icon type="x" class="fa-fw text-danger" />
|
||||
{{ trans('admin/licenses/form.maintained') }}
|
||||
</x-info-element>
|
||||
<x-icon type="x" class="fa-fw text-danger" />
|
||||
{{ trans('admin/licenses/form.maintained') }}
|
||||
@endif
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->reassignable)
|
||||
<x-info-element title="{{ trans('admin/licenses/form.reassignable') }}">
|
||||
@if ($contact->reassignable == 1)
|
||||
<x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/licenses/form.reassignable') }}
|
||||
</x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/licenses/form.reassignable') }}
|
||||
@else
|
||||
<x-info-element>
|
||||
<x-icon type="x" class="text-danger" />
|
||||
{{ trans('admin/licenses/form.reassignable') }}
|
||||
</x-info-element>
|
||||
<x-icon type="x" class="text-danger" />
|
||||
{{ trans('admin/licenses/form.reassignable') }}
|
||||
@endif
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
@if ($contact->requestable)
|
||||
<x-info-element title="{{ trans('general.requestable') }}">
|
||||
@if ($contact->requestable == 1)
|
||||
<x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
</x-info-element>
|
||||
<x-icon type="checkmark" class="fa-fw text-success" />
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
@else
|
||||
<x-info-element>
|
||||
<x-icon type="x" class="fa-fw text-danger" />
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
</x-info-element>
|
||||
<x-icon type="x" class="fa-fw text-danger" />
|
||||
{{ trans('admin/hardware/general.requestable') }}
|
||||
@endif
|
||||
</x-info-element>
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
@if ($contact->adminuser)
|
||||
<x-info-element>
|
||||
<x-info-element title="{{ trans('general.created_by') }}">
|
||||
<span class="text-muted">
|
||||
<x-icon type="user" class="fa-fw" />
|
||||
|
||||
<x-icon type="user" class="fa-fw" title="{{ trans('general.created_by') }}" />
|
||||
{{ trans('general.created_by') }}
|
||||
@can('view', $contact->adminuser)
|
||||
<a href="{{ route('users.show', $contact->adminuser) }}"> {{ $contact->adminuser->display_name }}</a>
|
||||
@@ -407,7 +399,7 @@
|
||||
@if ($contact->created_at)
|
||||
<x-info-element>
|
||||
<span class="text-muted">
|
||||
<x-icon type="calendar" class="fa-fw" />
|
||||
<x-icon type="calendar" class="fa-fw" title="{{ trans('general.created_at') }}" />
|
||||
{{ trans('general.created_plain') }}
|
||||
{{ Helper::getFormattedDateObject($contact->created_at, 'datetime', false) }}
|
||||
</span>
|
||||
@@ -417,7 +409,7 @@
|
||||
@if ($contact->updated_at)
|
||||
<x-info-element>
|
||||
<span class="text-muted">
|
||||
<x-icon type="calendar" class="fa-fw" />
|
||||
<x-icon type="calendar" class="fa-fw" title="{{ trans('general.updated_at') }}" />
|
||||
{{ trans('general.updated_plain') }}
|
||||
{{ Helper::getFormattedDateObject($contact->updated_at, 'datetime', false) }}
|
||||
</span>
|
||||
@@ -427,7 +419,7 @@
|
||||
@if ($contact->deleted_at)
|
||||
<x-info-element>
|
||||
<span class="text-muted">
|
||||
<x-icon type="deleted-date" class="fa-fw" />
|
||||
<x-icon type="deleted-date" class="fa-fw" title="{{ trans('general.deleted_at') }}" />
|
||||
{{ trans('general.deleted_plain') }}
|
||||
{{ Helper::getFormattedDateObject($contact->deleted_at, 'datetime', false) }}
|
||||
</span>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{-- IMPORTANT!!! Make sure there is no newline at the end of this file, or it will break the loaders for the tables --}}
|
||||
|
||||
@props([
|
||||
'type' => '',
|
||||
'title' => false,
|
||||
])
|
||||
<i {{ $attributes->merge(['class' => Icon::icon($type)]) }} aria-hidden="true"></i>
|
||||
<i {{ $attributes->merge(['class' => Icon::icon($type)]) }} aria-hidden="true"{!! $title ? ' data-tooltip="true" data-title="'.$title.'"' : '' !!}></i>
|
||||
@@ -2,15 +2,16 @@
|
||||
'icon' => null,
|
||||
'icon_type' => null,
|
||||
'icon_color' => null,
|
||||
'title' => null,
|
||||
])
|
||||
|
||||
@if (!$slot->isEmpty())
|
||||
<li {{ $attributes->merge(['class' => 'list-group-item']) }}>
|
||||
|
||||
@if ($icon_type)
|
||||
<x-icon type="{{ $icon_type }}" class="fa-fw" style="{{ 'color: '.$icon_color.' !important' ?? '' }}" />
|
||||
<x-icon type="{{ $icon_type }}" :title="$title" class="fa-fw" style="{{ 'color: '.$icon_color.' !important' ?? '' }}" />
|
||||
@elseif ($icon)
|
||||
<i class="{{ $icon }}"></i>
|
||||
<i class="{{ $icon }}"{!! $title ? ' data-tooltip="true" data-title="'.$title.'"' : '' !!}></i>
|
||||
@endif
|
||||
{{ $slot }}
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user