Show file size in background image select/recommend using a small file

This commit is contained in:
Hillel Coren 2018-04-17 15:43:11 +03:00
parent 6c301d9562
commit a637a8312a
2 changed files with 2 additions and 2 deletions

View File

@ -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',

View File

@ -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