77 lines
3.2 KiB
PHP
77 lines
3.2 KiB
PHP
|
@extends('themes.base.layout')
|
||
|
@section('title', trans('admin.create_storage'))
|
||
|
|
||
|
@section('breadcrumb')
|
||
|
<div class="breadcrumb">
|
||
|
<div class="container">
|
||
|
<ol class="breadcrumb">
|
||
|
<li><a href="{{ route('home') }}">@lang('navigation.breadcrumb.home')</a></li>
|
||
|
<li><a href="{{ route('admin') }}">@lang('navigation.breadcrumb.admin')</a></li>
|
||
|
<li><a href="{{ route('storage.index') }}">@lang('navigation.breadcrumb.storage')</a></li>
|
||
|
<li class="active">@lang('navigation.breadcrumb.create_storage')</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|
||
|
|
||
|
@section('content')
|
||
|
<div class="container">
|
||
|
<div class="row">
|
||
|
<div class="col-xs-12">
|
||
|
<h1>@lang('admin.create_storage')</h1>
|
||
|
<p>@lang('admin.create_storage_intro')</p>
|
||
|
<hr/>
|
||
|
|
||
|
@if (count($errors) > 0)
|
||
|
<div class="alert alert-danger">
|
||
|
<ul>
|
||
|
@foreach ($errors->all() as $error)
|
||
|
<li>{{ $error }}</li>
|
||
|
@endforeach
|
||
|
</ul>
|
||
|
</div>
|
||
|
@endif
|
||
|
|
||
|
{!! Form::open(['route' => 'storage.store', 'method' => 'POST']) !!}
|
||
|
<div class="form-group">
|
||
|
{!! Form::label('name', trans('forms.name_label'), ['class' => 'control-label']) !!}
|
||
|
{!! Form::text('name', old('name'), ['class' => 'form-control']) !!}
|
||
|
</div>
|
||
|
|
||
|
<div class="form-group">
|
||
|
{!! Form::label('source', trans('forms.album_source_label'), ['class' => 'control-label']) !!}
|
||
|
{!! Form::select('source', $album_sources, old('source'), ['class' => 'form-control', 'data-bind' => 'value: selectedLocation']) !!}
|
||
|
</div>
|
||
|
|
||
|
<div id="storage-options">
|
||
|
<div id="local-filesystem" data-bind="visible: selectedLocation() == 'LocalFilesystemSource'">
|
||
|
<div class="form-group">
|
||
|
{!! Form::label('location', trans('forms.storage_driver_label'), ['class' => 'control-label']) !!}
|
||
|
{!! Form::text('location', old('location', $filesystem_default_location), ['class' => 'form-control']) !!}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="checkbox">
|
||
|
<label>
|
||
|
<input type="checkbox" name="is_default">
|
||
|
<strong>@lang('forms.default_storage_label')</strong>
|
||
|
</label>
|
||
|
</div>
|
||
|
|
||
|
<div class="form-actions">
|
||
|
<a href="{{ route('albums.index') }}" class="btn btn-default">@lang('forms.cancel_action')</a>
|
||
|
{!! Form::submit(trans('forms.create_action'), ['class' => 'btn btn-success']) !!}
|
||
|
</div>
|
||
|
{!! Form::close() !!}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
@endsection
|
||
|
|
||
|
@push('scripts')
|
||
|
<script type="text/javascript">
|
||
|
var viewModel = new StorageLocationsViewModel();
|
||
|
ko.applyBindings(viewModel);
|
||
|
</script>
|
||
|
@endpush
|