Skip to content

Commit bcf6c2d

Browse files
pxpmStyleCIBottabacitu
authored
Next version + add support for Backpack v7 (#71)
Co-authored-by: StyleCI Bot <bot@styleci.io> Co-authored-by: Cristian Tăbăcitu <cristitabacitu@gmail.com>
1 parent 25b5c97 commit bcf6c2d

26 files changed

+493
-1179
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"homepage": "https://github.com/laravel-backpack/filemanager",
1313
"keywords": ["Laravel", "FileManager"],
1414
"require": {
15-
"backpack/crud": "^6.0",
15+
"backpack/crud": "^7.0",
1616
"barryvdh/laravel-elfinder": "^0.5.2"
1717
},
1818
"require-dev": {
19-
"phpunit/phpunit": "^10.0",
19+
"phpunit/phpunit": "^10.0|^11.0",
2020
"mockery/mockery": "^1.5",
21-
"orchestra/testbench": "^8"
21+
"orchestra/testbench": "^8|^9|^10|^11"
2222
},
2323
"autoload": {
2424
"psr-4": {

readme.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,25 @@ That's it. Hit refresh in your admin panel, and you'll find a new sidebar item p
3434

3535
You can use elFinder in Backpack:
3636
- stand-alone, by accessing the ```/admin/elfinder``` route (see screenshot above);
37-
- inside the [```browse```](https://backpackforlaravel.com/docs/4.1/crud-fields#browse), [```browse_multiple```](https://backpackforlaravel.com/docs/4.1/crud-fields#browse_multiple) or [```ckeditor```](https://backpackforlaravel.com/docs/4.1/crud-fields#ckeditor) field types;
37+
- inside the [```browse```](https://backpackforlaravel.com/docs/4.1/crud-fields#browse), [```browse_multiple```](https://backpackforlaravel.com/docs/4.1/crud-fields#browse_multiple);
38+
39+
## Customization
40+
41+
You can publish the views to your `resources/views/vendor/backpack/filemanager` folder by running:
42+
43+
```bash
44+
php vendor:publish --provider="Backpack\FileManager\FileManagerServiceProvider" --tag="elfinder-views"
45+
php vendor:publish --provider="Backpack\FileManager\FileManagerServiceProvider" --tag="elfinder-fields"
46+
php vendor:publish --provider="Backpack\FileManager\FileManagerServiceProvider" --tag="elfinder-columns"
47+
48+
```
3849

3950
## Upgrade
4051

41-
To upgrade from v2 to v3 of this package:
52+
To upgrade from v3 to v4 of this package:
4253
```bash
4354
# remove the published blade views
4455
rm -rf resources/views/vendor/elfinder
45-
46-
# publish the new blade views
47-
php artisan backpack:filemanager:install
4856
```
4957

5058
## Security

resources/assets/css/elfinder.backpack.theme.css

Lines changed: 0 additions & 127 deletions
This file was deleted.

resources/views/ckeditor4.blade.php

Lines changed: 0 additions & 67 deletions
This file was deleted.

resources/views/ckeditor4.php

Lines changed: 0 additions & 83 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@php
2+
$column['disk'] = $column['disk'] ?? null;
3+
@endphp
4+
@include('crud::columns.upload')
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@php
2+
$column['disk'] = $column['disk'] ?? null;
3+
@endphp
4+
@include('crud::columns.upload_multiple')
Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
{{-- jQuery (REQUIRED) --}}
2-
@if (!isset ($jquery) || (isset($jquery) && $jquery == true))
3-
@basset('https://unpkg.com/jquery@3.6.1/dist/jquery.min.js')
4-
@endif
1+
{{-- jQuery (REQUIRED) --}}
2+
@if (!isset ($jquery) || (isset($jquery) && $jquery == true))
3+
@basset('https://cdn.jsdelivr.net/npm/jquery@3.6.1/dist/jquery.min.js', true, [
4+
'integrity' => 'sha384-i61gTtaoovXtAbKjo903+O55Jkn2+RtzHtvNez+yI49HAASvznhe9sZyjaSHTau9',
5+
'crossorigin' => 'anonymous'
6+
])
7+
@endif
58

6-
{{-- jQuery UI and Smoothness theme --}}
7-
@bassetArchive('https://github.com/jquery/jquery-ui/archive/refs/tags/1.13.2.tar.gz', 'jquery-ui-1.13.2')
8-
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/themes/smoothness/jquery-ui.min.css')
9-
@basset('jquery-ui-1.13.2/jquery-ui-1.13.2/dist/jquery-ui.min.js')
9+
{{-- jQuery UI and Smoothness theme --}}
10+
@basset('https://raw.githubusercontent.com/jquery/jquery-ui/refs/tags/1.13.2/dist/jquery-ui.min.js', true, [
11+
'integrity' => 'sha384-4D3G3GikQs6hLlLZGdz5wLFzuqE9v4yVGAcOH86y23JqBDPzj9viv0EqyfIa6YUL',
12+
'crossorigin' => 'anonymous'
13+
])
1014

11-
{{-- elFinder JS (REQUIRED) --}}
12-
@bassetArchive('https://github.com/Studio-42/elFinder/archive/refs/tags/2.1.64.tar.gz', 'elfinder-2.1.64')
13-
@basset('elfinder-2.1.64/elFinder-2.1.64/js/elfinder.min.js')
15+
{{-- elFinder JS (REQUIRED) --}}
16+
@basset('https://raw.githubusercontent.com/Studio-42/elFinder/refs/tags/2.1.64/js/elfinder.min.js', true, [
17+
'integrity' => 'sha384-Ow1wKIUQLS9bOa23gn7yT91nyowDhk2zK1lO7G5Hnxlh3bvTPNH7c5uODf7/jIec',
18+
'crossorigin' => 'anonymous'
19+
])
1420

15-
{{-- elFinder translation (OPTIONAL) --}}
16-
@if($locale)
17-
@basset('https://cdnjs.cloudflare.com/ajax/libs/elfinder/2.1.64/js/i18n/elfinder.'.$locale.'.min.js')
18-
@endif
21+
{{-- elFinder translation (OPTIONAL) --}}
22+
@if($locale)
23+
@basset('bp-elfinder-i18n-'.$locale)
24+
@endif
1925

20-
{{-- elFinder sounds --}}
21-
@basset(base_path('vendor/studio-42/elfinder/sounds/rm.wav'))
26+
{{-- elFinder sounds --}}
27+
@basset(base_path('vendor/studio-42/elfinder/sounds/rm.wav'))

0 commit comments

Comments
 (0)