Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added configurable List Table Column character limits #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/Http/Controllers/SettingCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ public function setupListOperation()
[
'name' => 'name',
'label' => trans('backpack::settings.name'),
'limit' => config('backpack.settings.limits.name_field_limit'),
],
[
'name' => 'value',
'label' => trans('backpack::settings.value'),
'limit' => config('backpack.settings.limits.value_field_limit'),
],
[
'name' => 'description',
'label' => trans('backpack::settings.description'),
'limit' => config('backpack.settings.limits.description_field_limit'),
],
]);
}
Expand Down
15 changes: 15 additions & 0 deletions src/config/backpack/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,19 @@
|
*/
'migration_name' => '2015_08_04_131614_create_settings_table',

/*
|--------------------------------------------------------------------------
| List Table Column character limits
|--------------------------------------------------------------------------
|
| The following character limits are used for the settings list table column values.
| If you need to change the character limits, you can do so here.
|
*/
'limits' => [
'name_field_limit' => 32,
'value_field_limit' => 32,
'description_field_limit' => 100,
],
];
18 changes: 18 additions & 0 deletions src/resources/lang/lv/settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

return [
/*
|--------------------------------------------------------------------------
| Settings Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used for Laravel Backpack - Settings
|
*/
'name' => 'Nosaukums',
'value' => 'Vērtība',
'description' => 'Apraksts',
'setting_singular' => 'iestatījums',
'setting_plural' => 'iestatījumi',

];