From b69364d5ffb27fe98008fa6c5aa8f63e3c5645a8 Mon Sep 17 00:00:00 2001 From: MrM <11910225+mauro-miatello@users.noreply.github.com> Date: Sun, 25 Feb 2024 14:47:06 +0100 Subject: [PATCH] Add copy of encrypted custom fields Encrypted custom fields may contain sensitive or important information, and it may be useful to have the ability to copy them. --- resources/views/hardware/view.blade.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index 0e198e65a8..72a2603948 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -76,12 +76,12 @@ - +
  • - + @can('update', \App\Models\Asset::class)
  • @@ -138,7 +138,7 @@ - +
    @@ -238,11 +238,11 @@
    - {{ \App\Helpers\Helper::getFormattedDateObject($audit_log->created_at, 'date', false) }} - @if ($audit_log->user) + {{ \App\Helpers\Helper::getFormattedDateObject($audit_log->created_at, 'date', false) }} + @if ($audit_log->user) (by {{ link_to_route('users.show', $audit_log->user->present()->fullname(), [$audit_log->user->id]) }}) - @endif - + @endif +
    @endif @@ -415,6 +415,7 @@ @if ($field->isFieldDecryptable($asset->{$field->db_column_name()} )) @can('assets.view.encrypted_custom_fields') + @if (($field->format=='URL') && ($asset->{$field->db_column_name()}!=''))
    {{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} @elseif (($field->format=='DATE') && ($asset->{$field->db_column_name()}!='')) @@ -422,7 +423,11 @@ @else {{ Helper::gracefulDecrypt($field, $asset->{$field->db_column_name()}) }} @endif - @else + + + @else {{ strtoupper(trans('admin/custom_fields/general.encrypted')) }} @endcan @@ -520,7 +525,7 @@ @endif {{ Helper::formatCurrencyOutput($asset->getDepreciatedValue() )}} - +
    @endif