mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 20:05:53 +01:00
Pass original image filename via taskListMedia()
This commit is contained in:
@@ -5,8 +5,11 @@
|
|||||||
* New `Admin::getPageMedia()` static method that can be used in blueprints
|
* New `Admin::getPageMedia()` static method that can be used in blueprints
|
||||||
* Added a new `mediapicker` form field which allows to select a media from any page [#1125](https://github.com/getgrav/grav-plugin-admin/pull/1125)
|
* Added a new `mediapicker` form field which allows to select a media from any page [#1125](https://github.com/getgrav/grav-plugin-admin/pull/1125)
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
|
* Pass original image filename via the `AdminController::taskListedia()` task
|
||||||
* Various form styling improvements
|
* Various form styling improvements
|
||||||
* Provided an option to control how parent select field displays
|
* Provided an option to control how parent select field displays
|
||||||
|
1. [](#bugfix)
|
||||||
|
* Fix referencing DI element when not initialized [#1141](https://github.com/getgrav/grav-plugin-admin/pull/1141)
|
||||||
|
|
||||||
# v1.5.0-rc.2
|
# v1.5.0-rc.2
|
||||||
## 05/22/2017
|
## 05/22/2017
|
||||||
|
|||||||
@@ -1533,8 +1533,10 @@ class AdminController extends AdminBaseController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get original name
|
||||||
|
$source = $medium->higherQualityAlternative();
|
||||||
|
|
||||||
$media_list[$name] = ['url' => $medium->display($medium->get('extension') === 'svg' ? 'source' : 'thumbnail')->cropZoom(400, 300)->url(), 'size' => $medium->get('size'), 'metadata' => $metadata];
|
$media_list[$name] = ['url' => $medium->display($medium->get('extension') === 'svg' ? 'source' : 'thumbnail')->cropZoom(400, 300)->url(), 'size' => $medium->get('size'), 'metadata' => $metadata, 'original' => $source->get('filename')];
|
||||||
}
|
}
|
||||||
$this->admin->json_response = ['status' => 'success', 'results' => $media_list];
|
$this->admin->json_response = ['status' => 'success', 'results' => $media_list];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user