FEATURE #1508: add directories to uploaded files
This commit contains both creating and editing directories.
This commit is contained in:
Vendored
+3
@@ -74,6 +74,9 @@ code {
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.tile-overview .directory .preview {
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.ace-editor-container {
|
||||
position: relative;
|
||||
|
||||
@@ -1,26 +1,41 @@
|
||||
<?php
|
||||
return [
|
||||
'overview' => 'List of all files',
|
||||
'upload' => 'Upload new file',
|
||||
'edit' => 'Edit file :name',
|
||||
'fileInfo' => 'Information',
|
||||
'createdAt' => 'Uploaded',
|
||||
'updatedAt' => 'Last change',
|
||||
'originalFilename' => 'Original filename',
|
||||
'url' => 'Public URL',
|
||||
'fileSize' => 'File size',
|
||||
'encoding' => 'Encoding',
|
||||
'resolution' => 'Resolution',
|
||||
'editButton' => 'Edit',
|
||||
'successfullyChanged' => 'Successfully saved',
|
||||
'newFile' => 'New file',
|
||||
'hash' => 'Hash',
|
||||
'mime' => 'MIME type',
|
||||
'invalidFile' => 'The file you submitted is somehow not valid file!',
|
||||
'noFileSpecified' => 'You have not specified any file for upload',
|
||||
'uploadSuccessfull' => 'Your file was successfully uploaded',
|
||||
'selectFile' => 'Select file for upload',
|
||||
'keywords' => 'Keywords (comma separated)',
|
||||
'description' => 'File description',
|
||||
'noFiles' => 'No files were found. Try to upload some.'
|
||||
'overview' => 'List of all files',
|
||||
'upload' => 'Upload new file',
|
||||
'edit' => 'Edit file :name',
|
||||
'fileInfo' => 'Information',
|
||||
'createdAt' => 'Uploaded',
|
||||
'updatedAt' => 'Last change',
|
||||
'originalFilename' => 'Original filename',
|
||||
'url' => 'Public URL',
|
||||
'fileSize' => 'File size',
|
||||
'encoding' => 'Encoding',
|
||||
'resolution' => 'Resolution',
|
||||
'editButton' => 'Edit',
|
||||
'successfullyChanged' => 'Successfully saved',
|
||||
'newFile' => 'New file',
|
||||
'hash' => 'Hash',
|
||||
'mime' => 'MIME type',
|
||||
'invalidFile' => 'The file you submitted is somehow not valid file!',
|
||||
'noFileSpecified' => 'You have not specified any file for upload',
|
||||
'uploadSuccessfull' => 'Your file was successfully uploaded',
|
||||
'selectFile' => 'Select file for upload',
|
||||
'keywords' => 'Keywords (comma separated)',
|
||||
'description' => 'File description',
|
||||
'noFiles' => 'No files were found. Try to upload some.',
|
||||
'directories' => 'Subdirectories in :directory directory',
|
||||
'rootDirectories' => 'Root directories',
|
||||
'newDirectory' => 'Create new directory',
|
||||
'newDirectorySuccess' => 'New directory successfully created',
|
||||
'createSubdirectoryFor' => 'Create subdirectory for :directory.',
|
||||
'noSubdirectories' => 'No subdirectories available.',
|
||||
'directoryName' => 'Directory name',
|
||||
'directoryDescription' => 'Directory description',
|
||||
'directoryHidden' => 'Hidden directory',
|
||||
'subdirectoryExists' => 'Directory with this name already exists',
|
||||
'parentDirectory' => 'Parent directory',
|
||||
'editDirectory' => 'Edit directory',
|
||||
'editDirectorySuccess' => 'Succesfully edited',
|
||||
'fileDeleted' => 'File deleted',
|
||||
|
||||
];
|
||||
@@ -23,7 +23,8 @@ return [
|
||||
'widgetsOverview' => 'All widgets',
|
||||
'assignWidgets' => 'Assign widgets',
|
||||
'templates' => 'Templates',
|
||||
'contentPages' => 'Web content',
|
||||
'contentPageOverview' => 'Overview',
|
||||
'newContentPage' => 'New content'
|
||||
'contentPages' => 'Web content',
|
||||
'contentPageOverview' => 'Overview',
|
||||
'newContentPage' => 'New content',
|
||||
'directories' => 'Directories'
|
||||
];
|
||||
@@ -0,0 +1,20 @@
|
||||
<h3>@lang('admin/fileManager.editDirectory')</h3>
|
||||
|
||||
<form method="POST" action="{{route('upload.postEditDirectory', ['id' => $directory->id])}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<label>
|
||||
@lang('admin/fileManager.directoryName')
|
||||
|
||||
<input type="text" name="name" value="{{old('name', $directory->name)}}" />
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/fileManager.directoryDescription')
|
||||
|
||||
<textarea name="description" rows="3">{{old('description', $directory->description)}}</textarea>
|
||||
</label>
|
||||
|
||||
<button type="submit" class="button success">@lang('admin/fileManager.editDirectory')</button>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,36 @@
|
||||
<h3>@lang('admin/fileManager.newDirectory')</h3>
|
||||
|
||||
<form method="POST" action="{{route('upload.postNewDirectory')}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
@if($directory->id)
|
||||
<input type="hidden" value="{{$directory->id}}" name="parentDirectory" />
|
||||
@endif
|
||||
|
||||
<label>
|
||||
@lang('admin/fileManager.directoryName')
|
||||
|
||||
<input type="text" name="name" value="{{old('name')}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('name'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('name') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<label>
|
||||
@lang('admin/fileManager.directoryDescription')
|
||||
|
||||
<textarea name="description" rows="2">{{old('description')}}</textarea>
|
||||
|
||||
@if (isset($errors) && $errors->has('description'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('description') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<button type="submit" class="button success">@lang('admin/fileManager.newDirectory')</button>
|
||||
|
||||
</form>
|
||||
@@ -0,0 +1,36 @@
|
||||
<div class="tile-overview" data-equalizer>
|
||||
|
||||
@if($directory->id)
|
||||
<div class="columns large-2">
|
||||
<div class="item directory" data-equalizer-watch>
|
||||
<div class="preview row">
|
||||
<a href="{{route('upload.overview', ['id' => $directory->parent_id])}}">
|
||||
<i class="fa fa-level-up"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="detail row text-center highlight">
|
||||
@lang('admin/fileManager.parentDirectory')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@forelse($subdirectories as $dir)
|
||||
|
||||
<div class="columns large-2">
|
||||
<div class="item directory" data-equalizer-watch>
|
||||
<div class="preview row">
|
||||
<a href="{{route('upload.overview', ['id' => $dir->id])}}">
|
||||
<i class="fa fa-folder"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="detail row text-center highlight">
|
||||
{{str_limit($dir->name, 15)}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
{{--<em>@lang('admin/fileManager.noSubdirectories')</em>--}}
|
||||
@endforelse
|
||||
</div>
|
||||
Reference in New Issue
Block a user