Merge pull request #16621 from snipe/add_notes_to_location_sidebar

Fixed #16618 - added notes to location sidebar
This commit is contained in:
snipe 2025-04-02 13:27:48 +01:00 committed by GitHub
commit 785f576b19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 51 additions and 30 deletions

View file

@ -333,6 +333,18 @@
</div> </div>
@endif @endif
@if ($consumable->adminuser)
<!-- created at -->
<div class="row">
<div class="col-md-3">
{{ trans('general.created_by') }}
</div>
<div class="col-md-9">
{{ $consumable->adminuser->present()->fullName }}
</div>
</div>
@endif
@if ($consumable->created_at) @if ($consumable->created_at)
<!-- created at --> <!-- created at -->
<div class="row"> <div class="row">

View file

@ -468,7 +468,16 @@
@endif @endif
<div class="col-md-12"> <div class="col-md-12">
<ul class="list-unstyled" style="line-height: 20px; padding-bottom: 20px;">
<ul class="list-unstyled" style="line-height: 22px; padding-bottom: 20px;">
@if ($location->notes)
<li>
<strong>{{ trans('general.notes') }}</strong>:
{!! nl2br(Helper::parseEscapedMarkedownInline($location->notes)) !!}
</li>
@endif
@if ($location->address!='') @if ($location->address!='')
<li>{{ $location->address }}</li> <li>{{ $location->address }}</li>
@endif @endif
@ -488,6 +497,7 @@
<li>{{ trans('admin/locations/table.ldap_ou') }}: {{ $location->ldap_ou }}</li> <li>{{ trans('admin/locations/table.ldap_ou') }}: {{ $location->ldap_ou }}</li>
@endif @endif
@if ((($location->address!='') && ($location->city!='')) || ($location->state!='') || ($location->country!='')) @if ((($location->address!='') && ($location->city!='')) || ($location->state!='') || ($location->country!=''))
<li> <li>
<a href="https://maps.google.com/?q={{ urlencode($location->address.','. $location->city.','.$location->state.','.$location->country.','.$location->zip) }}" target="_blank"> <a href="https://maps.google.com/?q={{ urlencode($location->address.','. $location->city.','.$location->state.','.$location->country.','.$location->zip) }}" target="_blank">

View file

@ -153,23 +153,11 @@
<ul class="list-unstyled" style="line-height: 25px;"> <ul class="list-unstyled" style="line-height: 25px;">
@if ($model->category) @if ($model->category)
<li>{{ trans('general.category') }}: <li>
<strong>{{ trans('general.category') }}</strong>:
<a href="{{ route('categories.show', $model->category->id) }}">{{ $model->category->name }}</a> <a href="{{ route('categories.show', $model->category->id) }}">{{ $model->category->name }}</a>
</li> </li>
@endif @endif
@if ($model->created_at)
<li>{{ trans('general.created_at') }}:
{{ Helper::getFormattedDateObject($model->created_at, 'datetime', false) }}
</li>
@endif
@if ($model->adminuser)
<li>{{ trans('general.created_by') }}:
{{ $model->adminuser->present()->name() }}
</li>
@endif
@if ($model->deleted_at) @if ($model->deleted_at)
<li> <li>
<strong> <strong>
@ -183,14 +171,15 @@
@endif @endif
@if ($model->min_amt) @if ($model->min_amt)
<li>{{ trans('general.min_amt') }}: <li>
<strong>{{ trans('general.min_amt') }}</strong>:
{{$model->min_amt }} {{$model->min_amt }}
</li> </li>
@endif @endif
@if ($model->manufacturer) @if ($model->manufacturer)
<li> <li>
{{ trans('general.manufacturer') }}: <strong>{{ trans('general.manufacturer') }}</strong>:
@can('view', \App\Models\Manufacturer::class) @can('view', \App\Models\Manufacturer::class)
<a href="{{ route('manufacturers.show', $model->manufacturer->id) }}"> <a href="{{ route('manufacturers.show', $model->manufacturer->id) }}">
{{ $model->manufacturer->name }} {{ $model->manufacturer->name }}
@ -228,45 +217,55 @@
@endif @endif
@if ($model->model_number) @if ($model->model_number)
<li> <li>
{{ trans('general.model_no') }}: <strong>{{ trans('general.model_no') }}</strong>:
{{ $model->model_number }} {{ $model->model_number }}
</li> </li>
@endif @endif
@if ($model->depreciation) @if ($model->depreciation)
<li> <li>
{{ trans('general.depreciation') }}: <strong>{{ trans('general.depreciation') }}</strong>:
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}}) {{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
</li> </li>
@endif @endif
@if ($model->eol) @if ($model->eol)
<li>{{ trans('general.eol') }}: <li>
<strong>{{ trans('general.eol') }}</strong>:
{{ $model->eol .' '. trans('general.months') }} {{ $model->eol .' '. trans('general.months') }}
</li> </li>
@endif @endif
@if ($model->fieldset) @if ($model->fieldset)
<li>{{ trans('admin/models/general.fieldset') }}: <li>
<strong>{{ trans('admin/models/general.fieldset') }}</strong>:
<a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a> <a href="{{ route('fieldsets.show', $model->fieldset->id) }}">{{ $model->fieldset->name }}</a>
</li> </li>
@endif @endif
@if ($model->notes) @if ($model->notes)
<li> <li>
{{ trans('general.notes') }}: <strong>{{ trans('general.notes') }}</strong>:
{!! nl2br(Helper::parseEscapedMarkedownInline($model->notes)) !!} {!! nl2br(Helper::parseEscapedMarkedownInline($model->notes)) !!}
</li> </li>
@endif @endif
</ul> @if ($model->created_at)
<li>
@if ($model->note) <strong>{{ trans('general.created_at') }}</strong>:
Notes: {{ Helper::getFormattedDateObject($model->created_at, 'datetime', false) }}
<p> </li>
{!! $model->present()->note() !!}
</p>
@endif @endif
@if ($model->adminuser)
<li>
<strong>{{ trans('general.created_by') }}</strong>:
{{ $model->adminuser->present()->name() }}
</li>
@endif
</ul>
</div> </div>
</div> </div>
</div> </div>