diff --git a/resources/assets/js/storage_locations.js b/resources/assets/js/storage_locations.js new file mode 100644 index 0000000..b62d5bc --- /dev/null +++ b/resources/assets/js/storage_locations.js @@ -0,0 +1,7 @@ +function StorageLocationViewModel() +{ + this.el = '#storage-options'; + this.data = { + storage_driver: 'LocalFilesystemSource' + }; +} \ No newline at end of file diff --git a/resources/views/themes/base/admin/create_storage.blade.php b/resources/views/themes/base/admin/create_storage.blade.php index 488cfb3..8761284 100644 --- a/resources/views/themes/base/admin/create_storage.blade.php +++ b/resources/views/themes/base/admin/create_storage.blade.php @@ -2,187 +2,83 @@ @section('title', trans('admin.create_storage')) @section('breadcrumb') - + + + + @endsection @section('content')
-
+

@lang('admin.create_storage')

@lang('admin.create_storage_intro')


- {!! Form::open(['route' => 'storage.store', 'method' => 'POST']) !!} -
- {!! Form::label('name', trans('forms.name_label'), ['class' => 'control-label']) !!} - {!! Form::text('name', old('name'), ['class' => 'form-control']) !!} +
+ {{ csrf_field() }} - @if ($errors->has('name')) - - {{ $errors->first('name') }} - - @endif -
+
+ + -
- {!! Form::label('source', trans('forms.storage_driver_label'), ['class' => 'control-label']) !!} - {!! Form::select('source', $album_sources, old('source'), ['class' => 'form-control', 'data-bind' => 'value: selectedLocation']) !!} -
+ @if ($errors->has('name')) + + @endif +
-
-
-
- {!! Form::label('location', trans('forms.storage_location_label'), ['class' => 'control-label']) !!} - {!! Form::text('location', old('location', $filesystem_default_location), ['class' => 'form-control']) !!} +
+
+ + - @if ($errors->has('location')) - - {{ $errors->first('location') }} - + @if ($errors->has('source')) + @endif
-
-
-
-
- {!! Form::label('auth_url', trans('forms.storage_auth_url_label'), ['class' => 'control-label']) !!} - {!! Form::text('auth_url', old('auth_url'), ['class' => 'form-control']) !!} - - @if ($errors->has('auth_url')) - - {{ $errors->first('auth_url') }} - - @endif -
-
-
-
- {!! Form::label('tenant_name', trans('forms.storage_tenant_name_label'), ['class' => 'control-label']) !!} - {!! Form::text('tenant_name', old('tenant_name'), ['class' => 'form-control']) !!} - - @if ($errors->has('tenant_name')) - - {{ $errors->first('tenant_name') }} - - @endif -
-
-
- -
-
-
- {!! Form::label('username', trans('forms.username_label'), ['class' => 'control-label']) !!} - {!! Form::text('username', old('username'), ['class' => 'form-control']) !!} - - @if ($errors->has('username')) - - {{ $errors->first('username') }} - - @endif -
-
-
-
- {!! Form::label('password', trans('forms.password_label'), ['class' => 'control-label']) !!} - {!! Form::text('password', old('password'), ['class' => 'form-control']) !!} - - @if ($errors->has('password')) - - {{ $errors->first('password') }} - - @endif -
-
-
- -
-
-
- {!! Form::label('service_name', trans('forms.storage_service_name_label'), ['class' => 'control-label']) !!} - {!! Form::text('service_name', old('service_name'), ['class' => 'form-control']) !!} - - @if ($errors->has('service_name')) - - {{ $errors->first('service_name') }} - - @endif -
-
-
-
- {!! Form::label('service_region', trans('forms.storage_service_region_label'), ['class' => 'control-label']) !!} - {!! Form::text('service_region', old('service_region'), ['class' => 'form-control']) !!} - - @if ($errors->has('service_region')) - - {{ $errors->first('service_region') }} - - @endif -
-
-
- -
- {!! Form::label('container_name', trans('forms.storage_container_name_label'), ['class' => 'control-label']) !!} - {!! Form::text('container_name', old('container_name'), ['class' => 'form-control']) !!} - - @if ($errors->has('container_name')) - - {{ $errors->first('container_name') }} - - @endif -
- -
- {!! Form::label('cdn_url', trans('forms.storage_cdn_url_label'), ['class' => 'control-label']) !!} - {!! Form::text('cdn_url', old('cdn_url'), ['class' => 'form-control']) !!} - - @if ($errors->has('cdn_url')) - - {{ $errors->first('cdn_url') }} - - @endif -
+
+ @include(Theme::viewName('partials.admin_storages_filesystem_options'))
-
+
+ @include(Theme::viewName('partials.admin_storages_openstack_v1_options')) +
+ +
@include(Theme::viewName('partials.admin_storages_openstack_options'))
-
+
@include(Theme::viewName('partials.admin_storages_amazon_s3_options'))
-
+
@include(Theme::viewName('partials.admin_storages_rackspace_options'))
-
-
- -
+
+ +
-
- @lang('forms.cancel_action') - -
- {!! Form::close() !!} +
+ @lang('forms.cancel_action') + +
+
@@ -190,7 +86,14 @@ @push('scripts') @endpush \ No newline at end of file diff --git a/resources/views/themes/base/admin/list_storage.blade.php b/resources/views/themes/base/admin/list_storage.blade.php index 1e0ce08..163c90d 100644 --- a/resources/views/themes/base/admin/list_storage.blade.php +++ b/resources/views/themes/base/admin/list_storage.blade.php @@ -2,24 +2,18 @@ @section('title', trans('admin.storage_title')) @section('breadcrumb') - + + + @endsection @section('content')
-
+

