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>
@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)
<!-- created at -->
<div class="row">

View file

@ -468,7 +468,16 @@
@endif
<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!='')
<li>{{ $location->address }}</li>
@endif
@ -488,6 +497,7 @@
<li>{{ trans('admin/locations/table.ldap_ou') }}: {{ $location->ldap_ou }}</li>
@endif
@if ((($location->address!='') && ($location->city!='')) || ($location->state!='') || ($location->country!=''))
<li>
<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;">
@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>
</li>
@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)
<li>
<strong>
@ -183,14 +171,15 @@
@endif
@if ($model->min_amt)
<li>{{ trans('general.min_amt') }}:
<li>
<strong>{{ trans('general.min_amt') }}</strong>:
{{$model->min_amt }}
</li>
@endif
@if ($model->manufacturer)
<li>
{{ trans('general.manufacturer') }}:
<strong>{{ trans('general.manufacturer') }}</strong>:
@can('view', \App\Models\Manufacturer::class)
<a href="{{ route('manufacturers.show', $model->manufacturer->id) }}">
{{ $model->manufacturer->name }}
@ -228,45 +217,55 @@
@endif
@if ($model->model_number)
<li>
{{ trans('general.model_no') }}:
<strong>{{ trans('general.model_no') }}</strong>:
{{ $model->model_number }}
</li>
@endif
@if ($model->depreciation)
<li>
{{ trans('general.depreciation') }}:
<strong>{{ trans('general.depreciation') }}</strong>:
{{ $model->depreciation->name }} ({{ $model->depreciation->months.' '.trans('general.months')}})
</li>
@endif
@if ($model->eol)
<li>{{ trans('general.eol') }}:
<li>
<strong>{{ trans('general.eol') }}</strong>:
{{ $model->eol .' '. trans('general.months') }}
</li>
@endif
@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>
</li>
@endif
@if ($model->notes)
<li>
{{ trans('general.notes') }}:
<strong>{{ trans('general.notes') }}</strong>:
{!! nl2br(Helper::parseEscapedMarkedownInline($model->notes)) !!}
</li>
@endif
</ul>
@if ($model->note)
Notes:
<p>
{!! $model->present()->note() !!}
</p>
@if ($model->created_at)
<li>
<strong>{{ trans('general.created_at') }}</strong>:
{{ Helper::getFormattedDateObject($model->created_at, 'datetime', false) }}
</li>
@endif
@if ($model->adminuser)
<li>
<strong>{{ trans('general.created_by') }}</strong>:
{{ $model->adminuser->present()->name() }}
</li>
@endif
</ul>
</div>
</div>
</div>