#123: Display list of storages on the Image Processing tab

This commit is contained in:
Andy Heathershaw 2019-07-12 07:26:02 +01:00
parent f26f545b76
commit cffe8332fc
2 changed files with 11 additions and 1 deletions

View File

@ -368,9 +368,17 @@ class DefaultController extends Controller
$themeNamesLookup = UserConfig::allowedThemeNames(); $themeNamesLookup = UserConfig::allowedThemeNames();
// Storage sources for the Image Processing tab
$storageSources = [];
foreach (Storage::where('is_active', true)->orderBy('name')->get() as $storage)
{
$storageSources[$storage->id] = $storage->name;
}
return Theme::render('admin.settings', [ return Theme::render('admin.settings', [
'config' => $config, 'config' => $config,
'date_formats' => $dateFormatsLookup, 'date_formats' => $dateFormatsLookup,
'storage_sources' => $storageSources,
'success' => $request->session()->get('success'), 'success' => $request->session()->get('success'),
'theme_names' => $themeNamesLookup 'theme_names' => $themeNamesLookup
]); ]);

View File

@ -208,7 +208,9 @@
<div class="form-group"> <div class="form-group">
<label class="form-control-label" for="analysis-queue-storage-location">Analysis queue storage:</label> <label class="form-control-label" for="analysis-queue-storage-location">Analysis queue storage:</label>
<select class="form-control{{ $errors->has('analysis_queue_storage_location') ? ' is-invalid' : '' }}" id="analysis-queue-storage-location" name="analysis_queue_storage_location"> <select class="form-control{{ $errors->has('analysis_queue_storage_location') ? ' is-invalid' : '' }}" id="analysis-queue-storage-location" name="analysis_queue_storage_location">
<option value="{{ old('analysis_queue_storage_location', $config['analysis_queue_storage_location']) }}"></option> @foreach ($storage_sources as $key => $value)
<option value="{{ $key }}"{{ $key == old('analysis_queue_storage_location', $config['analysis_queue_storage_location']) ? ' selected="selected"' : '' }}>{{ $value }}</option>
@endforeach
</select> </select>
@if ($errors->has('analysis_queue_storage_location')) @if ($errors->has('analysis_queue_storage_location'))