@lang('admin.list_storages_title')

-

@lang('admin.list_storages_intro')

+ @lang('admin.list_storages_intro')
@if (count($storageLocations) == 0) @@ -38,7 +32,7 @@ - {{ $storage->name }} + {{ $storage->name }} @if ($storage->is_default) @endif @if (!$storage->is_active) @endif
@@ -50,7 +44,6 @@ - @lang('forms.edit_action') @if (!$storage->is_internal) @lang('forms.delete_action') @endif @@ -72,11 +65,13 @@
-
-
@lang('admin.legend')
-
- @lang('admin.default_storage_legend')
- @lang('admin.inactive_storage_legend') +
+
+

@lang('admin.legend')

+

+ @lang('admin.default_storage_legend')
+ @lang('admin.inactive_storage_legend') +

diff --git a/resources/views/themes/base/partials/admin_storages_filesystem_options.blade.php b/resources/views/themes/base/partials/admin_storages_filesystem_options.blade.php new file mode 100644 index 0000000..c092e76 --- /dev/null +++ b/resources/views/themes/base/partials/admin_storages_filesystem_options.blade.php @@ -0,0 +1,10 @@ +
+ + + + @if ($errors->has('location')) + + @endif +
\ No newline at end of file diff --git a/resources/views/themes/base/partials/admin_storages_openstack_v1_options.blade.php b/resources/views/themes/base/partials/admin_storages_openstack_v1_options.blade.php new file mode 100644 index 0000000..19ae431 --- /dev/null +++ b/resources/views/themes/base/partials/admin_storages_openstack_v1_options.blade.php @@ -0,0 +1,102 @@ +
+
+
+ {!! Form::label('auth_url', trans('forms.storage_auth_url_label'), ['class' => 'control-label']) !!} + {!! Form::text('auth_url', old('auth_url'), ['class' => 'form-control']) !!} + + @if ($errors->has('auth_url')) + + {{ $errors->first('auth_url') }} + + @endif +
+
+
+
+ {!! Form::label('tenant_name', trans('forms.storage_tenant_name_label'), ['class' => 'control-label']) !!} + {!! Form::text('tenant_name', old('tenant_name'), ['class' => 'form-control']) !!} + + @if ($errors->has('tenant_name')) + + {{ $errors->first('tenant_name') }} + + @endif +
+
+
+ +
+
+
+ {!! Form::label('username', trans('forms.username_label'), ['class' => 'control-label']) !!} + {!! Form::text('username', old('username'), ['class' => 'form-control']) !!} + + @if ($errors->has('username')) + + {{ $errors->first('username') }} + + @endif +
+
+
+
+ {!! Form::label('password', trans('forms.password_label'), ['class' => 'control-label']) !!} + {!! Form::text('password', old('password'), ['class' => 'form-control']) !!} + + @if ($errors->has('password')) + + {{ $errors->first('password') }} + + @endif +
+
+
+ +
+
+
+ {!! Form::label('service_name', trans('forms.storage_service_name_label'), ['class' => 'control-label']) !!} + {!! Form::text('service_name', old('service_name'), ['class' => 'form-control']) !!} + + @if ($errors->has('service_name')) + + {{ $errors->first('service_name') }} + + @endif +
+
+
+
+ {!! Form::label('service_region', trans('forms.storage_service_region_label'), ['class' => 'control-label']) !!} + {!! Form::text('service_region', old('service_region'), ['class' => 'form-control']) !!} + + @if ($errors->has('service_region')) + + {{ $errors->first('service_region') }} + + @endif +
+
+
+ +
+ {!! Form::label('container_name', trans('forms.storage_container_name_label'), ['class' => 'control-label']) !!} + {!! Form::text('container_name', old('container_name'), ['class' => 'form-control']) !!} + + @if ($errors->has('container_name')) + + {{ $errors->first('container_name') }} + + @endif +
+ +
+ {!! Form::label('cdn_url', trans('forms.storage_cdn_url_label'), ['class' => 'control-label']) !!} + {!! Form::text('cdn_url', old('cdn_url'), ['class' => 'form-control']) !!} + + @if ($errors->has('cdn_url')) + + {{ $errors->first('cdn_url') }} + + @endif +
\ No newline at end of file