Skip to content

Commit 6bd0a09

Browse files
authored
Merge pull request #1 from Laravel-Backpack/master
Merge Master
2 parents c39d767 + 745efcb commit 6bd0a09

22 files changed

+203
-109
lines changed

.github/release-drafter.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
# branches to consider in the event; optional, defaults to all
66
branches:
77
- master
8-
- 4.1
8+
- 4.0
99

1010
jobs:
1111
update_release_draft:
@@ -36,7 +36,7 @@ categories:
3636
- 'dependencies'
3737
- title: '🧰 Removed'
3838
label: 'removed'
39-
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
39+
change-template: '- $TITLE (#$NUMBER - thanks to @$AUTHOR)'
4040
template: |
4141
## Changes
4242

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ Quickly build an admin interface for your Eloquent models. Then customize every
5353

5454
But professionals don't love Backpack just because it's feature-packed. They also love it because it's ridiculously easy to overwrite a functionality. Generally, you just need to create a function with the right name or create a blade file with the right name. Yes, it can be _that_ easy. See why thousands of Laravel professionals have been using Backpack, every day, since 2016.
5555

56+
## Screenshots
57+
58+
![https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif](https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif)
59+
60+
The GIF above should give you with a good idea about what Backpack will help you build. But you can also see it in action in our [live demo](https://demo.backpackforlaravel.com/admin), to get a deeper understanding of how Backpack admin panels look & feel and the amount of features it provides.
61+
5662
## Getting started
5763

5864
Start with the ["Getting Started" series](https://backpackforlaravel.com/docs/4.0/introduction) in our docs. We try to nudge you towards creating a Backpack acccount, but you don't _need_ one, if you're just trying it out.
@@ -73,12 +79,6 @@ Installation guides:
7379
- [Install Backpack 3.x on Laravel 5.3](https://laravel-backpack.readme.io/docs/installation-on-laravel-53) - last feature update was 02 Feb 2017;
7480
- [Install Backpack 3.x on Laravel 5.2](https://laravel-backpack.readme.io/docs/installation) - deprecated, lacks a lot of features;
7581

76-
## Screenshots
77-
78-
![https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif](https://user-images.githubusercontent.com/1032474/86720524-c5a1d480-c02d-11ea-87ed-d03b0197eb25.gif)
79-
80-
Play around in our [live demo](https://demo.backpackforlaravel.com/admin).
81-
8282
## Change Log
8383

8484
For the current release (4.1.x) please see [the Releases tab](https://github.com/Laravel-Backpack/CRUD/releases). For previous versions (Backpack <=4.0.x), please see our old [CHANGELOG](CHANGELOG.md) file.

src/app/Http/Controllers/Operations/FetchOperation.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ private function fetch($arg)
100100
$tempQuery = $query->{$operation}($searchColumn, $search_string);
101101
}
102102
}
103-
104-
return $tempQuery;
103+
// If developer provide an empty searchable_attributes array it means he don't want us to search
104+
// in any specific column, or try to guess the column from model identifiableAttribute.
105+
// In that scenario we will not have any $tempQuery here, so we just return the query, is up to the developer
106+
// to do his own search.
107+
return $tempQuery ?? $query;
105108
});
106109
} else {
107110
foreach ((array) $config['searchable_attributes'] as $k => $searchColumn) {

src/app/Http/Controllers/Operations/ListOperation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function search()
7474
$this->crud->applyUnappliedFilters();
7575

7676
$totalRows = $this->crud->model->count();
77-
$filteredRows = $this->crud->count();
77+
$filteredRows = $this->crud->query->toBase()->getCountForPagination();
7878
$startIndex = request()->input('start') ?: 0;
7979
// if a search term was present
8080
if (request()->input('search') && request()->input('search')['value']) {

src/app/Library/CrudPanel/Traits/AutoSet.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ trait AutoSet
1313
public function setFromDb()
1414
{
1515
if (! $this->driverIsMongoDb()) {
16-
$this->setDoctrineTypesMapping();
1716
$this->getDbColumnTypes();
1817
}
1918

@@ -53,6 +52,8 @@ public function setFromDb()
5352
*/
5453
public function getDbColumnTypes()
5554
{
55+
$this->setDoctrineTypesMapping();
56+
5657
$dbColumnTypes = [];
5758

5859
foreach ($this->getDbTableColumns() as $key => $column) {

src/app/Library/CrudPanel/Traits/Create.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private function getRelationDataFromFormData($data)
219219
foreach ($relation_fields as $relation_field) {
220220
$attributeKey = $this->parseRelationFieldNamesFromHtml([$relation_field])[0]['name'];
221221

222-
if (! is_null(Arr::get($data, $attributeKey)) && isset($relation_field['pivot']) && $relation_field['pivot'] !== true ) {
222+
if (! is_null(Arr::get($data, $attributeKey)) && isset($relation_field['pivot']) && $relation_field['pivot'] !== true) {
223223
$key = implode('.relations.', explode('.', $this->getOnlyRelationEntity($relation_field)));
224224
$fieldData = Arr::get($relationData, 'relations.'.$key, []);
225225
if (! array_key_exists('model', $fieldData)) {

src/resources/lang/en/base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'password_empty' => 'Make sure both password fields are filled out.',
4949
'password_updated' => 'Password updated.',
5050
'account_updated' => 'Account updated successfully.',
51-
'unknown_error' => 'An unknown error has occured. Please try again.',
51+
'unknown_error' => 'An unknown error has occurred. Please try again.',
5252
'error_saving' => 'Error while saving. Please try again.',
5353
'welcome' => 'Welcome!',
5454
'use_sidebar' => 'Use the sidebar to the left to create, edit or delete content.',

src/resources/lang/id/crud.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
'save_action_save_and_new' => 'Simpan dan buat baru',
1818
'save_action_save_and_edit' => 'Simpan dan lanjutkan perubahan',
1919
'save_action_save_and_back' => 'Simpan dan kembali',
20+
'save_action_save_and_preview' => 'Simpan dan lihat',
2021
'save_action_changed_notification' => 'Perilaku default setelah penyimpanan diubah.',
2122

2223
// Create form
@@ -37,15 +38,16 @@
3738
'all' => 'Semua ',
3839
'in_the_database' => 'di database',
3940
'list' => 'Daftar',
41+
'reset' => 'Set ulang',
4042
'actions' => 'Aksi',
4143
'preview' => 'Lihat',
4244
'delete' => 'Hapus',
4345
'admin' => 'Admin',
4446
'details_row' => 'Ini adalah baris rincian. Ubah sesuka Anda.',
4547
'details_row_loading_error' => 'Terjadi kesalahan saat memuat detail. Silakan coba lagi.',
4648
'clone' => 'Duplikat',
47-
'clone_success' => '<strong>Entri telah diduplikat</strong><br>Entri baru telah ditambahkan, dengan informasi yang sama.',
48-
'clone_failure' => '<strong>Proses duplikat gagal</strong><br>Entri baru tidak dapat dibuat. Silakan coba lagi.',
49+
'clone_success' => '<strong>Masukan telah diduplikat</strong><br>Masukan baru telah ditambahkan, dengan informasi yang sama.',
50+
'clone_failure' => '<strong>Proses duplikat gagal</strong><br>Masukan baru tidak dapat dibuat. Silakan coba lagi.',
4951

5052
// Confirmation messages and bubbles
5153
'delete_confirm' => 'Anda yakin ingin menghapus item ini?',
@@ -57,7 +59,7 @@
5759
'delete_confirmation_not_deleted_message' => 'Tidak ada yang terjadi. Item Anda aman.',
5860

5961
// Bulk actions
60-
'bulk_no_entries_selected_title' => 'Tidak ada entri yang dipilih',
62+
'bulk_no_entries_selected_title' => 'Tidak ada masukan yang dipilih',
6163
'bulk_no_entries_selected_message' => 'Silakan pilih satu atau lebih untuk melakukan tindakan massal pada mereka.',
6264

6365
// Bulk confirmation
@@ -73,8 +75,8 @@
7375

7476
// DataTables translation
7577
'emptyTable' => 'Tak ada data yang tersedia pada tabel ini',
76-
'info' => 'Menampilkan _START_ dari _END_ dari _TOTAL_ masukan',
77-
'infoEmpty' => '',
78+
'info' => 'Menampilkan _START_ hingga _END_ dari _TOTAL_ masukan',
79+
'infoEmpty' => 'Tidak ada masukan',
7880
'infoFiltered' => '(difilter dari _MAX_ jumlah masukan)',
7981
'infoPostFix' => '.',
8082
'thousands' => ',',
@@ -140,11 +142,18 @@
140142
'internal_link_placeholder' => 'Slug internal. Cth: \'admin/page\' (tanpa tanda kutip) untuk \':url\'',
141143
'external_link' => 'Tautan eksternal',
142144
'choose_file' => 'Pilih File',
145+
'new_item' => 'Item baru',
146+
'select_entry' => 'Pilih masukan',
147+
'select_entries' => 'Pilih masukan',
143148

144149
//Table field
145150
'table_cant_add' => 'Tidak dapat menambahkan :entity yang baru',
146151
'table_max_reached' => 'Jumlah maksimum :max telah tercapai',
147152

148153
// File manager
149154
'file_manager' => 'Manajer File',
155+
156+
// InlineCreateOperation
157+
'related_entry_created_success' => 'Masukan terkait telah dibuat dan dipilih.',
158+
'related_entry_created_error' => 'Tidak dapat membuat masukan terkait.',
150159
];

src/resources/lang/it/base.php

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
'registration_closed' => 'Le registrazioni sono chiuse.',
12+
'no_email_column' => 'Gli utenti non hanno un indirizzo email associato.',
1213
'first_page_you_see' => 'La prima pagina che vedi dopo il login',
1314
'login_status' => 'Stato autenticazione',
1415
'logged_in' => 'Sei autenticato!',
@@ -29,8 +30,8 @@
2930
'reset_password' => 'Reimposta password',
3031
'send_reset_link' => 'Invia link di reset',
3132
'click_here_to_reset' => 'Clicca qui per reimpostare la tua password',
32-
'unauthorized' => 'Non autorizzato.',
3333
'change_password' => 'Cambia Password',
34+
'unauthorized' => 'Non autorizzato.',
3435
'dashboard' => 'Dashboard',
3536
'handcrafted_by' => 'Realizzato da',
3637
'powered_by' => 'Creato con',
@@ -40,11 +41,29 @@
4041
'cancel' => 'Annulla',
4142
'error' => 'Errore',
4243
'success' => 'Operazione eseguita con successo',
44+
'warning' => 'Avvertimento',
45+
'notice' => 'Avviso',
4346
'old_password_incorrect' => 'La vecchia password non è corretta.',
4447
'password_dont_match' => 'Le password non corrispondono.',
4548
'password_empty' => 'Accertati di aver riempito entrambi i campi password.',
4649
'password_updated' => 'Password aggiornata.',
4750
'account_updated' => 'Account aggiornato con successo.',
4851
'unknown_error' => 'Si è verificato un errore sconosciuto. Riprova più tardi.',
4952
'error_saving' => 'Errore durante il salvataggio. Riprova più tardi.',
53+
'welcome' => 'Benvenuto!',
54+
'use_sidebar' => 'Utilizza la barra laterale per creare, modificare od eliminare contenuti.',
55+
56+
'password_reset' => [
57+
'greeting' => 'Ciao!',
58+
'subject' => 'Notifica di reset della password',
59+
'line_1' => 'Stai ricevendo questa e-mail in quanto abbiamo ricevuto una richiesta di reset della password dal tuo account.',
60+
'line_2' => 'Clicca il pulsante qui sotto per reimpostare la tua password:',
61+
'button' => 'Reimposta Password',
62+
'notice' => 'Se tu non hai richiesto il reset della password, non è necessaria nessun\'altra azione.',
63+
],
64+
65+
'step' => 'Passo',
66+
'confirm_email' => 'Conferma E-mail',
67+
'choose_new_password' => 'Scegli una nuova password',
68+
'confirm_new_password' => 'Conferma la nuova password',
5069
];

src/resources/lang/it/crud.php

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,37 @@
1717
'save_action_save_and_new' => 'Salva ed aggiungi un nuovo elemento',
1818
'save_action_save_and_edit' => 'Salva e modifica questo elemento',
1919
'save_action_save_and_back' => 'Salva e torna indietro',
20+
'save_action_save_and_preview' => 'Salva e vai all\'anteprima',
2021
'save_action_changed_notification' => 'Azione predefinita cambiata',
2122

2223
// Create form
2324
'add' => 'Aggiungi',
24-
'back_to_all' => 'Torna a tutti i ',
25+
'back_to_all' => 'Torna alla lista di ',
2526
'cancel' => 'Annulla',
26-
'add_a_new' => 'Aggiungi un nuovo ',
27+
'add_a_new' => 'Aggiungi nuovo/a ',
2728

2829
// Edit form
2930
'edit' => 'Modifica',
3031
'save' => 'Salva',
3132

3233
// Translatable models
33-
'edit_translations' => 'MODIFICA TRADUZIONI',
34+
'edit_translations' => 'Modifica traduzioni',
3435
'language' => 'Lingua',
3536

3637
// CRUD table view
3738
'all' => 'Tutti i ',
3839
'in_the_database' => 'nel database',
3940
'list' => 'Lista',
41+
'reset' => 'Reimposta',
4042
'actions' => 'Azioni',
4143
'preview' => 'Anteprima',
4244
'delete' => 'Elimina',
4345
'admin' => 'Amministrazione',
4446
'details_row' => 'Questa è la riga dei dettagli. Modificala a tuo piacimento.',
4547
'details_row_loading_error' => "C'è stato un errore caricando i dettagli. Riprova.",
48+
'clone' => 'Duplica',
49+
'clone_success' => '<strong>Elemento duplicato</strong><br>Un nuovo elemento è stato creato con le stesse informazioni di questo.',
50+
'clone_failure' => '<strong>Duplicazione fallita</strong><br>Il nuovo elemento non può essere creato. Per favore, riprova.',
4651

4752
// Confirmation messages and bubbles
4853
'delete_confirm' => 'Sei sicuro di eliminare questo elemento?',
@@ -55,7 +60,7 @@
5560

5661
// Bulk actions
5762
'bulk_no_entries_selected_title' => 'Nessun record selezionato',
58-
'bulk_no_entries_selected_message' => 'Seleziona uno o più record su cui effetturare l\'operaione.',
63+
'bulk_no_entries_selected_message' => 'Seleziona uno o più record su cui effettuare l\'operazione.',
5964

6065
// Bulk confirmation
6166
'bulk_delete_are_you_sure' => 'Sei sicuro di voler eliminare :number record?',
@@ -64,16 +69,17 @@
6469
'bulk_delete_error_title' => 'Record non eliminati',
6570
'bulk_delete_error_message' => 'Non è stato possibile eliminare uno o più record',
6671

72+
// Ajax errors
6773
'ajax_error_title' => 'Errore',
6874
'ajax_error_text' => 'Errore durante il caricamento della pagina. Per favore ricarica la pagina.',
6975

7076
// DataTables translation
7177
'emptyTable' => 'Nessun record da visualizzare',
7278
'info' => 'Visualizzando da _START_ a _END_ record di _TOTAL_',
73-
'infoEmpty' => '',
79+
'infoEmpty' => 'Non vi sono elementi',
7480
'infoFiltered' => '(filtrati da _MAX_ record totali)',
75-
'infoPostFix' => '.',
76-
'thousands' => ',',
81+
'infoPostFix' => ',',
82+
'thousands' => '.',
7783
'lengthMenu' => '_MENU_ record per pagina',
7884
'loadingRecords' => 'Caricamento...',
7985
'processing' => 'Elaborazione...',
@@ -136,11 +142,18 @@
136142
'internal_link_placeholder' => 'Slug interno. Es: \'admin/page\' (no quotes) for \':url\'',
137143
'external_link' => 'Link Esterno',
138144
'choose_file' => 'Scegli file',
145+
'new_item' => 'Nuovo elemento',
146+
'select_entry' => 'Seleziona un elemento',
147+
'select_entries' => 'Select degli elementi',
139148

140149
//Table field
141150
'table_cant_add' => 'Impossibile aggiungere una nuova :entity',
142151
'table_max_reached' => 'Numero massimo di :max raggiunto',
143152

144153
// File manager
145154
'file_manager' => 'File Manager',
155+
156+
// InlineCreateOperation
157+
'related_entry_created_success' => 'L\'elemento correlato è stato creato e selezionato.',
158+
'related_entry_created_error' => 'Non è possibile creare elementi correlati.',
146159
];

0 commit comments

Comments
 (0)