From a637a8312abe491feaab7f3a97d828d1e4398c45 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 17 Apr 2018 15:43:11 +0300 Subject: [PATCH] Show file size in background image select/recommend using a small file --- resources/lang/en/texts.php | 2 +- resources/views/accounts/invoice_design.blade.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 4fffd24e6838..75d62309f248 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2832,7 +2832,7 @@ $LANG = array( 'mark' => 'Mark', 'updated_task_status' => 'Successfully update task status', 'background_image' => 'Background Image', - 'background_image_help' => 'Use the :link to manage your images.', + 'background_image_help' => 'Use the :link to manage your images, we recommend using a small file.', 'proposal_editor' => 'proposal editor', 'background' => 'Background', 'guide' => 'Guide', diff --git a/resources/views/accounts/invoice_design.blade.php b/resources/views/accounts/invoice_design.blade.php index 365e254e62b6..4c2dc59a76d7 100644 --- a/resources/views/accounts/invoice_design.blade.php +++ b/resources/views/accounts/invoice_design.blade.php @@ -297,7 +297,7 @@ {!! Former::select('background_image_id') ->label('background_image') ->addOption('', '') - ->fromQuery(\App\Models\Document::scope()->proposalImages()->get(), 'name', 'public_id') + ->fromQuery(\App\Models\Document::scope()->proposalImages()->get(), function($model) { return $model->name . ' - ' . Utils::formatNumber($model->size / 1000, null, 1) . ' KB'; }, 'public_id') ->help(trans('texts.background_image_help', ['link' => link_to('/proposals/create?show_assets=true', trans('texts.proposal_editor'), ['target' => '_blank'])])) !!} @endif