Booking, QI Content, Trees, Media
This commit is contained in:
parent
1f340e96fa
commit
7fbac395a9
260 changed files with 27160 additions and 3773 deletions
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Routing\Controller as BaseController;
|
||||
use Illuminate\Foundation\Validation\ValidatesRequests;
|
||||
|
||||
abstract class Controller extends BaseController
|
||||
{
|
||||
use DispatchesJobs, ValidatesRequests;
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use Intervention\Image\Facades\Image;
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsCropping;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasCropped;
|
||||
|
||||
class CropController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Show crop page.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCrop()
|
||||
{
|
||||
return view('laravel-filemanager::crop')
|
||||
->with([
|
||||
'working_dir' => request('working_dir'),
|
||||
'img' => $this->lfm->pretty(request('img'))
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crop the image (called via ajax).
|
||||
*/
|
||||
public function getCropimage($overWrite = true)
|
||||
{
|
||||
$image_name = request('img');
|
||||
$image_path = $this->lfm->setName($image_name)->path('absolute');
|
||||
$crop_path = $image_path;
|
||||
|
||||
if (! $overWrite) {
|
||||
$fileParts = explode('.', $image_name);
|
||||
$fileParts[count($fileParts) - 2] = $fileParts[count($fileParts) - 2] . '_cropped_' . time();
|
||||
$crop_path = $this->lfm->setName(implode('.', $fileParts))->path('absolute');
|
||||
}
|
||||
|
||||
event(new ImageIsCropping($image_path));
|
||||
|
||||
$crop_info = request()->only('dataWidth', 'dataHeight', 'dataX', 'dataY');
|
||||
|
||||
// crop image
|
||||
Image::make($image_path)
|
||||
->crop(...array_values($crop_info))
|
||||
->save($crop_path);
|
||||
|
||||
// make new thumbnail
|
||||
$this->lfm->makeThumbnail($image_name);
|
||||
|
||||
event(new ImageWasCropped($image_path));
|
||||
}
|
||||
|
||||
public function getNewCropimage()
|
||||
{
|
||||
$this->getCropimage(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsDeleting;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasDeleted;
|
||||
|
||||
class DeleteController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Delete image and associated thumbnail.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getDelete()
|
||||
{
|
||||
$item_names = request('items');
|
||||
|
||||
$errors = [];
|
||||
|
||||
foreach ($item_names as $name_to_delete) {
|
||||
$file_to_delete = $this->lfm->pretty($name_to_delete);
|
||||
$file_path = $file_to_delete->path();
|
||||
|
||||
|
||||
event(new ImageIsDeleting($file_path));
|
||||
|
||||
if (is_null($name_to_delete)) {
|
||||
return $this->response('error', parent::getError('folder-name'));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (! $this->lfm->setName($name_to_delete)->exists()) {
|
||||
return $this->response('error', parent::getError('folder-not-found', ['folder' => $file_path]));
|
||||
}
|
||||
|
||||
if ($this->lfm->setName($name_to_delete)->isDirectory()) {
|
||||
if (! $this->lfm->setName($name_to_delete)->directoryIsEmpty()) {
|
||||
return $this->response('error', parent::getError('delete-folder'));
|
||||
}
|
||||
} else {
|
||||
if ($file_to_delete->isImage()) {
|
||||
$this->lfm->setName($name_to_delete)->thumb()->delete();
|
||||
}
|
||||
}
|
||||
$file_to_delete->deleteModel();
|
||||
$this->lfm->setName($name_to_delete)->delete();
|
||||
|
||||
event(new ImageWasDeleted($file_path));
|
||||
}
|
||||
|
||||
if (count($errors) > 0) {
|
||||
return $this->response('error', $errors);
|
||||
}
|
||||
|
||||
return parent::$success_response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
class DemoController extends LfmController
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('laravel-filemanager::demo');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
class DownloadController extends LfmController
|
||||
{
|
||||
public function getDownload()
|
||||
{
|
||||
return response()->download($this->lfm->setName(request('file'))->path('absolute'));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
class FolderController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Get list of folders as json to populate treeview.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getFolders()
|
||||
{
|
||||
$folder_types = array_filter(['user', 'share'], function ($type) {
|
||||
return $this->helper->allowFolderType($type);
|
||||
});
|
||||
|
||||
return view('laravel-filemanager::tree')
|
||||
->with([
|
||||
'root_folders' => array_map(function ($type) use ($folder_types) {
|
||||
$path = $this->lfm->dir($this->helper->getRootFolder($type));
|
||||
|
||||
return (object) [
|
||||
'name' => trans('laravel-filemanager::lfm.title-' . $type),
|
||||
'url' => $path->path('working_dir'),
|
||||
'children' => $path->folders(),
|
||||
'has_next' => ! ($type == end($folder_types)),
|
||||
];
|
||||
}, $folder_types),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new folder.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAddfolder()
|
||||
{
|
||||
$folder_name = $this->helper->input('name');
|
||||
|
||||
if(config('lfm.alphanumeric_directory')){
|
||||
$folder_name = $this->helper->sanitize($folder_name);
|
||||
}
|
||||
try {
|
||||
if (empty($folder_name)) {
|
||||
return $this->helper->error('folder-name');
|
||||
} elseif ($this->lfm->setName($folder_name)->exists()) {
|
||||
return $this->helper->error('folder-exist');
|
||||
} elseif (config('lfm.alphanumeric_directory') && preg_match('/[^\w-]/i', $folder_name)) {
|
||||
return $this->helper->error('folder-alnum');
|
||||
} else {
|
||||
$this->lfm->setName($folder_name)->createFolder();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return $e->getMessage();
|
||||
}
|
||||
|
||||
return parent::$success_response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use IqContent\LaravelFilemanager\Events\FileIsMoving;
|
||||
use IqContent\LaravelFilemanager\Events\FileWasMoving;
|
||||
use IqContent\LaravelFilemanager\Events\FolderIsMoving;
|
||||
use IqContent\LaravelFilemanager\Events\FolderWasMoving;
|
||||
|
||||
class ItemsController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Get the images to load for a selected folder.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
return [
|
||||
'items' => array_map(function ($item) {
|
||||
return $item->fill()->attributes;
|
||||
}, array_merge($this->lfm->folders(), $this->lfm->files())),
|
||||
'display' => $this->helper->getDisplayMode(),
|
||||
'working_dir' => $this->lfm->path('working_dir'),
|
||||
];
|
||||
}
|
||||
|
||||
public function move()
|
||||
{
|
||||
$items = request('items');
|
||||
$folder_types = array_filter(['user', 'share'], function ($type) {
|
||||
return $this->helper->allowFolderType($type);
|
||||
});
|
||||
return view('laravel-filemanager::move')
|
||||
->with([
|
||||
'root_folders' => array_map(function ($type) use ($folder_types) {
|
||||
$path = $this->lfm->dir($this->helper->getRootFolder($type));
|
||||
|
||||
return (object) [
|
||||
'name' => trans('laravel-filemanager::lfm.title-' . $type),
|
||||
'url' => $path->path('working_dir'),
|
||||
'children' => $path->folders(),
|
||||
'has_next' => ! ($type == end($folder_types)),
|
||||
];
|
||||
}, $folder_types),
|
||||
])
|
||||
->with('items', $items);
|
||||
}
|
||||
|
||||
public function domove()
|
||||
{
|
||||
$target = $this->helper->input('goToFolder');
|
||||
$items = $this->helper->input('items');
|
||||
|
||||
foreach ($items as $item) {
|
||||
$old_file = $this->lfm->pretty($item);
|
||||
$is_directory = $old_file->isDirectory();
|
||||
|
||||
if ($old_file->hasThumb()) {
|
||||
$new_file = $this->lfm->setName($item)->thumb()->dir($target);
|
||||
if ($is_directory) {
|
||||
event(new FolderIsMoving($old_file->path(), $new_file->path()));
|
||||
} else {
|
||||
event(new FileIsMoving($old_file->path(), $new_file->path()));
|
||||
}
|
||||
$this->lfm->setName($item)->thumb()->move($new_file);
|
||||
}
|
||||
$new_file = $this->lfm->setName($item)->dir($target);
|
||||
$this->lfm->setName($item)->move($new_file);
|
||||
if ($is_directory) {
|
||||
event(new FolderWasMoving($old_file->path(), $new_file->path()));
|
||||
} else {
|
||||
event(new FileWasMoving($old_file->path(), $new_file->path()));
|
||||
}
|
||||
};
|
||||
|
||||
return parent::$success_response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use IqContent\LaravelFilemanager\Lfm;
|
||||
use IqContent\LaravelFilemanager\LfmPath;
|
||||
|
||||
class LfmController extends Controller
|
||||
{
|
||||
protected static $success_response = 'OK';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->applyIniOverrides();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up needed functions.
|
||||
*
|
||||
* @return object|null
|
||||
*/
|
||||
public function __get($var_name)
|
||||
{
|
||||
if ($var_name === 'lfm') {
|
||||
return app(LfmPath::class);
|
||||
} elseif ($var_name === 'helper') {
|
||||
return app(Lfm::class);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the filemanager.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
return view('laravel-filemanager::index')
|
||||
->withHelper($this->helper);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if any extension or config is missing.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getErrors()
|
||||
{
|
||||
$arr_errors = [];
|
||||
|
||||
if (! extension_loaded('gd') && ! extension_loaded('imagick')) {
|
||||
array_push($arr_errors, trans('laravel-filemanager::lfm.message-extension_not_found'));
|
||||
}
|
||||
|
||||
if (! extension_loaded('exif')) {
|
||||
array_push($arr_errors, 'EXIF extension not found.');
|
||||
}
|
||||
|
||||
if (! extension_loaded('fileinfo')) {
|
||||
array_push($arr_errors, 'Fileinfo extension not found.');
|
||||
}
|
||||
|
||||
$mine_config_key = 'lfm.folder_categories.'
|
||||
. $this->helper->currentLfmType()
|
||||
. '.valid_mime';
|
||||
|
||||
if (! is_array(config($mine_config_key))) {
|
||||
array_push($arr_errors, 'Config : ' . $mine_config_key . ' is not a valid array.');
|
||||
}
|
||||
|
||||
return $arr_errors;
|
||||
}
|
||||
|
||||
public function error($error_type, $variables = [])
|
||||
{
|
||||
return $this->helper->error($error_type, $variables);
|
||||
}
|
||||
|
||||
public function getError($error_type, $variables = [])
|
||||
{
|
||||
return $this->helper->getError($error_type, $variables);
|
||||
}
|
||||
|
||||
|
||||
public function response($error_type, $variables = [])
|
||||
{
|
||||
return $this->helper->response($error_type, $variables);
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides settings in php.ini.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function applyIniOverrides()
|
||||
{
|
||||
$overrides = config('lfm.php_ini_overrides');
|
||||
if ($overrides && is_array($overrides) && count($overrides) === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($overrides as $key => $value) {
|
||||
if ($value && $value != 'false') {
|
||||
ini_set($key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class RedirectController extends LfmController
|
||||
{
|
||||
public function showFile($file_path)
|
||||
{
|
||||
$storage = Storage::disk($this->helper->config('disk'));
|
||||
|
||||
if (! $storage->exists($file_path)) {
|
||||
abort(404);
|
||||
}
|
||||
|
||||
return response($storage->get($file_path))
|
||||
->header('Content-Type', $storage->mimeType($file_path));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsRenaming;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasRenamed;
|
||||
use IqContent\LaravelFilemanager\Events\FolderIsRenaming;
|
||||
use IqContent\LaravelFilemanager\Events\FolderWasRenamed;
|
||||
|
||||
class RenameController extends LfmController
|
||||
{
|
||||
public function getRename()
|
||||
{
|
||||
$old_name = $this->helper->input('file');
|
||||
$new_name = $this->helper->input('new_name');
|
||||
|
||||
|
||||
|
||||
$old_file = $this->lfm->pretty($old_name);
|
||||
|
||||
return $old_file->path('working_dir');
|
||||
|
||||
|
||||
$is_directory = $old_file->isDirectory();
|
||||
|
||||
if (empty($new_name)) {
|
||||
if ($is_directory) {
|
||||
return $this->response('error', parent::getError('folder-name'));
|
||||
} else {
|
||||
return $this->response('error', parent::getError('file-name'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($is_directory) {
|
||||
if(config('lfm.alphanumeric_directory')){
|
||||
$new_name = $this->helper->sanitize($new_name);
|
||||
if(preg_match('/[^\w-]/i', $new_name)){
|
||||
return $this->response('error', parent::getError('folder-alnum'));
|
||||
}
|
||||
}
|
||||
}else {
|
||||
if (config('lfm.alphanumeric_filename')) {
|
||||
$extension = $old_file->extension();
|
||||
if ($extension) {
|
||||
$new_name = str_replace('.' . $extension, '', $new_name);
|
||||
$new_name = $this->helper->sanitize($new_name) . '.' . $extension;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($this->lfm->setName($new_name)->exists()) {
|
||||
return $this->response('error', parent::getError('rename'));
|
||||
}
|
||||
|
||||
if (! $is_directory) {
|
||||
$extension = $old_file->extension();
|
||||
if ($extension) {
|
||||
$new_name = str_replace('.' . $extension, '', $new_name) . '.' . $extension;
|
||||
}
|
||||
}
|
||||
|
||||
$new_file = $this->lfm->setName($new_name)->path('absolute');
|
||||
|
||||
if ($is_directory) {
|
||||
event(new FolderIsRenaming($old_file->path(), $new_file));
|
||||
} else {
|
||||
event(new ImageIsRenaming($old_file->path(), $new_file));
|
||||
}
|
||||
|
||||
if ($old_file->hasThumb()) {
|
||||
$this->lfm->setName($old_name)->thumb()
|
||||
->move($this->lfm->setName($new_name)->thumb());
|
||||
}
|
||||
|
||||
$this->lfm->setName($old_name)
|
||||
->move($this->lfm->setName($new_name));
|
||||
|
||||
//->renameModel($new_name)
|
||||
|
||||
|
||||
|
||||
if ($is_directory) {
|
||||
event(new FolderWasRenamed($old_file->path(), $new_file));
|
||||
} else {
|
||||
event(new ImageWasRenamed($old_file->path(), $new_file));
|
||||
}
|
||||
|
||||
return parent::$success_response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use Intervention\Image\Facades\Image;
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsResizing;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasResized;
|
||||
|
||||
class ResizeController extends LfmController
|
||||
{
|
||||
/**
|
||||
* Dipsplay image for resizing.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getResize()
|
||||
{
|
||||
$ratio = 1.0;
|
||||
$image = request('img');
|
||||
|
||||
$original_image = Image::make($this->lfm->setName($image)->path('absolute'));
|
||||
$original_width = $original_image->width();
|
||||
$original_height = $original_image->height();
|
||||
|
||||
$scaled = false;
|
||||
|
||||
// FIXME size should be configurable
|
||||
if ($original_width > 600) {
|
||||
$ratio = 600 / $original_width;
|
||||
$width = $original_width * $ratio;
|
||||
$height = $original_height * $ratio;
|
||||
$scaled = true;
|
||||
} else {
|
||||
$width = $original_width;
|
||||
$height = $original_height;
|
||||
}
|
||||
|
||||
if ($height > 400) {
|
||||
$ratio = 400 / $original_height;
|
||||
$width = $original_width * $ratio;
|
||||
$height = $original_height * $ratio;
|
||||
$scaled = true;
|
||||
}
|
||||
|
||||
return view('laravel-filemanager::resize')
|
||||
->with('img', $this->lfm->pretty($image))
|
||||
->with('height', number_format($height, 0))
|
||||
->with('width', $width)
|
||||
->with('original_height', $original_height)
|
||||
->with('original_width', $original_width)
|
||||
->with('scaled', $scaled)
|
||||
->with('ratio', $ratio);
|
||||
}
|
||||
|
||||
public function performResize()
|
||||
{
|
||||
$image_path = $this->lfm->setName(request('img'))->path('absolute');
|
||||
|
||||
event(new ImageIsResizing($image_path));
|
||||
Image::make($image_path)->resize(request('dataWidth'), request('dataHeight'))->save();
|
||||
event(new ImageWasResized($image_path));
|
||||
|
||||
return parent::$success_response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Controllers;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsUploading;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasUploaded;
|
||||
use IqContent\LaravelFilemanager\Lfm;
|
||||
|
||||
class UploadController extends LfmController
|
||||
{
|
||||
protected $errors;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->errors = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload files
|
||||
*
|
||||
* @param void
|
||||
* @return string
|
||||
*/
|
||||
public function upload()
|
||||
{
|
||||
$uploaded_files = request()->file('upload');
|
||||
$error_bag = [];
|
||||
$new_filename = null;
|
||||
|
||||
foreach (is_array($uploaded_files) ? $uploaded_files : [$uploaded_files] as $file) {
|
||||
try {
|
||||
$new_filename = $this->lfm->upload($file);
|
||||
} catch (\Exception $e) {
|
||||
Log::error($e->getMessage(), [
|
||||
'file' => $e->getFile(),
|
||||
'line' => $e->getLine(),
|
||||
'trace' => $e->getTraceAsString()
|
||||
]);
|
||||
array_push($error_bag, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($uploaded_files)) {
|
||||
$response = count($error_bag) > 0 ? $error_bag : parent::$success_response;
|
||||
} else { // upload via ckeditor 'Upload' tab
|
||||
if (is_null($new_filename)) {
|
||||
$response = $error_bag[0];
|
||||
} else {
|
||||
$response = view(Lfm::PACKAGE_NAME . '::use')
|
||||
->withFile($this->lfm->setName($new_filename)->url());
|
||||
}
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FileIsMoving
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FileWasMoving
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FolderIsMoving
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FolderIsRenaming
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FolderWasMoving
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
28
packages/iqcontent/laravel-filemanager/src/Events/FolderWasRenamed.php
Executable file
28
packages/iqcontent/laravel-filemanager/src/Events/FolderWasRenamed.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class FolderWasRenamed
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageIsCropping
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageIsDeleting
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageIsRenaming
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageIsResizing
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageIsUploading
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageWasCropped
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
21
packages/iqcontent/laravel-filemanager/src/Events/ImageWasDeleted.php
Executable file
21
packages/iqcontent/laravel-filemanager/src/Events/ImageWasDeleted.php
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageWasDeleted
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
28
packages/iqcontent/laravel-filemanager/src/Events/ImageWasRenamed.php
Executable file
28
packages/iqcontent/laravel-filemanager/src/Events/ImageWasRenamed.php
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageWasRenamed
|
||||
{
|
||||
private $old_path;
|
||||
private $new_path;
|
||||
|
||||
public function __construct($old_path, $new_path)
|
||||
{
|
||||
$this->old_path = $old_path;
|
||||
$this->new_path = $new_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function oldPath()
|
||||
{
|
||||
return $this->old_path;
|
||||
}
|
||||
|
||||
public function newPath()
|
||||
{
|
||||
return $this->new_path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageWasResized
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Events;
|
||||
|
||||
class ImageWasUploaded
|
||||
{
|
||||
private $path;
|
||||
|
||||
public function __construct($path)
|
||||
{
|
||||
$this->path = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function path()
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Handlers;
|
||||
|
||||
class ConfigHandler
|
||||
{
|
||||
public function userField()
|
||||
{
|
||||
return auth()->id();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App\Handlers;
|
||||
|
||||
class LfmConfigHandler extends \IqContent\LaravelFilemanager\Handlers\ConfigHandler
|
||||
{
|
||||
public function userField()
|
||||
{
|
||||
return parent::userField();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager;
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
/**
|
||||
* Class LaravelFilemanagerServiceProvider.
|
||||
*/
|
||||
class LaravelFilemanagerServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
$this->loadTranslationsFrom(__DIR__.'/lang', 'laravel-filemanager');
|
||||
|
||||
$this->loadViewsFrom(__DIR__.'/views', 'laravel-filemanager');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__ . '/config/lfm.php' => base_path('config/lfm.php'),
|
||||
], 'lfm_config');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/../public' => public_path('vendor/laravel-filemanager'),
|
||||
], 'lfm_public');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/views' => base_path('resources/views/vendor/laravel-filemanager'),
|
||||
], 'lfm_view');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/Handlers/LfmConfigHandler.php' => base_path('app/Handlers/LfmConfigHandler.php'),
|
||||
], 'lfm_handler');
|
||||
|
||||
$this->publishes([
|
||||
__DIR__.'/../database/migrations' => base_path('database/migrations'),
|
||||
], 'lfm_migrations');
|
||||
|
||||
if (config('lfm.use_package_routes')) {
|
||||
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
|
||||
\IqContent\LaravelFilemanager\Lfm::routes();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton('laravel-filemanager', function () {
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
380
packages/iqcontent/laravel-filemanager/src/Lfm.php
Normal file
380
packages/iqcontent/laravel-filemanager/src/Lfm.php
Normal file
|
|
@ -0,0 +1,380 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager;
|
||||
|
||||
use Illuminate\Contracts\Config\Repository as Config;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use IqContent\LaravelFilemanager\Middlewares\CreateDefaultFolder;
|
||||
use IqContent\LaravelFilemanager\Middlewares\MultiUser;
|
||||
|
||||
class Lfm
|
||||
{
|
||||
const PACKAGE_NAME = 'laravel-filemanager';
|
||||
const DS = '/';
|
||||
|
||||
protected $config;
|
||||
protected $request;
|
||||
|
||||
public function __construct(Config $config = null, Request $request = null)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function getStorage($storage_path)
|
||||
{
|
||||
return new LfmStorageRepository($storage_path, $this);
|
||||
}
|
||||
|
||||
public function input($key)
|
||||
{
|
||||
return $this->translateFromUtf8($this->request->input($key));
|
||||
}
|
||||
|
||||
public function config($key)
|
||||
{
|
||||
return $this->config->get('lfm.' . $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get only the file name.
|
||||
*
|
||||
* @param string $path Real path of a file.
|
||||
* @return string
|
||||
*/
|
||||
public function getNameFromPath($path)
|
||||
{
|
||||
return pathinfo($path, PATHINFO_BASENAME);
|
||||
}
|
||||
|
||||
public function getDirFromPath($path)
|
||||
{
|
||||
return pathinfo($path, PATHINFO_DIRNAME);
|
||||
}
|
||||
|
||||
public function allowFolderType($type)
|
||||
{
|
||||
if ($type == 'user') {
|
||||
return $this->allowMultiUser();
|
||||
} else {
|
||||
return $this->allowShareFolder();
|
||||
}
|
||||
}
|
||||
|
||||
public function getCategoryName()
|
||||
{
|
||||
$type = $this->currentLfmType();
|
||||
|
||||
return $this->config->get('lfm.folder_categories.' . $type . '.folder_name', 'files');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get current lfm type.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function currentLfmType()
|
||||
{
|
||||
$lfm_type = 'file';
|
||||
|
||||
$request_type = lcfirst(str_singular($this->input('type') ?: ''));
|
||||
$available_types = array_keys($this->config->get('lfm.folder_categories') ?: []);
|
||||
|
||||
if (in_array($request_type, $available_types)) {
|
||||
$lfm_type = $request_type;
|
||||
}
|
||||
|
||||
return $lfm_type;
|
||||
}
|
||||
|
||||
public function getDisplayMode()
|
||||
{
|
||||
$type_key = $this->currentLfmType();
|
||||
$startup_view = $this->config->get('lfm.folder_categories.' . $type_key . '.startup_view');
|
||||
|
||||
$view_type = 'grid';
|
||||
$target_display_type = $this->input('show_list') ?: $startup_view;
|
||||
|
||||
if (in_array($target_display_type, ['list', 'grid'])) {
|
||||
$view_type = $target_display_type;
|
||||
}
|
||||
|
||||
return $view_type;
|
||||
}
|
||||
|
||||
public function getUserSlug()
|
||||
{
|
||||
$config = $this->config->get('lfm.user_folder_name');
|
||||
|
||||
if (is_callable($config)) {
|
||||
return call_user_func($config);
|
||||
}
|
||||
|
||||
if (class_exists($config)) {
|
||||
return app()->make($config)->userField();
|
||||
}
|
||||
|
||||
return empty(auth()->user()) ? '' : auth()->user()->$config;
|
||||
}
|
||||
|
||||
public function getRootFolder($type = null)
|
||||
{
|
||||
if (is_null($type)) {
|
||||
$type = 'share';
|
||||
if ($this->allowFolderType('user')) {
|
||||
$type = 'user';
|
||||
}
|
||||
}
|
||||
|
||||
if ($type === 'user') {
|
||||
$folder = $this->getUserSlug();
|
||||
} else {
|
||||
$folder = $this->config->get('lfm.shared_folder_name');
|
||||
}
|
||||
|
||||
// the slash is for url, dont replace it with directory seperator
|
||||
return '/' . $folder;
|
||||
}
|
||||
|
||||
public function getThumbFolderName()
|
||||
{
|
||||
return $this->config->get('lfm.thumb_folder_name');
|
||||
}
|
||||
|
||||
public function getFileIcon($ext)
|
||||
{
|
||||
return $this->config->get("lfm.file_icon_array.{$ext}", 'fa-file');
|
||||
}
|
||||
|
||||
public function getFileType($ext)
|
||||
{
|
||||
return $this->config->get("lfm.file_type_array.{$ext}", 'File');
|
||||
}
|
||||
|
||||
public function availableMimeTypes()
|
||||
{
|
||||
return $this->config->get('lfm.folder_categories.' . $this->currentLfmType() . '.valid_mime');
|
||||
}
|
||||
|
||||
public function maxUploadSize()
|
||||
{
|
||||
return $this->config->get('lfm.folder_categories.' . $this->currentLfmType() . '.max_size');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if users are allowed to use their private folders.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function allowMultiUser()
|
||||
{
|
||||
return $this->config->get('lfm.allow_multi_user') === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if users are allowed to use the shared folder.
|
||||
* This can be disabled only when allowMultiUser() is true.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function allowShareFolder()
|
||||
{
|
||||
if (! $this->allowMultiUser()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $this->config->get('lfm.allow_share_folder') === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate file name to make it compatible on Windows.
|
||||
*
|
||||
* @param string $input Any string.
|
||||
* @return string
|
||||
*/
|
||||
public function translateFromUtf8($input)
|
||||
{
|
||||
if ($this->isRunningOnWindows()) {
|
||||
$input = iconv('UTF-8', mb_detect_encoding($input), $input);
|
||||
}
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get directory seperator of current operating system.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function ds()
|
||||
{
|
||||
$ds = Lfm::DS;
|
||||
if ($this->isRunningOnWindows()) {
|
||||
$ds = '\\';
|
||||
}
|
||||
|
||||
return $ds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check current operating system is Windows or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isRunningOnWindows()
|
||||
{
|
||||
return strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorter function of getting localized error message..
|
||||
*
|
||||
* @param mixed $error_type Key of message in lang file.
|
||||
* @param mixed $variables Variables the message needs.
|
||||
* @return string
|
||||
*/
|
||||
public function error($error_type, $variables = [])
|
||||
{
|
||||
die(trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables));
|
||||
// throw new \Exception(trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables));
|
||||
}
|
||||
|
||||
|
||||
public function getError($error_type, $variables = [])
|
||||
{
|
||||
return trans(self::PACKAGE_NAME . '::lfm.error-' . $error_type, $variables);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function response($error_type, $variables = [])
|
||||
{
|
||||
return response()->json(['type' => $error_type, 'data'=>$variables], 200);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function sanitize($string, $alphanumeric = true, $force_lowercase = false)
|
||||
{
|
||||
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
|
||||
"}", "\\", "|", ";", ":", "\"", "'", "‘", "’", "“", "”", "–", "—",
|
||||
"—", "–", ",", "<", ".", ">", "/", "?");
|
||||
$clean = trim(str_replace($strip, "", strip_tags($string)));
|
||||
$clean = preg_replace('/\s+/', "-", $clean); //leerzeichen
|
||||
$clean = ($alphanumeric) ? preg_replace('/[^A-Za-z0-9\-\']/', "", $clean) : $clean ;
|
||||
|
||||
return ($force_lowercase) ?
|
||||
(function_exists('mb_strtolower')) ?
|
||||
mb_strtolower($clean, 'UTF-8') :
|
||||
strtolower($clean) :
|
||||
$clean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates routes of this package.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function routes()
|
||||
{
|
||||
$middleware = [ CreateDefaultFolder::class, MultiUser::class ];
|
||||
$as = 'iqcontent.lfm.';
|
||||
$namespace = '\\IqContent\\LaravelFilemanager\\Controllers\\';
|
||||
|
||||
Route::group(compact('middleware', 'as', 'namespace'), function () {
|
||||
|
||||
// display main layout
|
||||
Route::get('/', [
|
||||
'uses' => 'LfmController@show',
|
||||
'as' => 'show',
|
||||
]);
|
||||
|
||||
// display integration error messages
|
||||
Route::get('/errors', [
|
||||
'uses' => 'LfmController@getErrors',
|
||||
'as' => 'getErrors',
|
||||
]);
|
||||
|
||||
// upload
|
||||
Route::any('/upload', [
|
||||
'uses' => 'UploadController@upload',
|
||||
'as' => 'upload',
|
||||
]);
|
||||
|
||||
// list images & files
|
||||
Route::get('/jsonitems', [
|
||||
'uses' => 'ItemsController@getItems',
|
||||
'as' => 'getItems',
|
||||
]);
|
||||
|
||||
Route::get('/move', [
|
||||
'uses' => 'ItemsController@move',
|
||||
'as' => 'move',
|
||||
]);
|
||||
|
||||
Route::get('/domove', [
|
||||
'uses' => 'ItemsController@domove',
|
||||
'as' => 'domove'
|
||||
]);
|
||||
|
||||
// folders
|
||||
Route::get('/newfolder', [
|
||||
'uses' => 'FolderController@getAddfolder',
|
||||
'as' => 'getAddfolder',
|
||||
]);
|
||||
|
||||
// list folders
|
||||
Route::get('/folders', [
|
||||
'uses' => 'FolderController@getFolders',
|
||||
'as' => 'getFolders',
|
||||
]);
|
||||
|
||||
// crop
|
||||
Route::get('/crop', [
|
||||
'uses' => 'CropController@getCrop',
|
||||
'as' => 'getCrop',
|
||||
]);
|
||||
Route::get('/cropimage', [
|
||||
'uses' => 'CropController@getCropimage',
|
||||
'as' => 'getCropimage',
|
||||
]);
|
||||
Route::get('/cropnewimage', [
|
||||
'uses' => 'CropController@getNewCropimage',
|
||||
'as' => 'getCropimage',
|
||||
]);
|
||||
|
||||
// rename
|
||||
Route::get('/rename', [
|
||||
'uses' => 'RenameController@getRename',
|
||||
'as' => 'getRename',
|
||||
]);
|
||||
|
||||
// scale/resize
|
||||
Route::get('/resize', [
|
||||
'uses' => 'ResizeController@getResize',
|
||||
'as' => 'getResize',
|
||||
]);
|
||||
Route::get('/doresize', [
|
||||
'uses' => 'ResizeController@performResize',
|
||||
'as' => 'performResize',
|
||||
]);
|
||||
|
||||
// download
|
||||
Route::get('/download', [
|
||||
'uses' => 'DownloadController@getDownload',
|
||||
'as' => 'getDownload',
|
||||
]);
|
||||
|
||||
// delete
|
||||
Route::get('/delete', [
|
||||
'uses' => 'DeleteController@getDelete',
|
||||
'as' => 'getDelete',
|
||||
]);
|
||||
|
||||
Route::get('/demo', 'DemoController@index');
|
||||
});
|
||||
}
|
||||
}
|
||||
222
packages/iqcontent/laravel-filemanager/src/LfmItem.php
Normal file
222
packages/iqcontent/laravel-filemanager/src/LfmItem.php
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager;
|
||||
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
|
||||
class LfmItem
|
||||
{
|
||||
private $lfm;
|
||||
private $helper;
|
||||
|
||||
private $columns = ['name', 'url', 'time', 'icon', 'is_file', 'is_image', 'thumb_url'];
|
||||
public $attributes = [];
|
||||
|
||||
public function __construct(LfmPath $lfm, Lfm $helper)
|
||||
{
|
||||
$this->lfm = $lfm->thumb(false);
|
||||
$this->helper = $helper;
|
||||
}
|
||||
|
||||
public function __get($var_name)
|
||||
{
|
||||
if (!array_key_exists($var_name, $this->attributes)) {
|
||||
$function_name = camel_case($var_name);
|
||||
$this->attributes[$var_name] = $this->$function_name();
|
||||
}
|
||||
|
||||
return $this->attributes[$var_name];
|
||||
}
|
||||
|
||||
public function fill()
|
||||
{
|
||||
foreach ($this->columns as $column) {
|
||||
$this->__get($column);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function name()
|
||||
{
|
||||
return $this->lfm->getName();
|
||||
}
|
||||
|
||||
public function model()
|
||||
{
|
||||
return $this->lfm->getModel();
|
||||
}
|
||||
|
||||
public function deleteModel()
|
||||
{
|
||||
return $this->lfm->deleteModel();
|
||||
}
|
||||
|
||||
public function path($type = 'absolute')
|
||||
{
|
||||
return $this->lfm->path($type);
|
||||
}
|
||||
|
||||
public function isDirectory()
|
||||
{
|
||||
return $this->lfm->isDirectory();
|
||||
}
|
||||
|
||||
public function isFile()
|
||||
{
|
||||
return ! $this->isDirectory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a file is image or not.
|
||||
*
|
||||
* @param mixed $file Real path of a file or instance of UploadedFile.
|
||||
* @return bool
|
||||
*/
|
||||
public function isImage()
|
||||
{
|
||||
return starts_with($this->mimeType(), 'image');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mime type of a file.
|
||||
*
|
||||
* @param mixed $file Real path of a file or instance of UploadedFile.
|
||||
* @return string
|
||||
*/
|
||||
// TODO: uploaded file
|
||||
public function mimeType()
|
||||
{
|
||||
// if ($file instanceof UploadedFile) {
|
||||
// return $file->getMimeType();
|
||||
// }
|
||||
|
||||
return $this->lfm->mimeType();
|
||||
}
|
||||
|
||||
public function extension()
|
||||
{
|
||||
return $this->lfm->extension();
|
||||
}
|
||||
|
||||
public function url()
|
||||
{
|
||||
if ($this->isDirectory()) {
|
||||
return $this->lfm->path('working_dir');
|
||||
}
|
||||
|
||||
return $this->lfm->url();
|
||||
}
|
||||
|
||||
public function size()
|
||||
{
|
||||
return $this->isFile() ? $this->humanFilesize($this->lfm->size()) : '';
|
||||
}
|
||||
|
||||
public function time()
|
||||
{
|
||||
return $this->lfm->lastModified();
|
||||
}
|
||||
|
||||
public function dimensions()
|
||||
{
|
||||
|
||||
if ($this->isImage()) {
|
||||
//return $this->lfm->thumb($this->hasThumb())->url(true);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function thumbUrl()
|
||||
{
|
||||
//edit
|
||||
if ($this->isDirectory()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ($this->isImage()) {
|
||||
return $this->lfm->thumb($this->hasThumb())->url(true);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function icon()
|
||||
{
|
||||
//edit
|
||||
if ($this->isDirectory()) {
|
||||
return 'fa-folder';
|
||||
}
|
||||
|
||||
if ($this->isImage()) {
|
||||
return 'fa-image';
|
||||
}
|
||||
//edit
|
||||
return $this->helper->getFileIcon($this->extension());
|
||||
//return $this->extension();
|
||||
}
|
||||
|
||||
public function type()
|
||||
{
|
||||
if ($this->isDirectory()) {
|
||||
return trans(Lfm::PACKAGE_NAME . '::lfm.type-folder');
|
||||
}
|
||||
|
||||
if ($this->isImage()) {
|
||||
return $this->mimeType();
|
||||
}
|
||||
|
||||
return $this->helper->getFileType($this->extension());
|
||||
}
|
||||
|
||||
public function hasThumb()
|
||||
{
|
||||
if (!$this->isImage()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->lfm->thumb()->exists()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function shouldCreateThumb()
|
||||
{
|
||||
if (!$this->helper->config('should_create_thumbnails')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->isImage()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (in_array($this->mimeType(), ['image/gif', 'image/svg+xml'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
return $this->lfm->get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Make file size readable.
|
||||
*
|
||||
* @param int $bytes File size in bytes.
|
||||
* @param int $decimals Decimals.
|
||||
* @return string
|
||||
*/
|
||||
public function humanFilesize($bytes, $decimals = 2)
|
||||
{
|
||||
$size = ['B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
$factor = floor((strlen($bytes) - 1) / 3);
|
||||
|
||||
return sprintf("%.{$decimals}f %s", $bytes / pow(1024, $factor), @$size[$factor]);
|
||||
}
|
||||
}
|
||||
437
packages/iqcontent/laravel-filemanager/src/LfmPath.php
Normal file
437
packages/iqcontent/laravel-filemanager/src/LfmPath.php
Normal file
|
|
@ -0,0 +1,437 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager;
|
||||
|
||||
use Illuminate\Container\Container;
|
||||
use Intervention\Image\Facades\Image;
|
||||
use IqContent\LaravelFilemanager\Models\IQContentFile;
|
||||
use IqContent\LaravelFilemanager\Models\IQContentFolder;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Return_;
|
||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
use IqContent\LaravelFilemanager\Events\ImageIsUploading;
|
||||
use IqContent\LaravelFilemanager\Events\ImageWasUploaded;
|
||||
|
||||
class LfmPath
|
||||
{
|
||||
private $working_dir;
|
||||
private $item_name;
|
||||
private $file_model;
|
||||
private $folder_model;
|
||||
private $is_thumb = false;
|
||||
private $image_dimensions = "";
|
||||
private $isDirectory = null;
|
||||
|
||||
private $helper;
|
||||
|
||||
public function __construct(Lfm $lfm = null)
|
||||
{
|
||||
$this->helper = $lfm;
|
||||
}
|
||||
|
||||
public function __get($var_name)
|
||||
{
|
||||
if ($var_name == 'storage') {
|
||||
return $this->helper->getStorage($this->path('url'));
|
||||
}
|
||||
}
|
||||
|
||||
public function __call($function_name, $arguments)
|
||||
{
|
||||
return $this->storage->$function_name(...$arguments);
|
||||
}
|
||||
|
||||
public function dir($working_dir)
|
||||
{
|
||||
$this->working_dir = $working_dir;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function thumb($is_thumb = true)
|
||||
{
|
||||
$this->is_thumb = $is_thumb;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setName($item_name)
|
||||
{
|
||||
$this->item_name = $item_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setModel()
|
||||
{
|
||||
$working_dir = $this->path('url');
|
||||
$parent_dir = substr($working_dir, 0, strrpos($working_dir, '/'));
|
||||
$parent_folder = IQContentFolder::where('path', $parent_dir)->first();
|
||||
|
||||
if ($this->isDirectory()) {
|
||||
if($this->folder_model == null){
|
||||
$this->folder_model = new IQContentFolder();
|
||||
}
|
||||
|
||||
}else{
|
||||
if($this->file_model == null){
|
||||
$this->file_model = new IQContentFile();
|
||||
$this->file_model = IQContentFile::where('name', $this->item_name)->where('folder_id', $parent_folder->id)->first();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function renameModel($new_name)
|
||||
{
|
||||
|
||||
if ($this->isDirectory()) {
|
||||
if($this->folder_model != null){
|
||||
$this->folder_model->name = $new_name;
|
||||
$this->folder_mode->save();
|
||||
}
|
||||
|
||||
}else{
|
||||
if($this->file_model != null){
|
||||
$this->file_model->name = $new_name;
|
||||
$this->file_model->save();
|
||||
}
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->item_name;
|
||||
}
|
||||
|
||||
public function getModel()
|
||||
{
|
||||
if ($this->isDirectory()) {
|
||||
return $this->folder_model;
|
||||
|
||||
}else{
|
||||
return $this->file_model;
|
||||
}
|
||||
}
|
||||
|
||||
public function path($type = 'storage')
|
||||
{
|
||||
if ($type == 'working_dir') {
|
||||
// working directory: /{user_slug}
|
||||
return $this->translateToLfmPath($this->normalizeWorkingDir());
|
||||
} elseif ($type == 'url') {
|
||||
// storage: files/{user_slug}
|
||||
return $this->helper->getCategoryName() . $this->path('working_dir');
|
||||
} elseif ($type == 'storage') {
|
||||
// storage: files/{user_slug}
|
||||
// storage on windows: files\{user_slug}
|
||||
return $this->translateToOsPath($this->path('url'));
|
||||
} elseif ($type == 'dirname') {
|
||||
return $this->helper->getDirFromPath($this->path('storage'));
|
||||
} else {
|
||||
// absolute: /var/www/html/project/storage/app/files/{user_slug}
|
||||
// absolute on windows: C:\project\storage\app\files\{user_slug}
|
||||
return $this->storage->rootPath() . $this->path('storage');
|
||||
}
|
||||
}
|
||||
|
||||
public function translateToLfmPath($path)
|
||||
{
|
||||
return str_replace($this->helper->ds(), Lfm::DS, $path);
|
||||
}
|
||||
|
||||
public function translateToOsPath($path)
|
||||
{
|
||||
return str_replace(Lfm::DS, $this->helper->ds(), $path);
|
||||
}
|
||||
|
||||
public function url()
|
||||
{
|
||||
return $this->storage->url($this->path('url'));
|
||||
}
|
||||
|
||||
public function folders()
|
||||
{
|
||||
$all_folders = array_map(function ($directory_path) {
|
||||
return $this->pretty($directory_path);
|
||||
}, $this->storage->directories());
|
||||
|
||||
$folders = array_filter($all_folders, function ($directory) {
|
||||
return $directory->name !== $this->helper->getThumbFolderName();
|
||||
});
|
||||
|
||||
return $this->sortByColumn($folders);
|
||||
}
|
||||
|
||||
public function files()
|
||||
{
|
||||
$files = array_map(function ($file_path) {
|
||||
return $this->pretty($file_path);
|
||||
}, $this->storage->files());
|
||||
|
||||
return $this->sortByColumn($files);
|
||||
}
|
||||
|
||||
public function pretty($item_path)
|
||||
{
|
||||
return Container::getInstance()->makeWith(LfmItem::class, [
|
||||
'lfm' => (clone $this)
|
||||
->setName($this->helper->getNameFromPath($item_path))
|
||||
->setModel(),
|
||||
'helper' => $this->helper,
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
public function delete()
|
||||
{
|
||||
if ($this->isDirectory()) {
|
||||
return $this->storage->deleteDirectory();
|
||||
} else {
|
||||
return $this->storage->delete();
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteModel(){
|
||||
|
||||
if ($this->isDirectory()) {
|
||||
if($this->folder_model){
|
||||
$this->folder_model->delete();
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if($this->file_model){
|
||||
$this->file_model->delete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create folder if not exist.
|
||||
*
|
||||
* @param string $path Real path of a directory.
|
||||
* @return bool
|
||||
*/
|
||||
public function createFolder()
|
||||
{
|
||||
if ($this->storage->exists($this)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$working_dir = $this->path('url');
|
||||
$parent_dir = substr($working_dir, 0, strrpos($working_dir, '/'));
|
||||
$parent_folder = IQContentFolder::where('path', $parent_dir)->first();
|
||||
|
||||
$this->storage->makeDirectory(0777, true, true);
|
||||
|
||||
|
||||
IQContentFolder::create([
|
||||
'folder_id' => $parent_folder->id,
|
||||
'name' => $this->item_name,
|
||||
'identifier' => $this->item_name,
|
||||
'path' => $this->path('url'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function isDirectory()
|
||||
{
|
||||
if($this->isDirectory !== null){
|
||||
return $this->isDirectory;
|
||||
}
|
||||
$working_dir = $this->path('working_dir');
|
||||
$parent_dir = substr($working_dir, 0, strrpos($working_dir, '/'));
|
||||
|
||||
$parent_directories = array_map(function ($directory_path) {
|
||||
return app(static::class)->translateToLfmPath($directory_path);
|
||||
}, app(static::class)->dir($parent_dir)->directories());
|
||||
|
||||
$this->isDirectory = in_array($this->path('url'), $parent_directories);
|
||||
return $this->isDirectory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check a folder and its subfolders is empty or not.
|
||||
*
|
||||
* @param string $directory_path Real path of a directory.
|
||||
* @return bool
|
||||
*/
|
||||
public function directoryIsEmpty()
|
||||
{
|
||||
return count($this->storage->allFiles()) == 0;
|
||||
}
|
||||
|
||||
public function normalizeWorkingDir()
|
||||
{
|
||||
$path = $this->working_dir
|
||||
?: $this->helper->input('working_dir')
|
||||
?: $this->helper->getRootFolder();
|
||||
|
||||
if ($this->is_thumb) {
|
||||
$path .= Lfm::DS . $this->helper->getThumbFolderName();
|
||||
}
|
||||
|
||||
if ($this->getName()) {
|
||||
$path .= Lfm::DS . $this->getName();
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort files and directories.
|
||||
*
|
||||
* @param mixed $arr_items Array of files or folders or both.
|
||||
* @return array of object
|
||||
*/
|
||||
public function sortByColumn($arr_items)
|
||||
{
|
||||
$sort_by = $this->helper->input('sort_type');
|
||||
if (in_array($sort_by, ['name', 'time'])) {
|
||||
$key_to_sort = $sort_by;
|
||||
} else {
|
||||
$key_to_sort = 'name';
|
||||
}
|
||||
|
||||
uasort($arr_items, function ($a, $b) use ($key_to_sort) {
|
||||
return strcmp($a->{$key_to_sort}, $b->{$key_to_sort});
|
||||
});
|
||||
|
||||
return $arr_items;
|
||||
}
|
||||
|
||||
public function error($error_type, $variables = [])
|
||||
{
|
||||
return $this->helper->error($error_type, $variables);
|
||||
}
|
||||
|
||||
// Upload section
|
||||
public function upload($file)
|
||||
{
|
||||
$this->uploadValidator($file);
|
||||
$new_file_name = $this->getNewName($file);
|
||||
$new_file_path = $this->setName($new_file_name)->path('absolute');
|
||||
|
||||
|
||||
$working_url = $this->path('url');
|
||||
$working_dir = substr($working_url, 0, strrpos($working_url, '/'));
|
||||
|
||||
$working_folder = IQContentFolder::where('path', $working_dir)->first();
|
||||
|
||||
|
||||
event(new ImageIsUploading($new_file_path));
|
||||
try {
|
||||
$new_file_name = $this->saveFile($file, $new_file_name);
|
||||
} catch (\Exception $e) {
|
||||
\Log::info($e);
|
||||
return $this->error('invalid');
|
||||
}
|
||||
IQContentFile::create([
|
||||
'folder_id' => $working_folder->id,
|
||||
'name' => $new_file_name,
|
||||
'identifier' => $new_file_name,
|
||||
'ext' => $file->guessClientExtension(),
|
||||
'mine' => $file->getMimeType(),
|
||||
'size' => $file->getSize() / 1000,
|
||||
'dimensions' => $this->image_dimensions,
|
||||
'content' => $working_dir,
|
||||
]);
|
||||
// TODO should be "FileWasUploaded"
|
||||
event(new ImageWasUploaded($new_file_path));
|
||||
|
||||
return $new_file_name;
|
||||
}
|
||||
|
||||
private function uploadValidator($file)
|
||||
{
|
||||
if (empty($file)) {
|
||||
return $this->error('file-empty');
|
||||
} elseif (! $file instanceof UploadedFile) {
|
||||
return $this->error('instance');
|
||||
} elseif ($file->getError() == UPLOAD_ERR_INI_SIZE) {
|
||||
return $this->error('file-size', ['max' => ini_get('upload_max_filesize')]);
|
||||
} elseif ($file->getError() != UPLOAD_ERR_OK) {
|
||||
throw new \Exception('File failed to upload. Error code: ' . $file->getError());
|
||||
}
|
||||
|
||||
$new_file_name = $this->getNewName($file);
|
||||
|
||||
if ($this->setName($new_file_name)->exists() && !config('lfm.over_write_on_duplicate')) {
|
||||
return $this->error('file-exist');
|
||||
}
|
||||
|
||||
if (config('lfm.should_validate_mime', false)) {
|
||||
$mimetype = $file->getMimeType();
|
||||
if (false === in_array($mimetype, $this->helper->availableMimeTypes())) {
|
||||
return $this->error('mime') . $mimetype;
|
||||
}
|
||||
}
|
||||
|
||||
if (config('lfm.should_validate_size', false)) {
|
||||
// size to kb unit is needed
|
||||
$file_size = $file->getSize() / 1000;
|
||||
if ($file_size > $this->helper->maxUploadSize()) {
|
||||
return $this->error('size') . $file_size;
|
||||
}
|
||||
}
|
||||
|
||||
return 'pass';
|
||||
}
|
||||
|
||||
private function getNewName($file)
|
||||
{
|
||||
$new_file_name = $this->helper
|
||||
->translateFromUtf8(trim(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME)));
|
||||
|
||||
if (config('lfm.rename_file') === true) {
|
||||
$new_file_name = uniqid();
|
||||
} elseif (config('lfm.alphanumeric_filename') === true) {
|
||||
$new_file_name = $this->helper->sanitize($new_file_name); //preg_replace('/[^A-Za-z0-9\-\']/', '_', $new_file_name);
|
||||
}
|
||||
|
||||
$extension = $file->getClientOriginalExtension();
|
||||
|
||||
if ($extension) {
|
||||
$new_file_name .= '.' . $extension;
|
||||
}
|
||||
|
||||
return $new_file_name;
|
||||
}
|
||||
|
||||
private function saveFile($file, $new_file_name)
|
||||
{
|
||||
$this->setName($new_file_name)->storage->save($file);
|
||||
|
||||
$this->makeThumbnail($new_file_name);
|
||||
|
||||
return $new_file_name;
|
||||
}
|
||||
|
||||
public function makeThumbnail($file_name)
|
||||
{
|
||||
$original_image = $this->pretty($file_name);
|
||||
|
||||
if (!$original_image->shouldCreateThumb()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// create folder for thumbnails
|
||||
$this->setName(null)->thumb(true)->createFolder();
|
||||
|
||||
// generate cropped image content
|
||||
$this->setName($file_name)->thumb(true);
|
||||
$image = Image::make($original_image->get());
|
||||
$this->image_dimensions = $image->width()."x".$image->height();
|
||||
$image->fit(config('lfm.thumb_img_width', 200), config('lfm.thumb_img_height', 200));
|
||||
|
||||
$this->storage->put($image->stream()->detach());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager;
|
||||
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use League\Flysystem\Cached\CachedAdapter;
|
||||
|
||||
class LfmStorageRepository
|
||||
{
|
||||
private $disk;
|
||||
private $path;
|
||||
private $helper;
|
||||
|
||||
public function __construct($storage_path, $helper)
|
||||
{
|
||||
$this->helper = $helper;
|
||||
$this->disk = Storage::disk($this->helper->config('disk'));
|
||||
$this->path = $storage_path;
|
||||
}
|
||||
|
||||
public function __call($function_name, $arguments)
|
||||
{
|
||||
// TODO: check function exists
|
||||
return $this->disk->$function_name($this->path, ...$arguments);
|
||||
}
|
||||
|
||||
public function rootPath()
|
||||
{
|
||||
$adapter = $this->disk->getDriver()->getAdapter();
|
||||
|
||||
if ($adapter instanceof CachedAdapter) {
|
||||
$adapter = $adapter->getAdapter();
|
||||
}
|
||||
|
||||
return $adapter->getPathPrefix();
|
||||
}
|
||||
|
||||
public function move($new_lfm_path)
|
||||
{
|
||||
return $this->disk->move($this->path, $new_lfm_path->path('storage'));
|
||||
}
|
||||
|
||||
public function save($file)
|
||||
{
|
||||
$nameint = strripos($this->path, "/");
|
||||
$nameclean = substr($this->path, $nameint + 1);
|
||||
$pathclean = substr_replace($this->path, "", $nameint);
|
||||
$this->disk->putFileAs($pathclean, $file, $nameclean, 'public');
|
||||
}
|
||||
|
||||
public function url($path)
|
||||
{
|
||||
return $this->disk->url($path);
|
||||
}
|
||||
|
||||
public function makeDirectory()
|
||||
{
|
||||
$this->disk->makeDirectory($this->path, ...func_get_args());
|
||||
|
||||
$this->disk->setVisibility($this->path, 'public');
|
||||
}
|
||||
|
||||
public function extension()
|
||||
{
|
||||
return pathinfo($this->path, PATHINFO_EXTENSION);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Middlewares;
|
||||
|
||||
use Closure;
|
||||
use IqContent\LaravelFilemanager\Lfm;
|
||||
use IqContent\LaravelFilemanager\LfmPath;
|
||||
|
||||
class CreateDefaultFolder
|
||||
{
|
||||
private $lfm;
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->lfm = app(LfmPath::class);
|
||||
$this->helper = app(Lfm::class);
|
||||
}
|
||||
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
$this->checkDefaultFolderExists('user');
|
||||
$this->checkDefaultFolderExists('share');
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
private function checkDefaultFolderExists($type = 'share')
|
||||
{
|
||||
if (! $this->helper->allowFolderType($type)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->lfm->dir($this->helper->getRootFolder($type))->createFolder();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Middlewares;
|
||||
|
||||
use Closure;
|
||||
use IqContent\LaravelFilemanager\Lfm;
|
||||
|
||||
class MultiUser
|
||||
{
|
||||
private $helper;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->helper = app(Lfm::class);
|
||||
}
|
||||
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if ($this->helper->allowFolderType('user')) {
|
||||
$previous_dir = $request->input('working_dir');
|
||||
$working_dir = $this->helper->getRootFolder('user');
|
||||
|
||||
if ($previous_dir == null) {
|
||||
$request->merge(compact('working_dir'));
|
||||
} elseif (! $this->validDir($previous_dir)) {
|
||||
$request->replace(compact('working_dir'));
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
private function validDir($previous_dir)
|
||||
{
|
||||
if (starts_with($previous_dir, $this->helper->getRootFolder('share'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (starts_with($previous_dir, $this->helper->getRootFolder('user'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class IQContentCategory extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_categories';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'pos', 'active'
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function tags() {
|
||||
return $this->hasMany('IqContent\LaravelFilemanager\Models\IQContentTag', 'category_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class IQContentFile extends Model
|
||||
{
|
||||
|
||||
use Sluggable;
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_files';
|
||||
|
||||
protected $fillable = [
|
||||
'folder_id', 'name', 'identifier', 'ext', 'mine', 'size', 'dimensions', 'content', 'color', 'pos', 'active'
|
||||
];
|
||||
|
||||
public function folder() {
|
||||
return $this->belongsTo('IqContent\LaravelFilemanager\Models\IQContentFolder', 'folder_id');
|
||||
}
|
||||
|
||||
public function file_tags() {
|
||||
return $this->hasMany('IqContent\LaravelFilemanager\Models\IQContentFileTag', 'file_id');
|
||||
}
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function setIdentifierAttribute( $value ) {
|
||||
if(!isset($value) || $value == ""){
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($this->name), '-');
|
||||
}else{
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($value), '-');
|
||||
}
|
||||
}
|
||||
|
||||
public function formatBytes($precision = 2)
|
||||
{
|
||||
$size = $this->size;
|
||||
|
||||
if ($size > 0) {
|
||||
$size = (int) $size;
|
||||
$base = log($size) / log(1024);
|
||||
$suffixes = array(' KB', ' MB', ' GB', ' TB');
|
||||
|
||||
return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];
|
||||
} else {
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
|
||||
public function hasTags()
|
||||
{
|
||||
if($this->file_tags()->count()){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* public function hasThumb(){
|
||||
if(\Storage::disk('local')->exists('thumb/'.$this->filename) || \Storage::disk('local')->exists('thumb/'.$this->filename.".jpg")){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function hasBig(){
|
||||
if(\Storage::disk('local')->exists('big/'.$this->filename) || \Storage::disk('local')->exists('big/'.$this->filename.".jpg")){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}*/
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class IQContentFileTag extends Model
|
||||
{
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_file_tags';
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'file_id', 'tag_id'
|
||||
];
|
||||
|
||||
public function file() {
|
||||
return $this->belongsTo('IqContent\LaravelFilemanager\Models\IQContentFile', 'file_id');
|
||||
}
|
||||
|
||||
public function tag() {
|
||||
return $this->belongsTo('IqContent\LaravelFilemanager\Models\IQContentTag', 'tag_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class IQContentFolder extends Model
|
||||
{
|
||||
|
||||
use Sluggable;
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_folders';
|
||||
|
||||
protected $fillable = [
|
||||
'folder_id', 'name', 'slug', 'identifier', 'path', 'color', 'pos', 'active'
|
||||
];
|
||||
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function setIdentifierAttribute( $value ) {
|
||||
if(!isset($value) || $value == ""){
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($this->name), '-');
|
||||
}else{
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($value), '-');
|
||||
}
|
||||
}
|
||||
|
||||
public function folder() {
|
||||
return $this->belongsTo('IqContent\LaravelFilemanager\Models\IQContentFolder', 'folder_id');
|
||||
}
|
||||
|
||||
public function folders() {
|
||||
return $this->hasMany('IqContent\LaravelFilemanager\Models\IQContentFolder', 'folder_id', 'id');
|
||||
}
|
||||
|
||||
public function files() {
|
||||
return $this->hasMany('IqContent\LaravelFilemanager\Models\IQContentFile', 'folder_id', 'id');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
namespace IqContent\LaravelFilemanager\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class IQContentTag extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_tags';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'pos', 'active'
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function category() {
|
||||
return $this->belongsTo('IqContent\LaravelFilemanager\Models\IQContentCategory', 'category_id');
|
||||
}
|
||||
|
||||
public function file_tags() {
|
||||
return $this->hasMany('IqContent\LaravelFilemanager\Models\IQContentFileTag', 'tag_id');
|
||||
}
|
||||
}
|
||||
191
packages/iqcontent/laravel-filemanager/src/config/lfm.php
Normal file
191
packages/iqcontent/laravel-filemanager/src/config/lfm.php
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Documentation for this config :
|
||||
|--------------------------------------------------------------------------
|
||||
| online => http://unisharp.github.io/laravel-filemanager/config
|
||||
| offline => vendor/unisharp/laravel-filemanager/docs/config.md
|
||||
*/
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Routing
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'use_package_routes' => true,
|
||||
|
||||
// // Use relative paths (without domain)
|
||||
// 'relative_paths' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Multi-User Mode
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'allow_multi_user' => true,
|
||||
|
||||
'allow_share_folder' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Folder Names
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Flexible way to customize client folders accessibility
|
||||
// If you want to customize client folders, publish tag="lfm_handler"
|
||||
// Then you can rewrite userField function in App\Handler\ConfigHandler class
|
||||
// And set 'user_field' to App\Handler\ConfigHandler::class
|
||||
// Ex: The private folder of user will be named as the user id.
|
||||
'user_folder_name' => IqContent\LaravelFilemanager\Handlers\ConfigHandler::class,
|
||||
|
||||
'shared_folder_name' => 'shares',
|
||||
|
||||
'thumb_folder_name' => 'thumbs',
|
||||
|
||||
'folder_categories' => [
|
||||
'file' => [
|
||||
'folder_name' => 'files',
|
||||
'startup_view' => 'grid',
|
||||
'max_size' => 50000, // size in KB
|
||||
'valid_mime' => [
|
||||
'image/jpeg',
|
||||
'image/pjpeg',
|
||||
'image/png',
|
||||
'image/gif',
|
||||
'image/svg+xml',
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'folder_name' => 'photos',
|
||||
'startup_view' => 'list',
|
||||
'max_size' => 50000, // size in KB
|
||||
'valid_mime' => [
|
||||
'image/jpeg',
|
||||
'image/pjpeg',
|
||||
'image/png',
|
||||
'image/gif',
|
||||
'image/svg+xml',
|
||||
'application/pdf',
|
||||
'text/plain',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Upload / Validation
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'disk' => 'public',
|
||||
|
||||
'rename_file' => false,
|
||||
|
||||
'alphanumeric_filename' => false,
|
||||
|
||||
'alphanumeric_directory' => false,
|
||||
|
||||
'should_validate_size' => false,
|
||||
|
||||
'should_validate_mime' => false,
|
||||
|
||||
// permissions to be set when create a new folder or when it creates automatically with thumbnails
|
||||
'create_folder_mode' => 0755,
|
||||
|
||||
// permissions to be set on file upload.
|
||||
'create_file_mode' => 0644,
|
||||
|
||||
// If true, it will attempt to chmod the file after upload
|
||||
'should_change_file_mode' => true,
|
||||
|
||||
// behavior on files with identical name
|
||||
// setting it to true cause old file replace with new one
|
||||
// setting it to false show `error-file-exist` error and stop upload
|
||||
'over_write_on_duplicate' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Thumbnail
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// If true, image thumbnails would be created during upload
|
||||
'should_create_thumbnails' => true,
|
||||
|
||||
// Create thumbnails automatically only for listed types.
|
||||
'raster_mimetypes' => [
|
||||
'image/jpeg',
|
||||
'image/pjpeg',
|
||||
'image/png',
|
||||
],
|
||||
|
||||
'thumb_img_width' => 200,
|
||||
|
||||
'thumb_img_height' => 200,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| jQuery UI options
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'resize_aspectRatio' => false,
|
||||
|
||||
'resize_containment' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| File Extension Information
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
'file_type_array' => [
|
||||
'pdf' => 'Adobe Acrobat',
|
||||
'doc' => 'Microsoft Word',
|
||||
'docx' => 'Microsoft Word',
|
||||
'xls' => 'Microsoft Excel',
|
||||
'xlsx' => 'Microsoft Excel',
|
||||
'zip' => 'Archive',
|
||||
'gif' => 'GIF Image',
|
||||
'jpg' => 'JPEG Image',
|
||||
'jpeg' => 'JPEG Image',
|
||||
'png' => 'PNG Image',
|
||||
'ppt' => 'Microsoft PowerPoint',
|
||||
'pptx' => 'Microsoft PowerPoint',
|
||||
],
|
||||
|
||||
'file_icon_array' => [
|
||||
'pdf' => 'fa-file-pdf-o',
|
||||
'doc' => 'fa-file-word-o',
|
||||
'docx' => 'fa-file-word-o',
|
||||
'xls' => 'fa-file-excel-o',
|
||||
'xlsx' => 'fa-file-excel-o',
|
||||
'zip' => 'fa-file-archive-o',
|
||||
'gif' => 'fa-file-image-o',
|
||||
'jpg' => 'fa-file-image-o',
|
||||
'jpeg' => 'fa-file-image-o',
|
||||
'png' => 'fa-file-image-o',
|
||||
'ppt' => 'fa-file-powerpoint-o',
|
||||
'pptx' => 'fa-file-powerpoint-o',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| php.ini override
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These values override your php.ini settings before uploading files
|
||||
| Set these to false to ingnore and apply your php.ini settings
|
||||
|
|
||||
| Please note that the 'upload_max_filesize' & 'post_max_size'
|
||||
| directives are not supported.
|
||||
*/
|
||||
'php_ini_overrides' => [
|
||||
'memory_limit' => '256M',
|
||||
],
|
||||
];
|
||||
68
packages/iqcontent/laravel-filemanager/src/lang/ar/lfm.php
Normal file
68
packages/iqcontent/laravel-filemanager/src/lang/ar/lfm.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'الخلف',
|
||||
'nav-new' => 'مجلد جديد',
|
||||
'nav-upload' => 'رفع',
|
||||
'nav-thumbnails' => 'مصغرات',
|
||||
'nav-list' => 'قائمة',
|
||||
|
||||
'menu-rename' => 'إعادة تسمية',
|
||||
'menu-delete' => 'حذف',
|
||||
'menu-view' => 'عرض',
|
||||
'menu-download' => 'تنزيل',
|
||||
'menu-resize' => 'تغيير الحجم',
|
||||
'menu-crop' => 'قص',
|
||||
|
||||
'title-page' => 'مدير الملفات',
|
||||
'title-panel' => 'مدير الملفات',
|
||||
'title-upload' => 'رفع ملف',
|
||||
'title-view' => 'عرض الملف',
|
||||
'title-user' => 'الملفات',
|
||||
'title-share' => 'الملفات المشتركة',
|
||||
'title-item' => 'ملف',
|
||||
'title-size' => 'الحجم',
|
||||
'title-type' => 'النوع',
|
||||
'title-modified' => 'اخر تعديل',
|
||||
'title-action' => 'اجراء',
|
||||
|
||||
'type-folder' => 'مجلد',
|
||||
|
||||
'message-empty' => 'المجلد فارغ',
|
||||
'message-choose' => 'اختر ملف',
|
||||
'message-delete' => 'هل انت متاكد من حذف هذا الملف',
|
||||
'message-name' => 'اسم المجلد:',
|
||||
'message-rename' => 'اعادة تسمية الى:',
|
||||
'message-extension_not_found' => 'يجب تثبيت gd او imagick لقص او تغيير حجم الصورة.',
|
||||
|
||||
'error-rename' => 'اسم الملف مستخدما مسبقا!',
|
||||
'error-file-empty' => 'يجب اختيارملف!',
|
||||
'error-file-exist' => 'يوجد ملف سابق بنفس الاسم!',
|
||||
'error-file-size' => 'File size exceeds server limit! (maximum size: :max)',
|
||||
'error-delete-folder'=> 'لا يمكن حذف هذا المجلد لانه غير فارغ!',
|
||||
'error-folder-name' => 'اسم المجلد لا يمكن ان يكون فاغ!',
|
||||
'error-folder-exist'=> 'اسم المجلد مستخدما مسبقا!',
|
||||
'error-folder-alnum'=> 'Only alphanumeric folder names are allowed!',
|
||||
'error-mime' => 'نوع الملف غير معروف: ',
|
||||
'error-instance' => 'The uploaded file should be an instance of UploadedFile',
|
||||
'error-invalid' => 'طلب رفع غير صالح',
|
||||
'error-other' => 'حدثت مشكلة: ',
|
||||
'error-too-large' => 'الملف كبير جدا',
|
||||
|
||||
'btn-upload' => 'رفع الملف',
|
||||
'btn-uploading' => 'جاري الرفع...',
|
||||
'btn-close' => 'اغلاق',
|
||||
'btn-crop' => 'قص',
|
||||
'btn-cancel' => 'الغاء',
|
||||
'btn-resize' => 'تغيير الحجم',
|
||||
|
||||
'resize-ratio' => 'النسبة:',
|
||||
'resize-scaled' => 'تم تغيير حجم الصورة:',
|
||||
'resize-true' => 'نعم',
|
||||
'resize-old-height' => 'الارتفاع الاصلي:',
|
||||
'resize-old-width' => 'العرض الاصلي:',
|
||||
'resize-new-height' => 'الارتفاع:',
|
||||
'resize-new-width' => 'العرض:',
|
||||
|
||||
'locale-bootbox' => 'ar',
|
||||
];
|
||||
66
packages/iqcontent/laravel-filemanager/src/lang/bg/lfm.php
Normal file
66
packages/iqcontent/laravel-filemanager/src/lang/bg/lfm.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Назад',
|
||||
'nav-new' => 'Нова Папка',
|
||||
'nav-upload' => 'Качване',
|
||||
'nav-thumbnails' => 'Тъмб',
|
||||
'nav-list' => 'Списък',
|
||||
|
||||
'menu-rename' => 'Преименувай',
|
||||
'menu-delete' => 'Изтрии',
|
||||
'menu-view' => 'Преглед',
|
||||
'menu-download' => 'Свали',
|
||||
'menu-resize' => 'Оразмер',
|
||||
'menu-crop' => 'Отрежи',
|
||||
|
||||
'title-page' => 'Файлов мениджър',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Качи файл',
|
||||
'title-view' => 'Виж файл',
|
||||
'title-user' => 'Файлове',
|
||||
'title-share' => 'Споделени Файлове',
|
||||
'title-item' => 'Елемент',
|
||||
'title-size' => 'Размер',
|
||||
'title-type' => 'Тип',
|
||||
'title-modified' => 'Модифицирано',
|
||||
'title-action' => 'Действие',
|
||||
|
||||
'type-folder' => 'Папка',
|
||||
|
||||
'message-empty' => 'Папката е празна.',
|
||||
'message-choose' => 'Избери файл',
|
||||
'message-delete' => 'Сигурни ли сте, че изкате да изтриете този елемент ?',
|
||||
'message-name' => 'Име на папка:',
|
||||
'message-rename' => 'Преименувай на:',
|
||||
'message-extension_not_found' => '(translation wanted)',
|
||||
|
||||
'error-rename' => 'Името е заето!',
|
||||
'error-file-empty' => 'Трябва да изберете файл !',
|
||||
'error-file-exist' => 'Файл с това име вече съществува!',
|
||||
'error-file-size' => 'File size exceeds server limit! (maximum size: :max)',
|
||||
'error-delete-folder'=> 'Не можете да изтриете тази папка, защото не е празна!',
|
||||
'error-folder-name' => 'Моля изберете име на папката',
|
||||
'error-folder-exist'=> 'Папка с това име вече съществува!',
|
||||
'error-folder-alnum'=> 'Only alphanumeric folder names are allowed!',
|
||||
'error-mime' => 'Грешен тип на файла: ',
|
||||
'error-instance' => 'The uploaded file should be an instance of UploadedFile ( Грешка )',
|
||||
'error-invalid' => 'Невалидна заявка за качване',
|
||||
|
||||
'btn-upload' => 'Качи файл',
|
||||
'btn-uploading' => 'Качване...',
|
||||
'btn-close' => 'Затвори',
|
||||
'btn-crop' => 'Отрежи',
|
||||
'btn-cancel' => 'Откажи',
|
||||
'btn-resize' => 'Оразмери',
|
||||
|
||||
'resize-ratio' => 'Аспект:',
|
||||
'resize-scaled' => 'Image scaled:',
|
||||
'resize-true' => 'Да',
|
||||
'resize-old-height' => 'Оригинална височина:',
|
||||
'resize-old-width' => 'Оригинална широчина:',
|
||||
'resize-new-height' => 'Височина:',
|
||||
'resize-new-width' => 'Широчина:',
|
||||
|
||||
'locale-bootbox' => 'bg',
|
||||
];
|
||||
87
packages/iqcontent/laravel-filemanager/src/lang/de/lfm.php
Normal file
87
packages/iqcontent/laravel-filemanager/src/lang/de/lfm.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'nav-back' => 'Zurück',
|
||||
'nav-new' => 'Neuer Ordner',
|
||||
'nav-upload' => 'Hochladen',
|
||||
'nav-thumbnails' => 'Thumbnails',
|
||||
'nav-list' => 'List',
|
||||
'nav-sort' => 'Sort',
|
||||
'nav-sort-alphabetic'=> 'Sort By Alphabets',
|
||||
'nav-sort-time' => 'Sort By Time',
|
||||
|
||||
'menu-rename' => 'Umbenennen',
|
||||
'menu-delete' => 'Löschen',
|
||||
'menu-view' => 'Ansehen',
|
||||
'menu-download' => 'Download',
|
||||
'menu-resize' => 'Größe Ändern',
|
||||
'menu-crop' => 'Zuschneiden',
|
||||
'menu-move' => 'Move',
|
||||
'menu-multiple' => 'Multi-selection',
|
||||
|
||||
'title-page' => 'File Manager',
|
||||
'title-panel' => 'FileManager',
|
||||
'title-upload' => 'Datei hochladen',
|
||||
'title-view' => 'Datei ansehen',
|
||||
'title-user' => 'Dateien',
|
||||
'title-share' => 'Medien',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Größe',
|
||||
'title-type' => 'Typ',
|
||||
'title-modified' => 'Geändert',
|
||||
'title-action' => 'Aktion',
|
||||
|
||||
'type-folder' => 'Ordner',
|
||||
|
||||
'message-empty' => 'Ordner ist leer.',
|
||||
'message-choose' => 'Datei wählen',
|
||||
'message-delete' => 'Sind Sie sicher, dass Sie dieses Einzelteil löschen möchten?',
|
||||
'message-name' => 'Ordnernamen:',
|
||||
'message-rename' => 'Umbenennen in:',
|
||||
'message-extension_not_found' => 'Installieren Sie gd oder imagick Erweiterung um Bilder zuzuschneiden, Größe ändern und Thumbnails zu erstellen.',
|
||||
'message-drop' => 'Or drop files here to upload',
|
||||
|
||||
'error-rename' => 'Dateiname wird bereits verwendet!',
|
||||
'error-file-name' => 'File name cannot be empty!',
|
||||
'error-file-empty' => 'Sie müssen eine Datei auswählen!',
|
||||
'error-file-exist' => 'Eine Datei mit diesem Namen existiert bereits!',
|
||||
'error-file-size' => 'Dateigröße überschreitet das Serverlimit! (Maximale Größe: :max)',
|
||||
'error-delete-folder' => 'Sie können diesen Ordner nicht löschen, da er nicht leer ist!',
|
||||
'error-folder-name' => 'Der Ordnername darf nicht leer sein!',
|
||||
'error-folder-exist' => 'Ein Ordner mit diesem Namen ist bereits vorhanden!',
|
||||
'error-folder-alnum' => 'Nur alphanumerische Ordnernamen sind erlaubt!',
|
||||
'error-mime' => 'Unerwarteter Mimetyp:',
|
||||
'error-instance' => 'Die hochgeladene Datei sollte eine Instanz von UploadedFile sein',
|
||||
'error-invalid' => 'Ungültige Upload-Anfrage',
|
||||
'error-other' => 'Ein Fehler ist aufgetreten: ',
|
||||
'error-too-large' => 'Angeforderter Wert zu groß!',
|
||||
'error-cannotupload' => 'Sie sind nicht berechtigt, die Datei hochzuladen.',
|
||||
'error-cannotdelete' => 'Sie sind nicht berechtigt, neue Ordner / Dateien zu löschen',
|
||||
'error-cannotnewdirectory' => 'Sie sind nicht berechtigt, neue Ordner zu erstellen',
|
||||
'error-cannotrename' => 'Sie sind nicht berechtigt, Ordner / Dateien umzubenennen',
|
||||
'error-cannotresize' => 'Sie sind nicht berechtigt, die Dateigröße zu ändern',
|
||||
'error-folder-not-found'=> 'Folder not found! (:folder)',
|
||||
'error-size' => 'Over limit size:',
|
||||
|
||||
'btn-upload' => 'Datei hochladen',
|
||||
'btn-uploading' => 'Hochladen...',
|
||||
'btn-close' => 'Schließen',
|
||||
'btn-crop' => 'Zuschneiden',
|
||||
'btn-cancel' => 'Stornieren',
|
||||
'btn-resize' => 'Größe ändern',
|
||||
'btn-copy-crop' => 'Copy & Crop',
|
||||
'btn-crop-free' => 'Free',
|
||||
'btn-confirm' => 'Okay',
|
||||
'btn-open' => 'Ordner öffnen Folder',
|
||||
|
||||
'resize-ratio' => 'Verhältnis:',
|
||||
'resize-scaled' => 'Bild skaliert:',
|
||||
'resize-true' => 'Ja',
|
||||
'resize-old-height' => 'Original Höhe:',
|
||||
'resize-old-width' => 'Original Breite:',
|
||||
'resize-new-height' => 'Höhe:',
|
||||
'resize-new-width' => 'Breite:',
|
||||
|
||||
'locale-bootbox' => 'de',
|
||||
];
|
||||
69
packages/iqcontent/laravel-filemanager/src/lang/el/lfm.php
Normal file
69
packages/iqcontent/laravel-filemanager/src/lang/el/lfm.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Επιστροφή',
|
||||
'nav-new' => 'Νέος φάκελος',
|
||||
'nav-upload' => 'Ανέβασμα',
|
||||
'nav-thumbnails' => 'Εικονίδια',
|
||||
'nav-list' => 'Λίστα',
|
||||
|
||||
'menu-rename' => 'Μετονομασία',
|
||||
'menu-delete' => 'Διαγραφή',
|
||||
'menu-view' => 'Επισκόπηση',
|
||||
'menu-download' => 'Κατέβασμα',
|
||||
'menu-resize' => 'Αλλαγή μεγέθους',
|
||||
'menu-crop' => 'Κόψιμο',
|
||||
|
||||
'title-page' => 'Διαχείριση αρχείων',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Ανέβασμα αρχείου',
|
||||
'title-view' => 'Επισκόπηση αρχείου',
|
||||
'title-user' => 'Αρχεία',
|
||||
'title-share' => 'Κοινόχρηστα αρχεία',
|
||||
'title-item' => 'Αντικείμενο',
|
||||
'title-size' => 'Μέγεθος',
|
||||
'title-type' => 'Τύπος',
|
||||
'title-modified' => 'Ανανεώθηκε',
|
||||
'title-action' => 'Ενέργεια',
|
||||
|
||||
'type-folder' => 'Φάκελος',
|
||||
|
||||
'message-empty' => 'Ο φάκελος είναι άδειος',
|
||||
'message-choose' => 'Επιλογή αρχείων',
|
||||
'message-delete' => 'Είστε βέβαιοι ότι θέλετε να διαγράψετε αυτό το αντικείμενο?',
|
||||
'message-name' => 'Όνομα φακέλου:',
|
||||
'message-rename' => 'Μετονομασία σε:',
|
||||
'message-extension_not_found' => 'Παρακαλούμε κάντε εγκατάσταση του gd ή imagick php προσθετου προκειμένου να μπορείτε να κόψετε, αλλάξετε το μέγεθος και δημιουργήσετε εικονίδια των εικόνων.',
|
||||
|
||||
'error-rename' => 'Αυτό το όνομα αρχείου χρησιμοποιείται ήδη',
|
||||
'error-file-empty' => 'Πρέπει να επιλέξετε ένα αρχείο!',
|
||||
'error-file-exist' => 'Υπάρχει ήδη αρχείο με αυτό το όνομα!',
|
||||
'error-file-size' => 'Το μέγεθος του αρχείου ξεπερνά το επιτρεπόμενο όριο σε μέγεθος (μέγιστο μέγεθος: :max)',
|
||||
'error-delete-folder'=> 'Δεν μπορείτε να διαγράψετε τον φάκελο γιατί περιέχει αρχεία!',
|
||||
'error-folder-name' => 'Ο φάκελος δεν γίνεται να είναι άδειος',
|
||||
'error-folder-exist'=> 'Υπάρχει ήδη φάκελος με αυτό το όνομα!',
|
||||
'error-folder-alnum'=> 'Επιτρέπονται μόνο γράμματα και αριθμοί για το όνομα των φακέλων!',
|
||||
'error-mime' => 'Λανθασμένος τύπος αρχείου: ',
|
||||
'error-size' => 'Μέγιστο μέγεθος αρχείου:',
|
||||
'error-instance' => 'Το ανεβασμένο αρχείο έπρεπε να είναι του τύπου UploadedFile',
|
||||
'error-invalid' => 'Λάθος αίτημα ανεβάσματος',
|
||||
'error-other' => 'Παρουσιάστηκε ένα σφάλμα: ',
|
||||
'error-too-large' => 'Το μέγεθος του αιτήματος είναι πολύ μεγάλο!',
|
||||
|
||||
'btn-upload' => 'Ανέβασματα αρχείων',
|
||||
'btn-uploading' => 'Ανεβασμα...',
|
||||
'btn-close' => 'Κλείσιμο',
|
||||
'btn-crop' => 'Κόψιμο',
|
||||
'btn-cancel' => 'Ακύρωση',
|
||||
'btn-resize' => 'Αλλαγή μεγέθους',
|
||||
|
||||
'resize-ratio' => 'Αναλογία:',
|
||||
'resize-scaled' => 'Η εικόνα άλλαξε μέγεθος:',
|
||||
'resize-true' => 'Ναι',
|
||||
'resize-old-height' => 'Πρωτότυπο ύψος:',
|
||||
'resize-old-width' => 'Πρωτότυπο πλάτος:',
|
||||
'resize-new-height' => 'Ύψος:',
|
||||
'resize-new-width' => 'Μπλάτος:',
|
||||
|
||||
'locale-bootbox' => 'el',
|
||||
];
|
||||
79
packages/iqcontent/laravel-filemanager/src/lang/en/lfm.php
Normal file
79
packages/iqcontent/laravel-filemanager/src/lang/en/lfm.php
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Back',
|
||||
'nav-new' => 'New Folder',
|
||||
'nav-upload' => 'Upload',
|
||||
'nav-thumbnails' => 'Thumbnails',
|
||||
'nav-list' => 'List',
|
||||
'nav-sort' => 'Sort',
|
||||
'nav-sort-alphabetic'=> 'Sort By Alphabets',
|
||||
'nav-sort-time' => 'Sort By Time',
|
||||
|
||||
'menu-rename' => 'Rename',
|
||||
'menu-delete' => 'Delete',
|
||||
'menu-view' => 'Preview',
|
||||
'menu-download' => 'Download',
|
||||
'menu-resize' => 'Resize',
|
||||
'menu-crop' => 'Crop',
|
||||
'menu-move' => 'Move',
|
||||
'menu-multiple' => 'Multi-selection',
|
||||
|
||||
'title-page' => 'File Manager',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Upload File(s)',
|
||||
'title-view' => 'View File',
|
||||
'title-user' => 'Files',
|
||||
'title-share' => 'Shared Files',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Size',
|
||||
'title-type' => 'Type',
|
||||
'title-modified' => 'Modified',
|
||||
'title-action' => 'Action',
|
||||
|
||||
'type-folder' => 'Folder',
|
||||
|
||||
'message-empty' => 'Folder is empty.',
|
||||
'message-choose' => 'Choose File(s)',
|
||||
'message-delete' => 'Are you sure you want to delete this item?',
|
||||
'message-name' => 'Folder name:',
|
||||
'message-rename' => 'Rename to:',
|
||||
'message-extension_not_found' => 'Please install gd or imagick extension to crop, resize, and make thumbnails of images.',
|
||||
'message-drop' => 'Or drop files here to upload',
|
||||
|
||||
'error-rename' => 'File name already in use!',
|
||||
'error-file-name' => 'File name cannot be empty!',
|
||||
'error-file-empty' => 'You must choose a file!',
|
||||
'error-file-exist' => 'A file with this name already exists!',
|
||||
'error-file-size' => 'File size exceeds server limit! (maximum size: :max)',
|
||||
'error-delete-folder'=> 'You cannot delete this folder because it is not empty!',
|
||||
'error-folder-name' => 'Folder name cannot be empty!',
|
||||
'error-folder-exist'=> 'A folder with this name already exists!',
|
||||
'error-folder-alnum'=> 'Only alphanumeric folder names are allowed!',
|
||||
'error-folder-not-found'=> 'Folder not found! (:folder)',
|
||||
'error-mime' => 'Unexpected MimeType: ',
|
||||
'error-size' => 'Over limit size:',
|
||||
'error-instance' => 'The uploaded file should be an instance of UploadedFile',
|
||||
'error-invalid' => 'Invalid upload request',
|
||||
'error-other' => 'An error has occured: ',
|
||||
'error-too-large' => 'Request entity too large!',
|
||||
|
||||
'btn-upload' => 'Upload File(s)',
|
||||
'btn-uploading' => 'Uploading...',
|
||||
'btn-close' => 'Close',
|
||||
'btn-crop' => 'Crop',
|
||||
'btn-copy-crop' => 'Copy & Crop',
|
||||
'btn-crop-free' => 'Free',
|
||||
'btn-cancel' => 'Cancel',
|
||||
'btn-confirm' => 'Confirm',
|
||||
'btn-resize' => 'Resize',
|
||||
'btn-open' => 'Open Folder',
|
||||
|
||||
'resize-ratio' => 'Ratio:',
|
||||
'resize-scaled' => 'Image scaled:',
|
||||
'resize-true' => 'Yes',
|
||||
'resize-old-height' => 'Original Height:',
|
||||
'resize-old-width' => 'Original Width:',
|
||||
'resize-new-height' => 'Height:',
|
||||
'resize-new-width' => 'Width:',
|
||||
];
|
||||
76
packages/iqcontent/laravel-filemanager/src/lang/es/lfm.php
Normal file
76
packages/iqcontent/laravel-filemanager/src/lang/es/lfm.php
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Atrás',
|
||||
'nav-new' => 'Nueva Carpeta',
|
||||
'nav-upload' => 'Subir',
|
||||
'nav-thumbnails' => 'Miniaturas',
|
||||
'nav-list' => 'Listado',
|
||||
'nav-sort' => 'Ordenar',
|
||||
'nav-sort-alphabetic'=> 'Ordenar Alfabéticamente',
|
||||
'nav-sort-time' => 'Ordenar por Fecha',
|
||||
|
||||
'menu-rename' => 'Cambiar Nombre',
|
||||
'menu-delete' => 'Eliminar',
|
||||
'menu-view' => 'Ver',
|
||||
'menu-download' => 'Descargar',
|
||||
'menu-resize' => 'Redimensionar',
|
||||
'menu-crop' => 'Recortar',
|
||||
|
||||
'title-page' => 'Administrador de Archivos',
|
||||
'title-panel' => 'Administrador de Archivos',
|
||||
'title-upload' => 'Subir Archivo',
|
||||
'title-view' => 'Ver Archivo',
|
||||
'title-user' => 'Archivos',
|
||||
'title-share' => 'Archivos Compartidos',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Tamaño',
|
||||
'title-type' => 'Tipo',
|
||||
'title-modified' => 'Modificado',
|
||||
'title-action' => 'Acción',
|
||||
|
||||
'type-folder' => 'Carpeta',
|
||||
|
||||
'message-empty' => 'Carpeta está vacía.',
|
||||
'message-choose' => 'Seleccione Archivo',
|
||||
'message-delete' => '¿Está seguro que desea eliminar este item?',
|
||||
'message-name' => 'Nombre de Carpeta:',
|
||||
'message-rename' => 'Renombrar a:',
|
||||
'message-extension_not_found' => 'Por favor instale la extensión gd o imagick para recortar, redimensionar y hacer miniaturas de imágenes.',
|
||||
|
||||
'error-rename' => '¡El nombre del archivo ya existe!',
|
||||
'error-file-name' => '¡El nombre del archivo no puede estar vacío!',
|
||||
'error-file-empty' => '¡Debes escoger un archivo!',
|
||||
'error-file-exist' => '¡Ya existe un archivo con este nombre!',
|
||||
'error-file-size' => '¡El tamaño del archivo supera el límite del servidor! (tamaño máx.: :max)',
|
||||
'error-delete-folder'=> '¡No puedes eliminar esta carpeta porque no está vacía!',
|
||||
'error-folder-name' => '¡El nombre de carpeta no puede ser vacío!',
|
||||
'error-folder-exist'=> '¡Ya existe una carpeta con este nombre!',
|
||||
'error-folder-alnum'=> '¡Únicamente son soportados nombres de carpetas alfanuméricos!',
|
||||
'error-folder-not-found'=> '¡La carpeta no ha sido encontrada! (:folder)',
|
||||
'error-mime' => 'MimeType inesperado: ',
|
||||
'error-size' => 'Supera el tamaño máximo:',
|
||||
'error-instance' => 'El archivo subido debe ser una instancia de UploadedFile',
|
||||
'error-invalid' => 'Petición de subida inválida',
|
||||
'error-other' => 'Se ha producido un error: ',
|
||||
'error-too-large' => '¡Entidad de petición demasiado grande!',
|
||||
|
||||
'btn-upload' => 'Subir Archivo',
|
||||
'btn-uploading' => 'Subiendo...',
|
||||
'btn-close' => 'Cerrar',
|
||||
'btn-crop' => 'Recortar',
|
||||
'btn-copy-crop' => 'Copiar y recortar',
|
||||
'btn-cancel' => 'Cancelar',
|
||||
'btn-resize' => 'Redimensionar',
|
||||
|
||||
'resize-ratio' => 'Ratio:',
|
||||
'resize-scaled' => 'Imagen escalada:',
|
||||
'resize-true' => 'Si',
|
||||
'resize-old-height' => 'Alto Original:',
|
||||
'resize-old-width' => 'Ancho Original:',
|
||||
'resize-new-height' => 'Alto:',
|
||||
'resize-new-width' => 'Ancho:',
|
||||
|
||||
'locale-bootbox' => 'es',
|
||||
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/eu/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/eu/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Atzera',
|
||||
'nav-new' => 'Karpeta berria',
|
||||
'nav-upload' => 'Kargatu',
|
||||
'nav-thumbnails' => 'Koadro txikiak',
|
||||
'nav-list' => 'Zerrenda',
|
||||
'nav-sort' => 'Ordenatu',
|
||||
'nav-sort-alphabetic'=> 'Ordenatu alfabetikoki',
|
||||
'nav-sort-time' => 'Ordenatu denboraren arabera',
|
||||
|
||||
'menu-rename' => 'Aldatu izena',
|
||||
'menu-delete' => 'Ezabatu',
|
||||
'menu-view' => 'Aurrebista',
|
||||
'menu-download' => 'Deskargatu',
|
||||
'menu-resize' => 'Aldatu tamaina',
|
||||
'menu-crop' => 'Moztu',
|
||||
|
||||
'title-page' => 'Fitxategi-kudeatzailea',
|
||||
'title-panel' => 'Laravel fitxategi-kudeatzailea',
|
||||
'title-upload' => 'Kargatu fitxategia(k)',
|
||||
'title-view' => 'Ikusi fitxategia',
|
||||
'title-root' => 'Fitxategiak',
|
||||
'title-shares' => 'Partekatutako fitxategiak',
|
||||
'title-item' => 'Elementua',
|
||||
'title-size' => 'Tamaina',
|
||||
'title-type' => 'Mota',
|
||||
'title-modified' => 'Aldatua',
|
||||
'title-action' => 'Ekintza',
|
||||
|
||||
'type-folder' => 'Karpeta',
|
||||
|
||||
'message-empty' => 'Karpeta hutsik dago.',
|
||||
'message-choose' => 'Aukeratu fitxategia(k)',
|
||||
'message-delete' => 'Ziur zaude elementu hau ezabatu nahi duzula?',
|
||||
'message-name' => 'Karpetaren izena:',
|
||||
'message-rename' => 'Izen berria:',
|
||||
'message-extension_not_found' => 'Mesedez, instalatu gd edo imagick hedapena irudiak moztu, tamainaz aldatu eta koadro txikiak sortzeko.',
|
||||
|
||||
'error-rename' => 'Fitxategi-izena lehendik badago!',
|
||||
'error-file-name' => 'Fitxategi-izenak ezin du hutsik egon!',
|
||||
'error-file-empty' => 'Fitxategi bat aukeratu behar duzu!',
|
||||
'error-file-exist' => 'Izen hau duen fitxategi bat existitzen da dagoeneko!',
|
||||
'error-file-size' => 'Fitxategi-tamainak zerbitzariaren muga gainditzen du! (gehienezko tamaina: :max)',
|
||||
'error-delete-folder'=> 'Ezin duzu karpeta hau ezabatu, ez baitago hutsik!',
|
||||
'error-folder-name' => 'Karpeta-izenak ezin du hutsik egon!',
|
||||
'error-folder-exist'=> 'Izen hau duen karpeta bat existitzen da dagoeneko!',
|
||||
'error-folder-alnum'=> 'Karpeta-izen alfanumerikoak soilik onartzen dira!',
|
||||
'error-folder-not-found'=> 'Ez da karpeta aurkitu! (:folder)',
|
||||
'error-mime' => 'Ustekabeko MIME mota: ',
|
||||
'error-size' => 'Muga gainditzen duen tamaina:',
|
||||
'error-instance' => 'Kargatutako fitxategiak UploadedFile-en instantzia bat izan behar luke',
|
||||
'error-invalid' => 'Kargatzeko eskaera baliogabea',
|
||||
'error-other' => 'Errore bat gertatu da: ',
|
||||
'error-too-large' => 'Eskaera entitatea handiegia da!',
|
||||
|
||||
'btn-upload' => 'Kargatu fitxategia(k)',
|
||||
'btn-uploading' => 'Kargatzen...',
|
||||
'btn-close' => 'Itxi',
|
||||
'btn-crop' => 'Moztu',
|
||||
'btn-copy-crop' => 'Kopiatu eta moztu',
|
||||
'btn-cancel' => 'Utzi',
|
||||
'btn-resize' => 'Aldatu tamainaz',
|
||||
|
||||
'resize-ratio' => 'Erlazioa:',
|
||||
'resize-scaled' => 'Eskalatutako irudia:',
|
||||
'resize-true' => 'Bai',
|
||||
'resize-old-height' => 'Jatorrizko altuera:',
|
||||
'resize-old-width' => 'Jatorrizko zabalera:',
|
||||
'resize-new-height' => 'Altuera:',
|
||||
'resize-new-width' => 'Zabalera:',
|
||||
|
||||
'locale-bootbox' => 'eu',
|
||||
];
|
||||
81
packages/iqcontent/laravel-filemanager/src/lang/fa/lfm.php
Normal file
81
packages/iqcontent/laravel-filemanager/src/lang/fa/lfm.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'بازگشت',
|
||||
'nav-new' => 'پوشه جدید',
|
||||
'nav-upload' => 'آپلود',
|
||||
'nav-thumbnails' => 'تصویرک ها',
|
||||
'nav-list' => 'لیست',
|
||||
'nav-sort' => 'مرتب سازی',
|
||||
'nav-sort-alphabetic'=> 'مرتب سازی الفبایی',
|
||||
'nav-sort-time' => 'مرتب سازی زمانی',
|
||||
|
||||
'menu-rename' => 'تغییر نام',
|
||||
'menu-delete' => 'حذف',
|
||||
'menu-view' => 'مشاهده',
|
||||
'menu-download' => 'دانلود',
|
||||
'menu-resize' => 'تغییر اندازه',
|
||||
'menu-crop' => 'برش',
|
||||
'menu-move' => 'انتقال',
|
||||
'menu-multiple' => 'انتخاب چندتایی',
|
||||
|
||||
'title-page' => 'مدیریت فایل',
|
||||
'title-panel' => 'مدیریت فایل لاراول',
|
||||
'title-upload' => 'آپلود فایل',
|
||||
'title-view' => 'مشاهده فایل',
|
||||
'title-user' => 'فایل ها',
|
||||
'title-share' => 'فایل های اشتراکی',
|
||||
'title-item' => 'آیتم',
|
||||
'title-size' => 'اندازه',
|
||||
'title-type' => 'نوع',
|
||||
'title-modified' => 'تاریخ آخرین ویرایش',
|
||||
'title-action' => 'اقدام',
|
||||
|
||||
'type-folder' => 'پوشه',
|
||||
|
||||
'message-empty' => 'پوشه خالی است.',
|
||||
'message-choose' => 'انتخاب فایل',
|
||||
'message-delete' => 'آیا از حذف این آیتم مطمئن هستید؟',
|
||||
'message-name' => 'نام پوشه:',
|
||||
'message-rename' => 'تغییر نام به:',
|
||||
'message-extension_not_found' => 'لطفا gd یا imagick را برای برش، تغییر اندازه و ایجاد تصویرک نصب کنید.',
|
||||
'message-drop' => 'یا فایل ها را برای آپلود اینجا رها کنید',
|
||||
|
||||
'error-rename' => 'این نام قبلا استفاده شده!',
|
||||
'error-file-name' => 'نام فایل نباید خالی باشد!',
|
||||
'error-file-empty' => 'باید یک فایل انتخاب کنید!',
|
||||
'error-file-exist' => 'فایلی با این نام از قبل وجود دارد!',
|
||||
'error-file-size' => 'محدودیت حجم فایل سرور! (حداکثر حجم: :max)',
|
||||
'error-delete-folder'=> 'به دلیل خالی نبودن پوشه امکان حذف آن وجود ندارد!',
|
||||
'error-folder-name' => 'نام پوشه نمی تواند خالی باشد!',
|
||||
'error-folder-exist'=> 'پوشه ای با این نام از قبل وجود دارد!',
|
||||
'error-folder-alnum'=> 'فقط اسامی الفبایی برای پوشه مجاز است!',
|
||||
'error-folder-not-found'=> 'پوشهای یافت نشد! (:folder)',
|
||||
'error-mime' => 'پسوند غیرمجاز: ',
|
||||
'error-size' => 'سایز بیش از حد:',
|
||||
'error-instance' => 'فایل آپلود شده باید نمونه ای از UploadedFile باشد',
|
||||
'error-invalid' => 'درخواست آپلود غیرمعتبر',
|
||||
'error-other' => 'خطایی رخ داد: ',
|
||||
'error-too-large' => 'درخواست موجودیت خیلی طولانیست!',
|
||||
|
||||
'btn-upload' => 'آپلود فایل',
|
||||
'btn-uploading' => 'در حال آپلود',
|
||||
'btn-close' => 'بستن',
|
||||
'btn-crop' => 'برش',
|
||||
'btn-copy-crop' => 'برش و ذخیره در فایل جدید',
|
||||
'btn-crop-free' => 'برش آزاد',
|
||||
'btn-cancel' => 'انصراف',
|
||||
'btn-confirm' => 'تایید',
|
||||
'btn-resize' => 'تغییر اندازه',
|
||||
'btn-open' => 'باز کردن پوشه',
|
||||
|
||||
'resize-ratio' => 'نسبت:',
|
||||
'resize-scaled' => 'تصویر مقیاس شده:',
|
||||
'resize-true' => 'بله',
|
||||
'resize-old-height' => 'ارتفاع اصلی:',
|
||||
'resize-old-width' => 'عرض اصلی:',
|
||||
'resize-new-height' => 'ارتفاع:',
|
||||
'resize-new-width' => 'عرض:',
|
||||
|
||||
'locale-bootbox' => 'fa',
|
||||
];
|
||||
69
packages/iqcontent/laravel-filemanager/src/lang/fr/lfm.php
Normal file
69
packages/iqcontent/laravel-filemanager/src/lang/fr/lfm.php
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Retour',
|
||||
'nav-new' => 'Nouveau dossier',
|
||||
'nav-upload' => 'Envoyer',
|
||||
'nav-thumbnails' => 'Vignettes',
|
||||
'nav-list' => 'Liste',
|
||||
'nav-sort' => 'Trier',
|
||||
'nav-sort-alphabetic'=> 'Trier par ordre alphabétique',
|
||||
'nav-sort-time' => 'Trier par date',
|
||||
|
||||
'menu-rename' => 'Renommer',
|
||||
'menu-delete' => 'Effacer',
|
||||
'menu-view' => 'Voir',
|
||||
'menu-download' => 'Télécharger',
|
||||
'menu-resize' => 'Redimensionner',
|
||||
'menu-crop' => 'Rogner',
|
||||
|
||||
'title-page' => 'Gestionnaire de fichiers',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Envoyer un/des fichier(s)',
|
||||
'title-view' => 'Voir le fichier',
|
||||
'title-user' => 'Fichiers',
|
||||
'title-share' => 'Fichiers partagés',
|
||||
'title-item' => 'Élement',
|
||||
'title-size' => 'Taille du fichier',
|
||||
'title-type' => 'Type de fichier',
|
||||
'title-modified' => 'Date de modification',
|
||||
'title-action' => 'Exécuter',
|
||||
|
||||
'type-folder' => 'Dossier',
|
||||
|
||||
'message-empty' => 'Dossier est vide',
|
||||
'message-choose' => 'Choisir un/des fichier(s)',
|
||||
'message-delete' => 'Êtes-vous sûr de vouloir supprimer ce fichier ?',
|
||||
'message-name' => 'Nom du dossier :',
|
||||
'message-rename' => 'Renommer le dossier :',
|
||||
'message-extension_not_found' => 'Extension inconnue',
|
||||
|
||||
'error-rename' => 'Nom déjà utilisé',
|
||||
'error-file-empty' => 'Veuillez choisir un fichier',
|
||||
'error-file-exist' => 'Un fichier avec ce nom existe déjà',
|
||||
'error-file-size' => 'Le fichier dépasse la taille maximale autorisée de :max',
|
||||
'error-delete-folder'=> "Vous ne pouvez pas supprimer ce dossier car il n'est pas vide",
|
||||
'error-folder-name' => 'Le nom du dossier ne peut pas être vide',
|
||||
'error-folder-exist'=> 'Un dossier avec ce nom existe déjà',
|
||||
'error-folder-alnum'=> 'Seuls les caractéres alphanumériques sont autorisés',
|
||||
'error-mime' => 'Type de fichier MIME non autorisé: ',
|
||||
'error-instance' => 'Le fichier doit être une instance de UploadedFile',
|
||||
'error-invalid' => "Requête d'upload invalide",
|
||||
|
||||
'btn-upload' => 'Envoyer le/les fichier(s)',
|
||||
'btn-uploading' => 'Envoi...',
|
||||
'btn-close' => 'Fermer',
|
||||
'btn-crop' => 'Rogner',
|
||||
'btn-cancel' => 'Annuler',
|
||||
'btn-resize' => 'Redimensionner',
|
||||
|
||||
'resize-ratio' => 'Ratio:',
|
||||
'resize-scaled' => "Image à l'échelle:",
|
||||
'resize-true' => 'Oui',
|
||||
'resize-old-height' => 'Hauteur originale:',
|
||||
'resize-old-width' => 'Largeur originale:',
|
||||
'resize-new-height' => 'Hauteur',
|
||||
'resize-new-width' => 'Largeur',
|
||||
|
||||
'locale-bootbox' => 'fr',
|
||||
];
|
||||
65
packages/iqcontent/laravel-filemanager/src/lang/he/lfm.php
Normal file
65
packages/iqcontent/laravel-filemanager/src/lang/he/lfm.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'חזרה',
|
||||
'nav-new' => 'תיקייה חדשה',
|
||||
'nav-upload' => 'העלה',
|
||||
'nav-thumbnails' => 'תמונות ממוזערות',
|
||||
'nav-list' => 'רשימה',
|
||||
|
||||
'menu-rename' => 'שנה שם',
|
||||
'menu-delete' => 'מחק',
|
||||
'menu-view' => 'צפה',
|
||||
'menu-download' => 'הורד',
|
||||
'menu-resize' => 'שנה גודל',
|
||||
'menu-crop' => 'חתוך',
|
||||
|
||||
'title-page' => 'מנהל קבצים',
|
||||
'title-panel' => 'מנהל קבצים',
|
||||
'title-upload' => 'העלאת קובץ',
|
||||
'title-view' => 'צפייה בקובץ',
|
||||
'title-user' => 'קבצים',
|
||||
'title-share' => 'קבצים משותפים',
|
||||
'title-item' => 'פריט',
|
||||
'title-size' => 'גודל',
|
||||
'title-type' => 'סוג',
|
||||
'title-modified' => 'שונה',
|
||||
'title-action' => 'פעולה',
|
||||
|
||||
'type-folder' => 'תיקייה',
|
||||
|
||||
'message-empty' => 'התיקייה ריקה.',
|
||||
'message-choose' => 'בחר קובץ',
|
||||
'message-delete' => 'האם אתה בטוח שברצונך למחוק פריט זה?',
|
||||
'message-name' => 'שם התיקייה:',
|
||||
'message-rename' => 'שם חדש:',
|
||||
|
||||
'error-rename' => 'הקובץ נמצא בשימוש!',
|
||||
'error-file-empty' => 'עליך לבחור קובץ!',
|
||||
'error-file-exist' => 'קובץ עם שם זה כבר קיים!',
|
||||
'error-file-size' => 'File size exceeds server limit! (maximum size: :max)',
|
||||
'error-delete-folder'=> 'לא ניתן למחוק תייקיה זו מכיוון שהיא לא ריקה!',
|
||||
'error-folder-name' => 'נא להזין שם תיקייה!',
|
||||
'error-folder-exist'=> 'תיקייה עם שם זהה כבר קיימת!',
|
||||
'error-folder-alnum'=> 'Only alphanumeric folder names are allowed!',
|
||||
'error-mime' => 'סוג קובץ לא תקין: ',
|
||||
'error-instance' => 'הקובץ שהועלה צריך להיות מופע של UploadedFile',
|
||||
'error-invalid' => 'בקשת העלה לא תיקנית.',
|
||||
|
||||
'btn-upload' => 'העלה קובת',
|
||||
'btn-uploading' => 'מעלה...',
|
||||
'btn-close' => 'סגור',
|
||||
'btn-crop' => 'חתוך',
|
||||
'btn-cancel' => 'בטל',
|
||||
'btn-resize' => 'שנה גודל',
|
||||
|
||||
'resize-ratio' => 'יחס:',
|
||||
'resize-scaled' => 'תמונה הוגדלה:',
|
||||
'resize-true' => 'כן',
|
||||
'resize-old-height' => 'גובה מקורי:',
|
||||
'resize-old-width' => 'אורך מקורי:',
|
||||
'resize-new-height' => 'גובה:',
|
||||
'resize-new-width' => 'אורך:',
|
||||
|
||||
'locale-bootbox' => 'he',
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/hu/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/hu/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Vissza',
|
||||
'nav-new' => 'Új mappa',
|
||||
'nav-upload' => 'Feltöltés',
|
||||
'nav-thumbnails' => 'Miniatűrök',
|
||||
'nav-list' => 'Lista',
|
||||
'nav-sort' => 'Rendezés',
|
||||
'nav-sort-alphabetic'=> 'ABC szerint',
|
||||
'nav-sort-time' => 'Idő szerint',
|
||||
|
||||
'menu-rename' => 'Átnevezés',
|
||||
'menu-delete' => 'Törlés',
|
||||
'menu-view' => 'Megtekintés',
|
||||
'menu-download' => 'Letöltés',
|
||||
'menu-resize' => 'Átméretezés',
|
||||
'menu-crop' => 'Vágás',
|
||||
|
||||
'title-page' => 'Fájlkezelő',
|
||||
'title-panel' => 'Fájlkezelő',
|
||||
'title-upload' => 'Fájl feltöltés',
|
||||
'title-view' => 'Fájl megtekintés',
|
||||
'title-user' => 'Fájlok',
|
||||
'title-share' => 'Megosztott fájlok',
|
||||
'title-item' => 'Elem',
|
||||
'title-size' => 'Méret',
|
||||
'title-type' => 'Típus',
|
||||
'title-modified' => 'Módosított',
|
||||
'title-action' => 'Művelet',
|
||||
|
||||
'type-folder' => 'Mappa',
|
||||
|
||||
'message-empty' => 'A mappa üres.',
|
||||
'message-choose' => 'Fájl kiválasztása',
|
||||
'message-delete' => 'Biztos vagy benne, hogy törölni akarod az elemet?',
|
||||
'message-name' => 'Mappa név:',
|
||||
'message-rename' => 'Átnevezés erre:',
|
||||
'message-extension_not_found' => 'Kérlek telepítsd a gd vagy az imagick kiterjesztést a vágáshoz, átméretezéshez, és a képek miniatűr elemeinek elkészítéséhez.',
|
||||
|
||||
'error-rename' => 'A fájl neve használatban!',
|
||||
'error-file-name' => 'A fájlnév nem lehet üres!',
|
||||
'error-file-empty' => 'Ki kell választanod egy fájlt!',
|
||||
'error-file-exist' => 'Egy fájl már létezik ezzel a névvel.',
|
||||
'error-file-size' => 'A fájl mérete túl nagy a szerverre nem lehet feltölteni! (Maximális megengedett méret: :max)',
|
||||
'error-delete-folder'=> 'Nem tudod törölni ezt a mappát, mert nem üres!',
|
||||
'error-folder-name' => 'A mappa neve nem lehet üres!',
|
||||
'error-folder-exist'=> 'Egy mappa már létezik ezzel a névvel!',
|
||||
'error-folder-alnum'=> 'Csak alfanumerikus karakterek lehetnek a mappa nevében!',
|
||||
'error-folder-not-found'=> 'Nem található a(z) (:folder) nevű mappa!',
|
||||
'error-mime' => 'Váratlan fájltípusok (MimeType): ',
|
||||
'error-size' => 'Túl nagy méretű:',
|
||||
'error-instance' => 'A feltöltött fájlnak egy UploadedFile kérelemnek kellene lennie',
|
||||
'error-invalid' => 'Érvénytelen kérés a feltöltéssel kapcsolatban.',
|
||||
'error-other' => 'Hiba történt: ',
|
||||
'error-too-large' => 'Túl nagyméretű a fájl!',
|
||||
|
||||
'btn-upload' => 'Fájl feltöltés',
|
||||
'btn-uploading' => 'Feltöltés folyamatban...',
|
||||
'btn-close' => 'Bezárás',
|
||||
'btn-crop' => 'Vágás',
|
||||
'btn-copy-crop' => 'Másolás és vágás',
|
||||
'btn-cancel' => 'Mégse',
|
||||
'btn-resize' => 'Átméretezés',
|
||||
|
||||
'resize-ratio' => 'Arány:',
|
||||
'resize-scaled' => 'Kép méretarány:',
|
||||
'resize-true' => 'Igen',
|
||||
'resize-old-height' => 'Eredeti magasság:',
|
||||
'resize-old-width' => 'Eredeti szélesség:',
|
||||
'resize-new-height' => 'Magasság:',
|
||||
'resize-new-width' => 'Szélesség:',
|
||||
|
||||
'locale-bootbox' => 'hu',
|
||||
];
|
||||
76
packages/iqcontent/laravel-filemanager/src/lang/it/lfm.php
Normal file
76
packages/iqcontent/laravel-filemanager/src/lang/it/lfm.php
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
// Translator: Buonsito.it - Silvia Ghignone
|
||||
|
||||
return [
|
||||
'nav-back' => 'Indietro',
|
||||
'nav-new' => 'Nuova Cartella',
|
||||
'nav-upload' => 'Carica',
|
||||
'nav-thumbnails' => 'Anteprima',
|
||||
'nav-list' => 'Elencare',
|
||||
'nav-sort' => 'Ordinare',
|
||||
'nav-sort-alphabetic'=> 'Ordine Alfabetico',
|
||||
'nav-sort-time' => 'Ordine Temporale',
|
||||
|
||||
'menu-rename' => 'Rinomina',
|
||||
'menu-delete' => 'Elimina',
|
||||
'menu-view' => 'Anteprima',
|
||||
'menu-download' => 'Scarica',
|
||||
'menu-resize' => 'Ridimensiona',
|
||||
'menu-crop' => 'Taglia',
|
||||
|
||||
'title-page' => 'File Manager',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Carica File(s)',
|
||||
'title-view' => 'Vedi File',
|
||||
'title-user' => 'Files',
|
||||
'title-share' => 'Files Condivisi',
|
||||
'title-item' => 'Voce',
|
||||
'title-size' => 'Dimensione',
|
||||
'title-type' => 'Tipo',
|
||||
'title-modified' => 'Modificato',
|
||||
'title-action' => 'Azione',
|
||||
|
||||
'type-folder' => 'Cartella',
|
||||
|
||||
'message-empty' => 'La cartella è vuota.',
|
||||
'message-choose' => 'Scegli i File(s)',
|
||||
'message-delete' => 'Sei sicuro di voler cancellare questa voce?',
|
||||
'message-name' => 'Nome Cartella:',
|
||||
'message-rename' => 'Rinomina:',
|
||||
'message-extension_not_found' => 'Per favore installa gd oppure la estensione di imagick per tagliare, ridimensionare e creare anteprime delle immagini.',
|
||||
|
||||
'error-rename' => 'Il nome del file è già in uso!',
|
||||
'error-file-name' => 'Il nome del file non può essere vuoto!',
|
||||
'error-file-empty' => 'Devi scegliere un file!',
|
||||
'error-file-exist' => 'Esiste già un file con questo nome!',
|
||||
'error-file-size' => 'La dimensione del file eccede il limite del server! (dimensione massima: :max)',
|
||||
'error-delete-folder'=> 'Non puoi cancellare questa cartella perchè non è vuota!',
|
||||
'error-folder-name' => 'Il nome della cartella non può essere vuoto!',
|
||||
'error-folder-exist'=> 'Esiste già una cartella con questo nome!',
|
||||
'error-folder-alnum'=> 'Si può nominare una cartella solo con caratteri alfanumerici!',
|
||||
'error-folder-not-found'=> 'Cartella non trovata! (:folder)',
|
||||
'error-mime' => 'Unexpected MimeType: ',
|
||||
'error-size' => 'Superato il limite di dimensione:',
|
||||
'error-instance' => 'Il file caricato deve essere una istanza di UploadedFile',
|
||||
'error-invalid' => 'Richiesta di caricamento non valida',
|
||||
'error-other' => 'Si è veriifcato un errore: ',
|
||||
'error-too-large' => 'Richiesta di entità troppo grande!',
|
||||
|
||||
'btn-upload' => 'Carica File(s)',
|
||||
'btn-uploading' => 'Sto Caricando...',
|
||||
'btn-close' => 'Chiudi',
|
||||
'btn-crop' => 'Taglia',
|
||||
'btn-copy-crop' => 'Copia & Taglia',
|
||||
'btn-cancel' => 'Cancella',
|
||||
'btn-resize' => 'Ridimensiona',
|
||||
|
||||
'resize-ratio' => 'Proporzione:',
|
||||
'resize-scaled' => 'Immagine scalata:',
|
||||
'resize-true' => 'Sì',
|
||||
'resize-old-height' => 'Altezza Originale:',
|
||||
'resize-old-width' => 'Larghezza Originale:',
|
||||
'resize-new-height' => 'Altezza:',
|
||||
'resize-new-width' => 'Larghezza:',
|
||||
|
||||
'locale-bootbox' => 'it',
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/ka/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/ka/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'უკან',
|
||||
'nav-new' => 'ახალი საქაღალდე',
|
||||
'nav-upload' => 'ატვირთვა',
|
||||
'nav-thumbnails' => 'ესკიზები',
|
||||
'nav-list' => 'სია',
|
||||
'nav-sort' => 'სორტირება',
|
||||
'nav-sort-alphabetic' => 'სორტირება ანბანის მიხედვით',
|
||||
'nav-sort-time' => 'სორტირება დროის მიხედვით',
|
||||
|
||||
'menu-rename' => 'სახელის შეცვლა',
|
||||
'menu-delete' => 'წაშლა',
|
||||
'menu-view' => 'ნახვა',
|
||||
'menu-download' => 'გადმოწერა',
|
||||
'menu-resize' => 'ზომის შეცვლა',
|
||||
'menu-crop' => 'ამოჭრა',
|
||||
|
||||
'title-page' => 'ფაილების მენეჯერი',
|
||||
'title-panel' => 'ფაილების მენეჯერი',
|
||||
'title-upload' => 'ფაილ(ებ)ის ატვირთვა',
|
||||
'title-view' => 'ფაილის ნახვა',
|
||||
'title-root' => 'ფაილები',
|
||||
'title-shares' => 'გაზიარებული ფაილები',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'ზომა',
|
||||
'title-type' => 'ტიპი',
|
||||
'title-modified' => 'დარედაქტირდა',
|
||||
'title-action' => 'ქმედება',
|
||||
|
||||
'type-folder' => 'საქაღალდე',
|
||||
|
||||
'message-empty' => 'საქაღალდე ცარიელია.',
|
||||
'message-choose' => 'ფაილ(ებ)ის არჩევა',
|
||||
'message-delete' => 'ნამდვილად გსურთ აღნიშნულის წაშლა?',
|
||||
'message-name' => 'საქაღალდის დასახელება:',
|
||||
'message-rename' => 'სახელის შეცვლა:',
|
||||
'message-extension_not_found' => 'გთხოვთ დააყენოთ gd ან imagick გაფართოებები რათა ამოჭრათ, ზომა შეუცვალოთ და გააკეთოთ გამოსახულების ესკიზი.',
|
||||
|
||||
'error-rename' => 'ფაილი იდენტური დასახელებით უკვე არსებობს!',
|
||||
'error-file-name' => 'ფაილის დასახელება არ შეიძლება იყოს ცარიელი!',
|
||||
'error-file-empty' => 'თქვენ უნდა აირჩიოთ ფაილი!',
|
||||
'error-file-exist' => 'ფაილი იდენტური სახელით უკვე არსებობს!',
|
||||
'error-file-size' => 'ფაილის ზომა მეტია დასაშვებზე! (მაქსიმალური ზომა: :max)',
|
||||
'error-delete-folder' => 'საქაღალდის წაშლა შეუძლებელია, რადგან არ არის ცარიელი!',
|
||||
'error-folder-name' => 'საქაღალდის დასახელება არ შეიძლება იყოს ცარიელი!',
|
||||
'error-folder-exist' => 'საქაღალდე იდენტური დასახელებით უკვე არსებობს!',
|
||||
'error-folder-alnum' => 'დასაშვებია მხოლოდ ციფრები და ასოები!',
|
||||
'error-folder-not-found' => 'საქაღალდე ვერ მოიძებნა! (:folder)',
|
||||
'error-mime' => 'არასწორი MimeType: ',
|
||||
'error-size' => 'ლიმიტის გადაჭარბება:',
|
||||
'error-instance' => 'აღნიშნული ფაილი უნდა იყოს UploadedFile-ის ინსტანსი',
|
||||
'error-invalid' => 'არასწორი ატვირთვის მოთხოვნა',
|
||||
'error-other' => 'შეცდომაა: ',
|
||||
'error-too-large' => 'აღნიშნული ფაილი ძალიან დიდია!',
|
||||
|
||||
'btn-upload' => 'ფაილ(ებ)ის ატვირთვა',
|
||||
'btn-uploading' => 'იტვირთება...',
|
||||
'btn-close' => 'დახურვა',
|
||||
'btn-crop' => 'ამოჭრა',
|
||||
'btn-copy-crop' => 'დაკოპირება & ამოჭრა',
|
||||
'btn-cancel' => 'გაუქმება',
|
||||
'btn-resize' => 'ზომის შეცვლა',
|
||||
|
||||
'resize-ratio' => 'პროპორცია:',
|
||||
'resize-scaled' => 'სკალირებული გამოსახულება:',
|
||||
'resize-true' => 'კი',
|
||||
'resize-old-height' => 'ორიგინალის სიმაღლე:',
|
||||
'resize-old-width' => 'ორიგინალის სიგანე:',
|
||||
'resize-new-height' => 'სიმაღლე:',
|
||||
'resize-new-width' => 'სიგანე:',
|
||||
|
||||
'locale-bootbox' => 'ka',
|
||||
];
|
||||
73
packages/iqcontent/laravel-filemanager/src/lang/nl/lfm.php
Normal file
73
packages/iqcontent/laravel-filemanager/src/lang/nl/lfm.php
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Terug',
|
||||
'nav-new' => 'Nieuwe Map',
|
||||
'nav-upload' => 'Upload',
|
||||
'nav-thumbnails' => 'Thumbnails',
|
||||
'nav-list' => 'Lijst',
|
||||
'nav-sort' => 'Sorteren',
|
||||
'nav-sort-alphabetic' => 'Sorteer op naam',
|
||||
'nav-sort-time' => 'Sorteer op tijd',
|
||||
|
||||
'menu-rename' => 'Hernoemen',
|
||||
'menu-delete' => 'Verwijderen',
|
||||
'menu-view' => 'Bekijken',
|
||||
'menu-download' => 'Download',
|
||||
'menu-resize' => 'Formaat aanpassen',
|
||||
'menu-crop' => 'Bijsnijden',
|
||||
|
||||
'title-page' => 'File Manager',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Bestand uploaden',
|
||||
'title-view' => 'Bestand bekijken',
|
||||
'title-user' => 'Bestanden',
|
||||
'title-share' => 'Openbare map',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Grootte',
|
||||
'title-type' => 'Type',
|
||||
'title-modified' => 'Gewijzigd',
|
||||
'title-action' => 'Actie',
|
||||
|
||||
'type-folder' => 'Map',
|
||||
|
||||
'message-empty' => 'De map is leeg.',
|
||||
'message-choose' => 'Kies bestand',
|
||||
'message-delete' => 'Weet u zeker dat u dit bestand wilt verwijderen?',
|
||||
'message-name' => 'Mapnaam:',
|
||||
'message-rename' => 'Hernoemen naar:',
|
||||
'message-extension_not_found' => 'Installeer de GD of Imagick extensie om afbeeldingen te kunnen bewerken.',
|
||||
|
||||
'error-rename' => 'Bestandsnaam is al in gebruik!',
|
||||
'error-file-empty' => 'U dient een bestand te kiezen!',
|
||||
'error-file-exist' => 'Een bestand met deze naam bestaat al!',
|
||||
'error-file-size' => 'Bestandsgrootte overschrijdt de server limiet! (maximale grootte: :max)',
|
||||
'error-delete-folder' => 'U kunt deze map niet verwijderen omdat deze nog bestanden bevat!',
|
||||
'error-folder-name' => 'Mapnaam mag niet leeg zijn!',
|
||||
'error-folder-exist' => 'Een map met deze naam bestaat al!',
|
||||
'error-folder-alnum' => 'Alleen alfanumerieke map namen zijn toegestaan!',
|
||||
'error-mime' => 'Onverwacht MimeType: ',
|
||||
'error-instance' => 'Het geuploade bestand moet een instantie zijn van UploadedFile',
|
||||
'error-invalid' => 'Ongeldig upload verzoek',
|
||||
'error-other' => 'Er is een fout opgetreden: ',
|
||||
'error-size' => 'U heeft de maximale bestandsgrootte overschreden:',
|
||||
'error-too-large' => 'De verzoek entiteit is te groot!',
|
||||
|
||||
'btn-upload' => 'Bestand uploaden',
|
||||
'btn-uploading' => 'Uploaden...',
|
||||
'btn-close' => 'Sluiten',
|
||||
'btn-crop' => 'Bijsnijden',
|
||||
'btn-copy-crop' => 'Kopiëren & Bijsnijden',
|
||||
'btn-cancel' => 'Annuleren',
|
||||
'btn-resize' => 'Formaat aanpassen',
|
||||
|
||||
'resize-ratio' => 'Ratio:',
|
||||
'resize-scaled' => 'Afbeelding geschaald:',
|
||||
'resize-true' => 'Ja',
|
||||
'resize-old-height' => 'Originele hoogte:',
|
||||
'resize-old-width' => 'Originele breedte:',
|
||||
'resize-new-height' => 'Hoogte:',
|
||||
'resize-new-width' => 'Breedte:',
|
||||
|
||||
'locale-bootbox' => 'nl',
|
||||
];
|
||||
68
packages/iqcontent/laravel-filemanager/src/lang/pl/lfm.php
Normal file
68
packages/iqcontent/laravel-filemanager/src/lang/pl/lfm.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Powrót',
|
||||
'nav-new' => 'Nowy Folder',
|
||||
'nav-upload' => 'Wgraj plik',
|
||||
'nav-thumbnails' => 'Miniaturki',
|
||||
'nav-list' => 'Lista',
|
||||
|
||||
'menu-rename' => 'Zmień nazwę',
|
||||
'menu-delete' => 'Usuń',
|
||||
'menu-view' => 'Wyświetl',
|
||||
'menu-download' => 'Pobierz',
|
||||
'menu-resize' => 'Zmień rozmiar',
|
||||
'menu-crop' => 'Przytnij',
|
||||
|
||||
'title-page' => 'Menedżer plików',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Wgraj plik',
|
||||
'title-view' => 'Podgląd',
|
||||
'title-user' => 'Pliki',
|
||||
'title-share' => 'Udostępnione pliki',
|
||||
'title-item' => 'Nazwa',
|
||||
'title-size' => 'Rozmiar',
|
||||
'title-type' => 'Typ',
|
||||
'title-modified' => 'Utworzono',
|
||||
'title-action' => 'Akcje',
|
||||
|
||||
'type-folder' => 'Folder',
|
||||
|
||||
'message-empty' => 'Przepraszamy, ten folder jest pusty.',
|
||||
'message-choose' => 'Wybierz plik',
|
||||
'message-delete' => 'Czy na pewno chcesz usunąć ten plik?',
|
||||
'message-name' => 'Nazwa folderu:',
|
||||
'message-rename' => 'Zmień nazwę:',
|
||||
'message-extension_not_found' => 'Niestety, nie znaleziono wymaganych rozszerzeń. Zainstaluj gd lub imagick aby manipulować grafiką',
|
||||
|
||||
'error-rename' => 'Niestety, istnieje już plik o takiej nazwie!',
|
||||
'error-file-empty' => 'You must choose a file!',
|
||||
'error-file-exist' => 'Niestety, istnieje już plik o takiej nazwie!',
|
||||
'error-file-size' => 'Przekroczono maksymalny rozmiar wgrywanych plików! (maximum size: :max)',
|
||||
'error-delete-folder'=> 'Nie możesz usunąć tego folderu, ponieważ nie jest pusty!',
|
||||
'error-folder-name' => 'Nazwa folderu nie może być pusta!',
|
||||
'error-folder-exist'=> 'Folder o tej nazwie już istnieje!',
|
||||
'error-folder-alnum'=> 'Dozwolone są jedynie nazwy alfanumeryczne!',
|
||||
'error-mime' => 'Nierozpoznawany MimeType: ',
|
||||
'error-instance' => 'Wgrywany obiekt powinien być instanją UploadedFile',
|
||||
'error-invalid' => 'Nieprawidłowe zapytanie',
|
||||
'error-other' => 'Napotkano następujący błąd: ',
|
||||
'error-too-large' => 'Przekroczono dozwolony czas operacji!',
|
||||
|
||||
'btn-upload' => 'Wgraj plik',
|
||||
'btn-uploading' => 'Wgrywanie...',
|
||||
'btn-close' => 'Zamknij',
|
||||
'btn-crop' => 'Przytnij',
|
||||
'btn-cancel' => 'Anuluj',
|
||||
'btn-resize' => 'Zmień rozmiar',
|
||||
|
||||
'resize-ratio' => 'Stosunek:',
|
||||
'resize-scaled' => 'Zmieniono rozmiar:',
|
||||
'resize-true' => 'tak',
|
||||
'resize-old-height' => 'Orginalna wysokość:',
|
||||
'resize-old-width' => 'Orginalna szerokość:',
|
||||
'resize-new-height' => 'Wysokość:',
|
||||
'resize-new-width' => 'Szerokość:',
|
||||
|
||||
'locale-bootbox' => 'pl',
|
||||
];
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Voltar',
|
||||
'nav-new' => 'Nova Pasta',
|
||||
'nav-upload' => 'Enviar',
|
||||
'nav-thumbnails' => 'Miniatura',
|
||||
'nav-list' => 'Lista',
|
||||
'nav-sort' => 'Ordenar',
|
||||
'nav-sort-alphabetic'=> 'Ordenar alfabeticamente',
|
||||
'nav-sort-time' => 'Ordenar por data',
|
||||
|
||||
'menu-rename' => 'Renomear',
|
||||
'menu-delete' => 'Deletar',
|
||||
'menu-view' => 'Ver',
|
||||
'menu-download' => 'Download',
|
||||
'menu-resize' => 'Redimensionar',
|
||||
'menu-crop' => 'Cortar',
|
||||
|
||||
'title-page' => 'Gerenciador de Arquivos',
|
||||
'title-panel' => 'Gerenciador de Arquivos',
|
||||
'title-upload' => 'Envio de Arquivo',
|
||||
'title-view' => 'Ver Arquivo',
|
||||
'title-user' => 'Arquivos',
|
||||
'title-share' => 'Arquivos Compartilhados',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Tamanho',
|
||||
'title-type' => 'Tipo',
|
||||
'title-modified' => 'Modificado',
|
||||
'title-action' => 'Ação',
|
||||
|
||||
'type-folder' => 'Pasta',
|
||||
|
||||
'message-empty' => 'A pasta está vazia.',
|
||||
'message-choose' => 'Escolha um arquivo',
|
||||
'message-delete' => 'Você está certo que quer deletar este arquivo?',
|
||||
'message-name' => 'Nome da pasta:',
|
||||
'message-rename' => 'Renomear para:',
|
||||
'message-extension_not_found' => 'Por favor instale a extenção gd ou imagick para recortar, redimensionar e criar miniaturas das imagens.',
|
||||
|
||||
'error-rename' => 'Nome de arquivo já está em uso!',
|
||||
'error-file-name' => 'O nome do arquivo não pode estar vazio!',
|
||||
'error-file-empty' => 'Você deve escolher um arquivo!',
|
||||
'error-file-exist' => 'Um arquivo com este nome já existe!',
|
||||
'error-file-size' => 'Tamanho do arquivo excedeu o limite permitido pelo servidor! (Tamanho máximo: :max)',
|
||||
'error-delete-folder'=> 'Você não pode deletar esta pasta, pois ela não está vazia!',
|
||||
'error-folder-name' => 'Nome da pasta não pode ser vazio!',
|
||||
'error-folder-exist'=> 'Uma pasta com este nome já existe!',
|
||||
'error-folder-alnum'=> 'Permitido somente caracteres alfanuméricos para nomes de pastas!',
|
||||
'error-folder-not-found'=> 'A pasta não foi encontrada! (:folder)',
|
||||
'error-mime' => 'MimeType inesperado: ',
|
||||
'error-size' => 'Excede o tamanho máximo:',
|
||||
'error-instance' => 'O arquivo enviado deve ser uma instância de UploadedFile',
|
||||
'error-invalid' => 'Pedido de upload inválido',
|
||||
'error-other' => 'Ocorreu um erro: ',
|
||||
'error-too-large' => 'Solicitar entidade muito grande!',
|
||||
|
||||
'btn-upload' => 'Enviar Arquivo',
|
||||
'btn-uploading' => 'Enviando...',
|
||||
'btn-close' => 'Fechar',
|
||||
'btn-crop' => 'Cortar',
|
||||
'btn-copy-crop' => 'Copie e corte',
|
||||
'btn-cancel' => 'Cancelar',
|
||||
'btn-resize' => 'Redimensionar',
|
||||
|
||||
'resize-ratio' => 'Proporção:',
|
||||
'resize-scaled' => 'Imagem dimensionada:',
|
||||
'resize-true' => 'Sim',
|
||||
'resize-old-height' => 'Altura Original:',
|
||||
'resize-old-width' => 'Largura Original:',
|
||||
'resize-new-height' => 'Altura:',
|
||||
'resize-new-width' => 'Largura:',
|
||||
|
||||
'locale-bootbox' => 'pt_BR',
|
||||
];
|
||||
66
packages/iqcontent/laravel-filemanager/src/lang/pt/lfm.php
Normal file
66
packages/iqcontent/laravel-filemanager/src/lang/pt/lfm.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Voltar',
|
||||
'nav-new' => 'Nova Pasta',
|
||||
'nav-upload' => 'Upload',
|
||||
'nav-thumbnails' => 'Miniatura',
|
||||
'nav-list' => 'Lista',
|
||||
|
||||
'menu-rename' => 'Renomear',
|
||||
'menu-delete' => 'Apagar',
|
||||
'menu-view' => 'Ver',
|
||||
'menu-download' => 'Download',
|
||||
'menu-resize' => 'Redimensionar',
|
||||
'menu-crop' => 'Cortar',
|
||||
|
||||
'title-page' => 'Gestor de Arquivos',
|
||||
'title-panel' => 'Gestor de Arquivos',
|
||||
'title-upload' => 'Envio de Arquivo',
|
||||
'title-view' => 'Ver Arquivo',
|
||||
'title-user' => 'Arquivos',
|
||||
'title-share' => 'Arquivos Partilhados',
|
||||
'title-item' => 'Item',
|
||||
'title-size' => 'Tamanho',
|
||||
'title-type' => 'Tipo',
|
||||
'title-modified' => 'Modificado',
|
||||
'title-action' => 'Ação',
|
||||
|
||||
'type-folder' => 'Pasta',
|
||||
|
||||
'message-empty' => 'A pasta está vazia.',
|
||||
'message-choose' => 'Escolha um arquivo',
|
||||
'message-delete' => 'Tem a certeza que quer pagar este arquivo?',
|
||||
'message-name' => 'Nome da pasta:',
|
||||
'message-rename' => 'Renomear para:',
|
||||
'message-extension_not_found' => '(translation wanted)',
|
||||
|
||||
'error-rename' => 'Nome de arquivo já está em uso!',
|
||||
'error-file-empty' => 'Deve escolher um arquivo!',
|
||||
'error-file-exist' => 'Um arquivo com este nome já existe!',
|
||||
'error-file-size' => 'O tamanho do ficheiro excede o limite permitido! (tamanho máximo: :max)',
|
||||
'error-delete' => 'Não pode apagar esta pasta, não está vazia!',
|
||||
'error-folder-name' => 'Nome da pasta não pode ser vazio!',
|
||||
'error-folder-exist'=> 'Uma pasta com este nome já existe!',
|
||||
'error-folder-alnum'=> 'Apenas valores alfanuméricos são permitidos para o nome da pasta!',
|
||||
'error-mime' => 'Tipo de ficheiro não suportado: ',
|
||||
'error-instance' => 'O ficheiro carregado deve ser uma instância de UploadedFile',
|
||||
'error-invalid' => 'Pedido de upload inválido',
|
||||
|
||||
'btn-upload' => 'Enviar Arquivo',
|
||||
'btn-uploading' => 'A enviar...',
|
||||
'btn-close' => 'Fechar',
|
||||
'btn-crop' => 'Cortar',
|
||||
'btn-cancel' => 'Cancelar',
|
||||
'btn-resize' => 'Redimensionar',
|
||||
|
||||
'resize-ratio' => 'Proporção:',
|
||||
'resize-scaled' => 'Imagem dimensionada:',
|
||||
'resize-true' => 'Sim',
|
||||
'resize-old-height' => 'Altura Original:',
|
||||
'resize-old-width' => 'Largura Original:',
|
||||
'resize-new-height' => 'Altura:',
|
||||
'resize-new-width' => 'Largura:',
|
||||
|
||||
'locale-bootbox' => 'pt',
|
||||
];
|
||||
71
packages/iqcontent/laravel-filemanager/src/lang/ro/lfm.php
Normal file
71
packages/iqcontent/laravel-filemanager/src/lang/ro/lfm.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Înapoi',
|
||||
'nav-new' => 'Folder Nou',
|
||||
'nav-upload' => 'Încarcă',
|
||||
'nav-thumbnails' => 'Miniatură',
|
||||
'nav-list' => 'Listă',
|
||||
|
||||
'menu-rename' => 'Redenumește',
|
||||
'menu-delete' => 'Șterge',
|
||||
'menu-view' => 'Previzualizează',
|
||||
'menu-download' => 'Descarcă',
|
||||
'menu-resize' => 'Redimensionează',
|
||||
'menu-crop' => 'Taie',
|
||||
|
||||
'title-page' => 'Manager fișiere',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Încarcă fișier(e)',
|
||||
'title-view' => 'Vezi fișier',
|
||||
'title-user' => 'Fișiere',
|
||||
'title-share' => 'Fișiere distribuite',
|
||||
'title-item' => 'Element',
|
||||
'title-size' => 'Dimensiune',
|
||||
'title-type' => 'Tip',
|
||||
'title-modified' => 'Modificat',
|
||||
'title-action' => 'Acțiune',
|
||||
|
||||
'type-folder' => 'Folder',
|
||||
|
||||
'message-empty' => 'Folderul este gol.',
|
||||
'message-choose' => 'Alege fișier(e)',
|
||||
'message-delete' => 'Ești sigur că vrei să ștergi acest element?',
|
||||
'message-name' => 'Nume folder:',
|
||||
'message-rename' => 'Redenumește în:',
|
||||
'message-extension_not_found' => 'Te rog instalează extensia gd sau imagick ca să poți tăia, redimensiona sau genera miniaturi ale imaginilor.',
|
||||
|
||||
'error-rename' => 'Nume fișier este deja folosit!',
|
||||
'error-file-name' => 'Numele fișierului nu poate fi gol!',
|
||||
'error-file-empty' => 'Trebuie să alegi un fișier!',
|
||||
'error-file-exist' => 'Există deja un fișier cu acest nume!',
|
||||
'error-file-size' => 'Dimeniunea fișierului depășeste limita maximă a serverului! (limită maximă: :max)',
|
||||
'error-delete-folder'=> 'Nu poți șterge acest folder pentru că nu este gol!',
|
||||
'error-folder-name' => 'Numele folderului nu poate fi gol!',
|
||||
'error-folder-exist'=> 'Există deja un folder cu acest nume!',
|
||||
'error-folder-alnum'=> 'Sunt permise doar nume alfanumerice pentru foldere!',
|
||||
'error-folder-not-found'=> 'Folderul nu a fost gasit! (:folder)',
|
||||
'error-mime' => 'Unexpected MimeType: ',
|
||||
'error-size' => 'Dimensiune peste limită:',
|
||||
'error-instance' => 'Fișierul încărcat trebuie să fie o instanță a UploadedFile',
|
||||
'error-invalid' => 'Cerere invalidă de upload',
|
||||
'error-other' => 'A apărut o eroare: ',
|
||||
'error-too-large' => 'Entitate request prea mare!',
|
||||
|
||||
'btn-upload' => 'Încarcă fișier(e)',
|
||||
'btn-uploading' => 'Încarcare...',
|
||||
'btn-close' => 'Închide',
|
||||
'btn-crop' => 'Taie',
|
||||
'btn-cancel' => 'Anulează',
|
||||
'btn-resize' => 'Redimensionează',
|
||||
|
||||
'resize-ratio' => 'Rație:',
|
||||
'resize-scaled' => 'Imagine scalată:',
|
||||
'resize-true' => 'Da',
|
||||
'resize-old-height' => 'Înălțime originală:',
|
||||
'resize-old-width' => 'Lățime originală:',
|
||||
'resize-new-height' => 'Înălțime:',
|
||||
'resize-new-width' => 'Lățime:',
|
||||
|
||||
'locale-bootbox' => 'ro',
|
||||
];
|
||||
71
packages/iqcontent/laravel-filemanager/src/lang/ru/lfm.php
Normal file
71
packages/iqcontent/laravel-filemanager/src/lang/ru/lfm.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Назад',
|
||||
'nav-new' => 'Новая папка',
|
||||
'nav-upload' => 'Загрузить',
|
||||
'nav-thumbnails' => 'Миниатюры',
|
||||
'nav-list' => 'Список',
|
||||
'nav-sort' => 'Сортировать',
|
||||
'nav-sort-alphabetic'=> 'Сортировать по алфавиту',
|
||||
'nav-sort-time' => 'Сортировать по времени',
|
||||
|
||||
'menu-rename' => 'Переименовать',
|
||||
'menu-delete' => 'Удалить',
|
||||
'menu-view' => 'Просмотр',
|
||||
'menu-download' => 'Загрузить',
|
||||
'menu-resize' => 'Изменить размер',
|
||||
'menu-crop' => 'Обрезать',
|
||||
|
||||
'title-page' => 'Менеджер файлов',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Загрузка файла',
|
||||
'title-view' => 'Просмотр файла',
|
||||
'title-user' => 'Файлы',
|
||||
'title-share' => 'Общие файлы',
|
||||
'title-item' => 'Номер',
|
||||
'title-size' => 'Размер',
|
||||
'title-type' => 'Тип',
|
||||
'title-modified' => 'Изменен',
|
||||
'title-action' => 'Действие',
|
||||
|
||||
'type-folder' => 'Папка',
|
||||
|
||||
'message-empty' => 'Папка пуста.',
|
||||
'message-choose' => 'Выберите файл',
|
||||
'message-delete' => 'Вы уверены что хотите это удалить?',
|
||||
'message-name' => 'Название папки:',
|
||||
'message-rename' => 'Переименовать в:',
|
||||
'message-extension_not_found' => 'Требуется установка GD или Imagick расширения для обрезания, масштабирования и создания миниатюр изображений.',
|
||||
|
||||
'error-rename' => 'Имя файла уже используется!',
|
||||
'error-file-empty' => 'Вы должны выбрать файл!',
|
||||
'error-file-exist' => 'Файл с этим именем уже существует!',
|
||||
'error-file-size' => 'Размер файла превышает разрешенный сервером размер! (максимальный размер: :max)',
|
||||
'error-delete-folder'=> 'Вы не можете удалить эту папку, потому что она не пустая!',
|
||||
'error-folder-name' => 'Имя папки не может быть пустым!',
|
||||
'error-folder-exist'=> 'Папка с таким названием уже существует!',
|
||||
'error-folder-alnum'=> 'Название папки должно содержать только цифры и латинские буквы!',
|
||||
'error-mime' => 'Неподдерживаемый MimeType: ',
|
||||
'error-instance' => 'Загруженный файл должен быть экземпляром UploadedFile',
|
||||
'error-invalid' => 'Неверный запрос загрузки',
|
||||
'error-other' => 'Произошла ошибка: ',
|
||||
'error-too-large' => 'Размер загружаемого файла слишком велик!',
|
||||
|
||||
'btn-upload' => 'Загрузить файл',
|
||||
'btn-uploading' => 'Загрузка...',
|
||||
'btn-close' => 'Закрыть',
|
||||
'btn-crop' => 'Обрезать',
|
||||
'btn-cancel' => 'Отмена',
|
||||
'btn-resize' => 'Изменить размер',
|
||||
|
||||
'resize-ratio' => 'Соотношение:',
|
||||
'resize-scaled' => 'Масштабировать изображение:',
|
||||
'resize-true' => 'Да',
|
||||
'resize-old-height' => 'Оригинальная высота:',
|
||||
'resize-old-width' => 'Оригинальная ширина:',
|
||||
'resize-new-height' => 'Высота:',
|
||||
'resize-new-width' => 'Ширина:',
|
||||
|
||||
'locale-bootbox' => 'ru',
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/sv/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/sv/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Tillbaka',
|
||||
'nav-new' => 'Ny mapp',
|
||||
'nav-upload' => 'Ladda up',
|
||||
'nav-thumbnails' => 'Miniatyrer',
|
||||
'nav-list' => 'Lista',
|
||||
'nav-sort' => 'Sortera',
|
||||
'nav-sort-alphabetic'=> 'Sortera efter alfabetet',
|
||||
'nav-sort-time' => 'Sortera efter tid',
|
||||
|
||||
'menu-rename' => 'Byt namn',
|
||||
'menu-delete' => 'Ta bort',
|
||||
'menu-view' => 'Förhandsgranska',
|
||||
'menu-download' => 'Ladda ner',
|
||||
'menu-resize' => 'Ändra storlek',
|
||||
'menu-crop' => 'Beskär',
|
||||
|
||||
'title-page' => 'Filhanterare',
|
||||
'title-panel' => 'Laravel Filhanterare',
|
||||
'title-upload' => 'Ladda upp fil(er)',
|
||||
'title-view' => 'Visa fil',
|
||||
'title-user' => 'Filer',
|
||||
'title-share' => 'Delade filer',
|
||||
'title-item' => 'Objekt',
|
||||
'title-size' => 'Storlek',
|
||||
'title-type' => 'Typ',
|
||||
'title-modified' => 'Ändrat',
|
||||
'title-action' => 'Hantera',
|
||||
|
||||
'type-folder' => 'Map',
|
||||
|
||||
'message-empty' => 'Mappen är tom',
|
||||
'message-choose' => 'Välj fil(er)',
|
||||
'message-delete' => 'Är du säker på att du vill radera det här objektet?',
|
||||
'message-name' => 'Mappnamn:',
|
||||
'message-rename' => 'Byt namn till:',
|
||||
'message-extension_not_found' => 'Vänligen installera gd- eller imagick-tillägget för att beskära, ändra storlek och göra miniatyrer av bilder.',
|
||||
|
||||
'error-rename' => 'Filnamnet finns redan!',
|
||||
'error-file-name' => 'Filnamnet kan inte vara tomt!',
|
||||
'error-file-empty' => 'Du måste välja en fil!',
|
||||
'error-file-exist' => 'En fil med detta namn finns redan!',
|
||||
'error-file-size' => 'Filstorleken överstiger servergränsen! (maximal storlek:: max) ',
|
||||
'error-delete-folder'=> 'Du kan inte radera den här mappen eftersom den inte är tom!',
|
||||
'error-folder-name' => 'Mappnamnet kan inte vara tomt!',
|
||||
'error-folder-exist'=> 'En mapp med detta namn finns redan!',
|
||||
'error-folder-alnum'=> 'Endast alfanumeriska mappnamn är tillåtna!',
|
||||
'error-folder-not-found'=> 'Mappen hittades inte! (:folder)',
|
||||
'error-mime' => 'Oväntad MimeType: ',
|
||||
'error-size' => 'Över storleksgräns:',
|
||||
'error-instance' => 'Den uppladdade filen måste vara en typ UploadedFile',
|
||||
'error-invalid' => 'Ogiltig uppladdningsförfrågan',
|
||||
'error-other' => 'Ett fel har uppstått:',
|
||||
'error-too-large' => 'Objektet i begäran är för stor!',
|
||||
|
||||
'btn-upload' => 'Ladda upp fil(er)',
|
||||
'btn-uploading' => 'Laddar upp...',
|
||||
'btn-close' => 'Stäng',
|
||||
'btn-crop' => 'Beskär',
|
||||
'btn-copy-crop' => 'Kopiera & Beskär',
|
||||
'btn-cancel' => 'Avbryt',
|
||||
'btn-resize' => 'Ändra stolek',
|
||||
|
||||
'resize-ratio' => 'Förhållande:',
|
||||
'resize-scaled' => 'Bildskala:',
|
||||
'resize-true' => 'Ja',
|
||||
'resize-old-height' => 'Original höjd:',
|
||||
'resize-old-width' => 'Original bredd:',
|
||||
'resize-new-height' => 'Höjd:',
|
||||
'resize-new-width' => 'Bredd:',
|
||||
|
||||
'locale-bootbox' => 'sv',
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/tr/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/tr/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Geri',
|
||||
'nav-new' => 'Yeni Klasör',
|
||||
'nav-upload' => 'Yükle',
|
||||
'nav-thumbnails' => 'Küçük Resim',
|
||||
'nav-list' => 'Liste',
|
||||
'nav-sort' => 'Sırala',
|
||||
'nav-sort-alphabetic'=> 'A-Z Sırala',
|
||||
'nav-sort-time' => 'Zamana Göre Sırala',
|
||||
|
||||
'menu-rename' => 'Ad değiştir',
|
||||
'menu-delete' => 'Sil',
|
||||
'menu-view' => 'Görüntüle',
|
||||
'menu-download' => 'İndir',
|
||||
'menu-resize' => 'Boyutlandır',
|
||||
'menu-crop' => 'Kırp',
|
||||
|
||||
'title-page' => 'Dosya Kütüphanesi',
|
||||
'title-panel' => 'Laravel Dosya Kütüphanesi',
|
||||
'title-upload' => 'Dosya Yükle',
|
||||
'title-view' => 'Dosya Gör',
|
||||
'title-user' => 'Dosyalarım',
|
||||
'title-share' => 'Paylaşılan Dosyalar',
|
||||
'title-item' => 'Dosya',
|
||||
'title-size' => 'Boyut',
|
||||
'title-type' => 'Tür',
|
||||
'title-modified' => 'Güncelleme',
|
||||
'title-action' => 'Komutlar',
|
||||
|
||||
'type-folder' => 'Klasör',
|
||||
|
||||
'message-empty' => 'Klasör boş.',
|
||||
'message-choose' => 'Dosya seç',
|
||||
'message-delete' => 'Bu dosyayı silmek istediğinizden emin misiniz?',
|
||||
'message-name' => 'Klasör adı:',
|
||||
'message-rename' => 'Yeni ad:',
|
||||
'message-extension_not_found' => 'Lütfen resimleri kesmek, yeniden boyutlandırmak ve küçük resimler oluşturmak için gd veya imagick eklentisini yükleyin',
|
||||
|
||||
'error-rename' => 'Dosya adı kullanımda!',
|
||||
'error-file-name' => 'Dosya adı boş bırakılamaz!',
|
||||
'error-file-empty' => 'Bir dosya seçmelisiniz!',
|
||||
'error-file-exist' => 'Bu adda bir dosya zaten var!',
|
||||
'error-file-size' => 'Dosya boyutu sunucu limitini aşıyor! (maximum boyut: :max)',
|
||||
'error-delete-folder'=> 'Klasör boş olmadığından, klasörü silemezsiniz!',
|
||||
'error-folder-name' => 'Klasör adı yazılmalıdır!',
|
||||
'error-folder-exist'=> 'Bu adda bir klasör zaten var!',
|
||||
'error-folder-alnum'=> 'Yalnızca alfasayısal klasör adlarına izin verilir!',
|
||||
'error-folder-not-found'=> 'Klasör bulunamadı! (:folder)',
|
||||
'error-mime' => 'Beklenmeyen Mime Türü: ',
|
||||
'error-size' => 'Boyut sınırın üstünde:',
|
||||
'error-instance' => 'Yüklenen dosya, UploadedFile örneğinde olmalıdır',
|
||||
'error-invalid' => 'Geçersiz yükleme isteği',
|
||||
'error-other' => 'Bir hata oluştu: ',
|
||||
'error-too-large' => 'Girilen veri çok fazla!',
|
||||
|
||||
'btn-upload' => 'Yükle',
|
||||
'btn-uploading' => 'Yükleniyor...',
|
||||
'btn-close' => 'Kapat',
|
||||
'btn-crop' => 'Kırp',
|
||||
'btn-copy-crop' => 'Kopyala & Kes',
|
||||
'btn-cancel' => 'İptal',
|
||||
'btn-resize' => 'Boyutlandır',
|
||||
|
||||
'resize-ratio' => 'Oran:',
|
||||
'resize-scaled' => 'Boyutlandırıldı:',
|
||||
'resize-true' => 'Evet',
|
||||
'resize-old-height' => 'Orijinal Yükseklik:',
|
||||
'resize-old-width' => 'Orijinal Genişlik:',
|
||||
'resize-new-height' => 'Yükseklik:',
|
||||
'resize-new-width' => 'Genişlik:',
|
||||
|
||||
'locale-bootbox' => 'tr',
|
||||
];
|
||||
81
packages/iqcontent/laravel-filemanager/src/lang/uk/lfm.php
Normal file
81
packages/iqcontent/laravel-filemanager/src/lang/uk/lfm.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Назад',
|
||||
'nav-new' => 'Нова папка',
|
||||
'nav-upload' => 'Завантажити',
|
||||
'nav-thumbnails' => 'Мініатюри',
|
||||
'nav-list' => 'Список',
|
||||
'nav-sort' => 'Сортувати',
|
||||
'nav-sort-alphabetic'=> 'Сортувати за алфавітом',
|
||||
'nav-sort-time' => 'Сортувати за часом',
|
||||
|
||||
'menu-rename' => 'Перейменувати',
|
||||
'menu-delete' => 'Вилучити',
|
||||
'menu-view' => 'Перегляд',
|
||||
'menu-download' => 'Завантажити',
|
||||
'menu-resize' => 'Змінити розмір',
|
||||
'menu-crop' => 'Обрізати',
|
||||
'menu-move' => 'Перемістити',
|
||||
'menu-multiple' => 'Multi-виділення',
|
||||
|
||||
'title-page' => 'Менеджер файлів',
|
||||
'title-panel' => 'Laravel FileManager',
|
||||
'title-upload' => 'Завантаження файлу',
|
||||
'title-view' => 'Перегляд файлу',
|
||||
'title-user' => 'Файли',
|
||||
'title-share' => 'Спільні файли',
|
||||
'title-item' => 'Номер',
|
||||
'title-size' => 'Розмір',
|
||||
'title-type' => 'Тип',
|
||||
'title-modified' => 'Змінений',
|
||||
'title-action' => 'Дія',
|
||||
|
||||
'type-folder' => 'Папка',
|
||||
|
||||
'message-empty' => 'Папка порожня.',
|
||||
'message-choose' => 'Виберіть файл(-и)',
|
||||
'message-delete' => 'Ви впевнені, що хочете вилучити цей елемент?',
|
||||
'message-name' => 'Назва папки:',
|
||||
'message-rename' => 'Перейменувати в:',
|
||||
'message-extension_not_found' => 'Інсталюйте, будь ласка, розширення GD чи ImageMagick щоб мати можливість кадрувати, змінювати розміри чи створювати ескізи зображень.',
|
||||
'message-drop' => 'Або перетягніть файли сюди для завантаження',
|
||||
|
||||
'error-rename' => 'Ім\'я файлу вже використовується!',
|
||||
'error-file-name' => 'Ім\'я файлу не може бути порожнім!',
|
||||
'error-file-empty' => 'Ви повинні вибрати файл!',
|
||||
'error-file-exist' => 'Файл з таким ім\'ям вже існує!',
|
||||
'error-file-size' => 'Розмір файлу перевищує обмеження сервера! (максимальний розмір: :max)',
|
||||
'error-delete-folder'=> 'Ви не можете вилучити цю папку, оскільки вона не порожня!',
|
||||
'error-folder-name' => 'Ім\'я папки не може бути порожнім!',
|
||||
'error-folder-exist'=> 'Папка з тиким ім\'ям вже існує!',
|
||||
'error-folder-alnum'=> 'Дозволені лише буквено-цифрові імена папок!',
|
||||
'error-folder-not-found'=> 'Папку не знайдено! (:folder)',
|
||||
'error-mime' => 'Недозволений MimeType: ',
|
||||
'error-size' => 'Розмір перевищує дозволений:',
|
||||
'error-instance' => 'Завантажений файл має бути екземпляром UploadedFile',
|
||||
'error-invalid' => 'Неправильний запит на завантаження',
|
||||
'error-other' => 'Сталася помилка: ',
|
||||
'error-too-large' => 'Занадто великий об\'єкт запиту!',
|
||||
|
||||
'btn-upload' => 'Завантажити файл',
|
||||
'btn-uploading' => 'Завантаження...',
|
||||
'btn-close' => 'Закрити',
|
||||
'btn-crop' => 'Обрізати',
|
||||
'btn-copy-crop' => 'Скопіювати & Обрізати',
|
||||
'btn-crop-free' => 'Звільнити',
|
||||
'btn-cancel' => 'Скасувати',
|
||||
'btn-confirm' => 'Підтвердити',
|
||||
'btn-resize' => 'Змінити розмір',
|
||||
'btn-open' => 'Відкрити папку',
|
||||
|
||||
'resize-ratio' => 'Співвідношення:',
|
||||
'resize-scaled' => 'Масштабоване зображення:',
|
||||
'resize-true' => 'Так',
|
||||
'resize-old-height' => 'Оригінальна висота:',
|
||||
'resize-old-width' => 'Оригінальна ширина:',
|
||||
'resize-new-height' => 'Висота:',
|
||||
'resize-new-width' => 'Ширина:',
|
||||
|
||||
'locale-bootbox' => 'uk',
|
||||
];
|
||||
75
packages/iqcontent/laravel-filemanager/src/lang/vi/lfm.php
Normal file
75
packages/iqcontent/laravel-filemanager/src/lang/vi/lfm.php
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => 'Quay lại',
|
||||
'nav-new' => 'Tạo thư mục mới',
|
||||
'nav-upload' => 'Tải lên',
|
||||
'nav-thumbnails' => 'Ảnh đại diện',
|
||||
'nav-list' => 'Danh sách',
|
||||
'nav-sort' => 'Sắp xếp',
|
||||
'nav-sort-alphabetic'=> 'Sắp xếp theo thứ tự Alphabet',
|
||||
'nav-sort-time' => 'Sắp xếp theo thời gian',
|
||||
|
||||
'menu-rename' => 'Đổi tên',
|
||||
'menu-delete' => 'Xoá',
|
||||
'menu-view' => 'Xem trước',
|
||||
'menu-download' => 'Tải xuống',
|
||||
'menu-resize' => 'Thay đổi kích thước',
|
||||
'menu-crop' => 'Cắt hình',
|
||||
|
||||
'title-page' => 'Trình quản lý tập tin',
|
||||
'title-panel' => 'Trình quản lý tập tin Laravel',
|
||||
'title-upload' => 'Tải lên',
|
||||
'title-view' => 'Xem tập tin',
|
||||
'title-root' => 'Các tập tin',
|
||||
'title-shares' => 'Các tập tin được chia sẽ',
|
||||
'title-item' => 'Mục',
|
||||
'title-size' => 'Kích thước',
|
||||
'title-type' => 'Loại',
|
||||
'title-modified' => 'Đã chỉnh sửa',
|
||||
'title-action' => 'Hành động',
|
||||
|
||||
'type-folder' => 'Thư mục',
|
||||
|
||||
'message-empty' => 'Thư mục trống.',
|
||||
'message-choose' => 'Chọn tập tin',
|
||||
'message-delete' => 'Bạn có chắc chắn muốn xoá mục này?',
|
||||
'message-name' => 'Tên thư mục:',
|
||||
'message-rename' => 'Đổi tên thành:',
|
||||
'message-extension_not_found' => 'Vui lòng cài đặt gói mở rộng gd hoặc imagick để cắt, thay đổi kích thước và tạo ảnh đại điện cho các hình ảnh.',
|
||||
|
||||
'error-rename' => 'Tên tập tin đã được chọn!',
|
||||
'error-file-name' => 'Tên tập tin không được trống!',
|
||||
'error-file-empty' => 'Bạn phải lựa chọn 1 tập tin!',
|
||||
'error-file-exist' => 'Cùng tên với tập tin khác!',
|
||||
'error-file-size' => 'Kích thước tập tin đạt tối đa! (kích thước tối đa: :max)',
|
||||
'error-delete-folder'=> 'Bạn không thể xoá thư mục này bởi vì nó không trống!',
|
||||
'error-folder-name' => 'Tên thư mục không được trống!',
|
||||
'error-folder-exist'=> 'Tên thư mục đã được sử dụng!',
|
||||
'error-folder-alnum'=> 'Tên thư mục chỉ được sử dụng chữ hoặc số!',
|
||||
'error-folder-not-found'=> 'Không tìm thấy thư mục! (:folder)',
|
||||
'error-mime' => 'Không hỗ trợ MimeType: ',
|
||||
'error-size' => 'Kích thước quá lớn:',
|
||||
'error-instance' => 'Tập tin được tải lên phải là một kiểu UploadedFile',
|
||||
'error-invalid' => 'Yêu cầu tải lên không hợp lệ',
|
||||
'error-other' => 'Có lỗi xảy ra: ',
|
||||
'error-too-large' => 'Kích thước yêu cầu quá lơn!',
|
||||
|
||||
'btn-upload' => 'Tải tập tin',
|
||||
'btn-uploading' => 'Đang tải lên...',
|
||||
'btn-close' => 'Đóng',
|
||||
'btn-crop' => 'Cắt',
|
||||
'btn-copy-crop' => 'Sao chép và Cắt',
|
||||
'btn-cancel' => 'Huỷ bỏ',
|
||||
'btn-resize' => 'Thay đổi kích thước',
|
||||
|
||||
'resize-ratio' => 'Tỷ lệ:',
|
||||
'resize-scaled' => 'Hình ảnh thu nhỏ:',
|
||||
'resize-true' => 'Đồng ý',
|
||||
'resize-old-height' => 'Chiều cao ban đầu:',
|
||||
'resize-old-width' => 'Chiều rộng ban đầu:',
|
||||
'resize-new-height' => 'Chiều cao:',
|
||||
'resize-new-width' => 'Chiều rộng:',
|
||||
|
||||
'locale-bootbox' => 'vi',
|
||||
];
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => '回上一页',
|
||||
'nav-new' => '添加文件夹',
|
||||
'nav-upload' => '上传档案',
|
||||
'nav-thumbnails' => '缩略图显示',
|
||||
'nav-list' => '列表显示',
|
||||
'nav-sort' => '排序',
|
||||
'nav-sort-alphabetic'=> '按字母排序',
|
||||
'nav-sort-time' => '按时间排序',
|
||||
|
||||
'menu-rename' => '重命名',
|
||||
'menu-delete' => '删除',
|
||||
'menu-view' => '预览',
|
||||
'menu-download' => '下载',
|
||||
'menu-resize' => '缩放',
|
||||
'menu-crop' => '裁剪',
|
||||
|
||||
'title-page' => '档案管理',
|
||||
'title-panel' => '档案管理',
|
||||
'title-upload' => '上传档案',
|
||||
'title-view' => '预览档案',
|
||||
'title-user' => '我的档案',
|
||||
'title-share' => '共享的文件',
|
||||
'title-item' => '项目名称',
|
||||
'title-size' => '档案大小',
|
||||
'title-type' => '档案类型',
|
||||
'title-modified' => '上次修改',
|
||||
'title-action' => '操作',
|
||||
|
||||
'type-folder' => '文件夹',
|
||||
|
||||
'message-empty' => '空的文件夹',
|
||||
'message-choose' => '选择档案',
|
||||
'message-delete' => '确定要删除此项目吗?',
|
||||
'message-name' => '文件夹名称:',
|
||||
'message-rename' => '重命名为:',
|
||||
'message-extension_not_found' => '请安装 gd 或 imagick 以使用缩放、裁剪、及缩图功能',
|
||||
|
||||
'error-rename' => '名称重复,请重新输入!',
|
||||
'error-file-name' => '文件名不能为空!',
|
||||
'error-file-empty' => '请选择档案!',
|
||||
'error-file-exist' => '相同档名的档案已存在!',
|
||||
'error-file-size' => '档案过大,无法上传! (档案大小上限: :max)',
|
||||
'error-delete-folder'=> '文件夹未清空,无法删除!',
|
||||
'error-folder-name' => '请输入文件夹名称!',
|
||||
'error-folder-exist'=> '相同名称的文件夹已存在!',
|
||||
'error-folder-alnum'=> '文件夹名称只能包含英数字',
|
||||
'error-folder-not-found'=> '找不到文件夹 :folder',
|
||||
'error-mime' => 'Mime 格式错误 : ',
|
||||
'error-size' => '大小超出限制:',
|
||||
'error-instance' => '上传档案的 instance 应为 UploadedFile',
|
||||
'error-invalid' => '验证失败,上传未成功',
|
||||
'error-other' => '发生错误: ',
|
||||
'error-too-large' => '请求内容太大!',
|
||||
|
||||
'btn-upload' => '上传',
|
||||
'btn-uploading' => '上传中...',
|
||||
'btn-close' => '关闭',
|
||||
'btn-crop' => '裁剪',
|
||||
'btn-copy-crop' => '复制并裁剪',
|
||||
'btn-cancel' => '取消',
|
||||
'btn-resize' => '缩放',
|
||||
|
||||
'resize-ratio' => '比例:',
|
||||
'resize-scaled' => '是否已缩放:',
|
||||
'resize-true' => '是',
|
||||
'resize-old-height' => '原始高度:',
|
||||
'resize-old-width' => '原始宽度:',
|
||||
'resize-new-height' => '目前高度:',
|
||||
'resize-new-width' => '目前宽度:',
|
||||
|
||||
'locale-bootbox' => 'zh_CN',
|
||||
];
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'nav-back' => '回上一頁',
|
||||
'nav-new' => '新增資料夾',
|
||||
'nav-upload' => '上傳檔案',
|
||||
'nav-thumbnails' => '縮圖顯示',
|
||||
'nav-list' => '列表顯示',
|
||||
'nav-sort' => '排序',
|
||||
'nav-sort-alphabetic'=> '依字母排序',
|
||||
'nav-sort-time' => '依時間排序',
|
||||
|
||||
'menu-rename' => '重新命名',
|
||||
'menu-delete' => '刪除',
|
||||
'menu-view' => '預覽',
|
||||
'menu-download' => '下載',
|
||||
'menu-resize' => '縮放',
|
||||
'menu-crop' => '裁剪',
|
||||
'menu-move' => '搬移',
|
||||
'menu-multiple' => '多選',
|
||||
|
||||
'title-page' => '檔案管理',
|
||||
'title-panel' => '檔案管理',
|
||||
'title-upload' => '上傳檔案',
|
||||
'title-view' => '預覽檔案',
|
||||
'title-user' => '我的檔案',
|
||||
'title-share' => '共享的檔案',
|
||||
'title-item' => '項目名稱',
|
||||
'title-size' => '檔案大小',
|
||||
'title-type' => '檔案類型',
|
||||
'title-modified' => '上次修改',
|
||||
'title-action' => '操作',
|
||||
|
||||
'type-folder' => '資料夾',
|
||||
|
||||
'message-empty' => '空的資料夾',
|
||||
'message-choose' => '選擇檔案',
|
||||
'message-delete' => '確定要刪除此項目嗎?',
|
||||
'message-name' => '資料夾名稱:',
|
||||
'message-rename' => '重新命名為:',
|
||||
'message-extension_not_found' => '請安裝 gd 或 imagick 以使用縮放、裁剪、及縮圖功能',
|
||||
'message-drop' => '或將檔案拖拉到此處',
|
||||
|
||||
'error-rename' => '名稱重複,請重新輸入!',
|
||||
'error-file-name' => '請輸入檔案名稱!',
|
||||
'error-file-empty' => '請選擇檔案!',
|
||||
'error-file-exist' => '相同檔名的檔案已存在!',
|
||||
'error-file-size' => '檔案過大,無法上傳! (檔案大小上限: :max)',
|
||||
'error-delete-folder'=> '資料夾未清空,無法刪除!',
|
||||
'error-folder-name' => '請輸入資料夾名稱!',
|
||||
'error-folder-exist'=> '相同名稱的資料夾已存在!',
|
||||
'error-folder-alnum'=> '資料夾名稱只能包含英數字!',
|
||||
'error-folder-not-found'=> '找不到資料夾: :folder',
|
||||
'error-mime' => 'Mime 格式錯誤 : ',
|
||||
'error-instance' => '上傳檔案的 instance 應為 UploadedFile',
|
||||
'error-invalid' => '驗證失敗,上傳未成功',
|
||||
'error-other' => '發生錯誤: ',
|
||||
'error-too-large' => '請求內容太大!',
|
||||
|
||||
'btn-upload' => '上傳',
|
||||
'btn-uploading' => '上傳中...',
|
||||
'btn-close' => '關閉',
|
||||
'btn-crop' => '裁剪',
|
||||
'btn-copy-crop' => '裁剪為新的檔案',
|
||||
'btn-crop-free' => '不限比例',
|
||||
'btn-cancel' => '取消',
|
||||
'btn-confirm' => '確認',
|
||||
'btn-resize' => '縮放',
|
||||
'btn-open' => '開啟資料夾',
|
||||
|
||||
'resize-ratio' => '比例:',
|
||||
'resize-scaled' => '是否已縮放:',
|
||||
'resize-true' => '是',
|
||||
'resize-old-height' => '原始高度:',
|
||||
'resize-old-width' => '原始寬度:',
|
||||
'resize-new-height' => '目前高度:',
|
||||
'resize-new-width' => '目前寬度:',
|
||||
|
||||
'locale-bootbox' => 'zh_TW',
|
||||
];
|
||||
104
packages/iqcontent/laravel-filemanager/src/views/crop.blade.php
Normal file
104
packages/iqcontent/laravel-filemanager/src/views/crop.blade.php
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<div class="row no-gutters">
|
||||
<div class="col-xl-8">
|
||||
<div class="crop-container">
|
||||
<img src="{{ $img->url . '?timestamp=' . $img->time }}" class="img img-responsive">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-4">
|
||||
<div class="text-center">
|
||||
<div class="img-preview center-block"></div>
|
||||
<br>
|
||||
<div class="btn-group clearfix">
|
||||
<label class="btn btn-info btn-aspectRatio active" onclick="changeAspectRatio(this, 16 / 9)">
|
||||
16:9
|
||||
</label>
|
||||
<label class="btn btn-info btn-aspectRatio" onclick="changeAspectRatio(this, 4 / 3)">
|
||||
4:3
|
||||
</label>
|
||||
<label class="btn btn-info btn-aspectRatio" onclick="changeAspectRatio(this, 1)">
|
||||
1:1
|
||||
</label>
|
||||
<label class="btn btn-info btn-aspectRatio" onclick="changeAspectRatio(this, 2 / 3)">
|
||||
2:3
|
||||
</label>
|
||||
<label class="btn btn-info btn-aspectRatio" onclick="changeAspectRatio(this, null)">
|
||||
{{ trans('laravel-filemanager::lfm.btn-crop-free') }}
|
||||
</label>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
<div class="btn-group clearfix">
|
||||
<button class="btn btn-secondary" onclick="loadItems()">{{ trans('laravel-filemanager::lfm.btn-cancel') }}</button>
|
||||
<button class="btn btn-warning" onclick="performCropNew()">{{ trans('laravel-filemanager::lfm.btn-copy-crop') }}</button>
|
||||
<button class="btn btn-primary" onclick="performCrop()">{{ trans('laravel-filemanager::lfm.btn-crop') }}</button>
|
||||
</div>
|
||||
<form id='cropForm'>
|
||||
<input type="hidden" id="img" name="img" value="{{ $img->name }}">
|
||||
<input type="hidden" id="working_dir" name="working_dir" value="{{ $working_dir }}">
|
||||
<input type="hidden" id="dataX" name="dataX">
|
||||
<input type="hidden" id="dataY" name="dataY">
|
||||
<input type="hidden" id="dataWidth" name="dataWidth">
|
||||
<input type="hidden" id="dataHeight" name="dataHeight">
|
||||
<input type='hidden' name='_token' value='{{csrf_token()}}'>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var $image = null,
|
||||
options = {};
|
||||
|
||||
$(document).ready(function () {
|
||||
var $dataX = $('#dataX'),
|
||||
$dataY = $('#dataY'),
|
||||
$dataHeight = $('#dataHeight'),
|
||||
$dataWidth = $('#dataWidth');
|
||||
|
||||
$image = $('.crop-container > img');
|
||||
options = {
|
||||
aspectRatio: 16 / 9,
|
||||
preview: ".img-preview",
|
||||
strict: false,
|
||||
crop: function (data) {
|
||||
// Output the result data for cropping image.
|
||||
$dataX.val(Math.round(data.x));
|
||||
$dataY.val(Math.round(data.y));
|
||||
$dataHeight.val(Math.round(data.height));
|
||||
$dataWidth.val(Math.round(data.width));
|
||||
}
|
||||
};
|
||||
$image.cropper(options);
|
||||
});
|
||||
function changeAspectRatio(_this, aspectRatio) {
|
||||
options.aspectRatio = aspectRatio;
|
||||
$('.btn-aspectRatio.active').removeClass('active');
|
||||
$(_this).addClass('active');
|
||||
$('.img-preview').removeAttr('style');
|
||||
$image.cropper('destroy').cropper(options);
|
||||
return false;
|
||||
}
|
||||
function performCrop() {
|
||||
performLfmRequest('cropimage', {
|
||||
img: $("#img").val(),
|
||||
working_dir: $("#working_dir").val(),
|
||||
dataX: $("#dataX").val(),
|
||||
dataY: $("#dataY").val(),
|
||||
dataHeight: $("#dataHeight").val(),
|
||||
dataWidth: $("#dataWidth").val(),
|
||||
type: $('#type').val()
|
||||
}).done(loadItems);
|
||||
}
|
||||
|
||||
function performCropNew() {
|
||||
performLfmRequest('cropnewimage', {
|
||||
img: $("#img").val(),
|
||||
working_dir: $("#working_dir").val(),
|
||||
dataX: $("#dataX").val(),
|
||||
dataY: $("#dataY").val(),
|
||||
dataHeight: $("#dataHeight").val(),
|
||||
dataWidth: $("#dataWidth").val(),
|
||||
type: $('#type').val()
|
||||
}).done(loadItems);
|
||||
}
|
||||
</script>
|
||||
174
packages/iqcontent/laravel-filemanager/src/views/demo.blade.php
Normal file
174
packages/iqcontent/laravel-filemanager/src/views/demo.blade.php
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Laravel Filemanager</title>
|
||||
<link rel="shortcut icon" type="image/png" href="{{ asset('vendor/laravel-filemanager/img/72px color.png') }}">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1 class="page-header">Integration Demo Page</h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">CKEditor</h2>
|
||||
<textarea name="ce" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">TinyMCE</h2>
|
||||
<textarea name="tm" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">Summernote</h2>
|
||||
<textarea id="summernote-editor" name="content"></textarea>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h2 class="mt-4">Standalone Image Button</h2>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<a id="lfm" data-input="thumbnail" data-preview="holder" class="btn btn-primary text-white">
|
||||
<i class="fa fa-picture-o"></i> Choose
|
||||
</a>
|
||||
</span>
|
||||
<input id="thumbnail" class="form-control" type="text" name="filepath">
|
||||
</div>
|
||||
<div id="holder" style="margin-top:15px;max-height:100px;"></div>
|
||||
<h2 class="mt-4">Standalone File Button</h2>
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<a id="lfm2" data-input="thumbnail2" data-preview="holder2" class="btn btn-primary text-white">
|
||||
<i class="fa fa-picture-o"></i> Choose
|
||||
</a>
|
||||
</span>
|
||||
<input id="thumbnail2" class="form-control" type="text" name="filepath">
|
||||
</div>
|
||||
<div id="holder2" style="margin-top:15px;max-height:100px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2 class="mt-4">Embed file manager</h2>
|
||||
<iframe src="/laravel-filemanager" style="width: 100%; height: 500px; overflow: hidden; border: none;"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
|
||||
<script>
|
||||
var route_prefix = "{{ url(config('lfm.url_prefix')) }}";
|
||||
</script>
|
||||
|
||||
<!-- CKEditor init -->
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.5.11/ckeditor.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/ckeditor/4.5.11/adapters/jquery.js"></script>
|
||||
<script>
|
||||
$('textarea[name=ce]').ckeditor({
|
||||
height: 100,
|
||||
filebrowserImageBrowseUrl: route_prefix + '?type=Images',
|
||||
filebrowserImageUploadUrl: route_prefix + '/upload?type=Images&_token={{csrf_token()}}',
|
||||
filebrowserBrowseUrl: route_prefix + '?type=Files',
|
||||
filebrowserUploadUrl: route_prefix + '/upload?type=Files&_token={{csrf_token()}}'
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- TinyMCE init -->
|
||||
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
|
||||
<script>
|
||||
var editor_config = {
|
||||
path_absolute : "",
|
||||
selector: "textarea[name=tm]",
|
||||
plugins: [
|
||||
"link image"
|
||||
],
|
||||
relative_urls: false,
|
||||
height: 129,
|
||||
file_browser_callback : function(field_name, url, type, win) {
|
||||
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
|
||||
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
|
||||
|
||||
var cmsURL = editor_config.path_absolute + route_prefix + '?field_name=' + field_name;
|
||||
if (type == 'image') {
|
||||
cmsURL = cmsURL + "&type=Images";
|
||||
} else {
|
||||
cmsURL = cmsURL + "&type=Files";
|
||||
}
|
||||
|
||||
tinyMCE.activeEditor.windowManager.open({
|
||||
file : cmsURL,
|
||||
title : 'Filemanager',
|
||||
width : x * 0.8,
|
||||
height : y * 0.8,
|
||||
resizable : "yes",
|
||||
close_previous : "no"
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
tinymce.init(editor_config);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
{!! \File::get(base_path('vendor/iqcontent/laravel-filemanager/public/js/stand-alone-button.js')) !!}
|
||||
</script>
|
||||
<script>
|
||||
$('#lfm').filemanager('image', {prefix: route_prefix});
|
||||
$('#lfm2').filemanager('file', {prefix: route_prefix});
|
||||
</script>
|
||||
|
||||
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.8/summernote.css" rel="stylesheet">
|
||||
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.8/summernote.js"></script>
|
||||
<style>
|
||||
.popover {
|
||||
top: auto;
|
||||
left: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
// Define function to open filemanager window
|
||||
var lfm = function(options, cb) {
|
||||
var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';
|
||||
window.open(route_prefix + '?type=' + options.type || 'file', 'FileManager', 'width=900,height=600');
|
||||
window.SetUrl = cb;
|
||||
};
|
||||
|
||||
// Define LFM summernote button
|
||||
var LFMButton = function(context) {
|
||||
var ui = $.summernote.ui;
|
||||
var button = ui.button({
|
||||
contents: '<i class="note-icon-picture"></i> ',
|
||||
tooltip: 'Insert image with filemanager',
|
||||
click: function() {
|
||||
|
||||
lfm({type: 'image', prefix: '/laravel-filemanager'}, function(lfmItems, path) {
|
||||
lfmItems.forEach(function (lfmItem) {
|
||||
context.invoke('insertImage', lfmItem.url);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
return button.render();
|
||||
};
|
||||
|
||||
// Initialize summernote with LFM button in the popover button group
|
||||
// Please note that you can add this button to any other button group you'd like
|
||||
$('#summernote-editor').summernote({
|
||||
toolbar: [
|
||||
['popovers', ['lfm']],
|
||||
],
|
||||
buttons: {
|
||||
lfm: LFMButton
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
290
packages/iqcontent/laravel-filemanager/src/views/index.blade.php
Normal file
290
packages/iqcontent/laravel-filemanager/src/views/index.blade.php
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<!-- Chrome, Firefox OS and Opera -->
|
||||
<meta name="theme-color" content="#333844">
|
||||
<!-- Windows Phone -->
|
||||
<meta name="msapplication-navbutton-color" content="#333844">
|
||||
<!-- iOS Safari -->
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="#333844">
|
||||
|
||||
<title>{{ trans('laravel-filemanager::lfm.title-page') }}</title>
|
||||
<link rel="shortcut icon" type="image/png" href="{{ asset('vendor/laravel-filemanager/img/72px color.png') }}">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css">
|
||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.css">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/laravel-filemanager/css/cropper.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/laravel-filemanager/css/dropzone.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/laravel-filemanager/css/mime-icons.min.css') }}">
|
||||
<style>{!! \File::get(base_path('vendor/iqcontent/laravel-filemanager/public/css/lfm.css')) !!}</style>
|
||||
{{-- Use the line below instead of the above if you need to cache the css. --}}
|
||||
{{-- <link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/lfm.css') }}"> --}}
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar sticky-top navbar-expand-lg navbar-dark" id="nav">
|
||||
<a class="navbar-brand invisible-lg d-none d-lg-inline" id="to-previous">
|
||||
<i class="fas fa-arrow-left fa-fw"></i>
|
||||
<span class="d-none d-lg-inline">{{ trans('laravel-filemanager::lfm.nav-back') }}</span>
|
||||
</a>
|
||||
<a class="navbar-brand d-block d-lg-none" id="show_tree">
|
||||
<i class="fas fa-bars fa-fw"></i>
|
||||
</a>
|
||||
<a class="navbar-brand d-block d-lg-none" id="current_folder"></a>
|
||||
<a id="loading" class="navbar-brand"><i class="fas fa-spinner fa-spin"></i></a>
|
||||
<div class="ml-auto px-2">
|
||||
<a class="navbar-link d-none" id="multi_selection_toggle">
|
||||
<i class="fa fa-check-double fa-fw"></i>
|
||||
<span class="d-none d-lg-inline">{{ trans('laravel-filemanager::lfm.menu-multiple') }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="navbar-toggler collapsed border-0 px-1 py-2 m-0" data-toggle="collapse" data-target="#nav-buttons">
|
||||
<i class="fas fa-cog fa-fw"></i>
|
||||
</a>
|
||||
<div class="collapse navbar-collapse flex-grow-0" id="nav-buttons">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-display="grid">
|
||||
<i class="fas fa-th-large fa-fw"></i>
|
||||
<span>{{ trans('laravel-filemanager::lfm.nav-thumbnails') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-display="list">
|
||||
<i class="fas fa-list-ul fa-fw"></i>
|
||||
<span>{{ trans('laravel-filemanager::lfm.nav-list') }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-sort fa-fw"></i>{{ trans('laravel-filemanager::lfm.nav-sort') }}
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right border-0"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<nav class="bg-light fixed-bottom border-top d-none" id="actions">
|
||||
<a data-action="open" data-multiple="false"><i class="fas fa-folder-open"></i>{{ trans('laravel-filemanager::lfm.btn-open') }}</a>
|
||||
<a data-action="preview" data-multiple="true"><i class="fas fa-images"></i>{{ trans('laravel-filemanager::lfm.menu-view') }}</a>
|
||||
<a data-action="use" data-multiple="true"><i class="fas fa-check"></i>{{ trans('laravel-filemanager::lfm.btn-confirm') }}</a>
|
||||
</nav>
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
<div id="tree"></div>
|
||||
|
||||
<div id="main">
|
||||
<div id="alerts"></div>
|
||||
|
||||
<nav aria-label="breadcrumb" class="d-none d-lg-block" id="breadcrumbs">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item invisible">Home</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div id="empty" class="d-none">
|
||||
<i class="far fa-folder-open"></i>
|
||||
{{ trans('laravel-filemanager::lfm.message-empty') }}
|
||||
</div>
|
||||
|
||||
<div id="content"></div>
|
||||
|
||||
<a id="item-template" class="d-none">
|
||||
<div class="square"></div>
|
||||
|
||||
<div class="info">
|
||||
<div class="item_name text-truncate"></div>
|
||||
<time class="text-muted font-weight-light text-truncate"></time>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="fab"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="uploadModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myModalLabel">{{ trans('laravel-filemanager::lfm.title-upload') }}</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aia-hidden="true">×</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('iqcontent.lfm.upload') }}" role='form' id='uploadForm' name='uploadForm' method='post' enctype='multipart/form-data' class="dropzone">
|
||||
<div class="form-group" id="attachment">
|
||||
<div class="controls text-center">
|
||||
<div class="input-group w-100">
|
||||
<a class="btn btn-primary w-100 text-white" id="upload-button">{{ trans('laravel-filemanager::lfm.message-choose') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' name='working_dir' id='working_dir'>
|
||||
<input type='hidden' name='type' id='type' value='{{ request("type") }}'>
|
||||
<input type='hidden' name='_token' value='{{csrf_token()}}'>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary w-100" data-dismiss="modal">{{ trans('laravel-filemanager::lfm.btn-close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="notify" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary w-100" data-dismiss="modal">{{ trans('laravel-filemanager::lfm.btn-close') }}</button>
|
||||
<button type="button" class="btn btn-primary w-100" data-dismiss="modal">{{ trans('laravel-filemanager::lfm.btn-confirm') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="text" class="form-control">
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary w-100" data-dismiss="modal">{{ trans('laravel-filemanager::lfm.btn-close') }}</button>
|
||||
<button type="button" class="btn btn-primary w-100" data-dismiss="modal">{{ trans('laravel-filemanager::lfm.btn-confirm') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="carouselTemplate" class="d-none carousel slide bg-light" data-ride="carousel">
|
||||
<ol class="carousel-indicators">
|
||||
<li data-target="#previewCarousel" data-slide-to="0" class="active"></li>
|
||||
</ol>
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
<a class="carousel-label"></a>
|
||||
<div class="carousel-image"></div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="carousel-control-prev" href="#previewCarousel" role="button" data-slide="prev">
|
||||
<div class="carousel-control-background" aria-hidden="true">
|
||||
<i class="fas fa-chevron-left"></i>
|
||||
</div>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a class="carousel-control-next" href="#previewCarousel" role="button" data-slide="next">
|
||||
<div class="carousel-control-background" aria-hidden="true">
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</div>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script src="{{ asset('vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
|
||||
<script src="{{ asset('vendor/laravel-filemanager/js/dropzone.min.js') }}"></script>
|
||||
<script>
|
||||
var lang = {!! json_encode(trans('laravel-filemanager::lfm')) !!};
|
||||
var actions = [
|
||||
// {
|
||||
// name: 'use',
|
||||
// icon: 'check',
|
||||
// label: 'Confirm',
|
||||
// multiple: true
|
||||
// },
|
||||
{
|
||||
name: 'rename',
|
||||
icon: 'edit',
|
||||
label: lang['menu-rename'],
|
||||
multiple: false
|
||||
},
|
||||
{
|
||||
name: 'download',
|
||||
icon: 'download',
|
||||
label: lang['menu-download'],
|
||||
multiple: true
|
||||
},
|
||||
// {
|
||||
// name: 'preview',
|
||||
// icon: 'image',
|
||||
// label: lang['menu-view'],
|
||||
// multiple: true
|
||||
// },
|
||||
{
|
||||
name: 'move',
|
||||
icon: 'paste',
|
||||
label: lang['menu-move'],
|
||||
multiple: true
|
||||
},
|
||||
{
|
||||
name: 'resize',
|
||||
icon: 'arrows-alt',
|
||||
label: lang['menu-resize'],
|
||||
multiple: false
|
||||
},
|
||||
{
|
||||
name: 'crop',
|
||||
icon: 'crop',
|
||||
label: lang['menu-crop'],
|
||||
multiple: false
|
||||
},
|
||||
{
|
||||
name: 'trash',
|
||||
icon: 'trash',
|
||||
label: lang['menu-delete'],
|
||||
multiple: true
|
||||
},
|
||||
];
|
||||
|
||||
var sortings = [
|
||||
{
|
||||
by: 'alphabetic',
|
||||
icon: 'sort-alpha-down',
|
||||
label: lang['nav-sort-alphabetic']
|
||||
},
|
||||
{
|
||||
by: 'time',
|
||||
icon: 'sort-numeric-down',
|
||||
label: lang['nav-sort-time']
|
||||
}
|
||||
];
|
||||
</script>
|
||||
<script>{!! \File::get(base_path('vendor/iqcontent/laravel-filemanager/public/js/script.js')) !!}</script>
|
||||
{{-- Use the line below instead of the above if you need to cache the script. --}}
|
||||
{{-- <script src="{{ asset('vendor/laravel-filemanager/js/script.js') }}"></script> --}}
|
||||
<script>
|
||||
Dropzone.options.uploadForm = {
|
||||
paramName: "upload[]", // The name that will be used to transfer the file
|
||||
uploadMultiple: false,
|
||||
parallelUploads: 5,
|
||||
clickable: '#upload-button',
|
||||
dictDefaultMessage: lang['message-drop'],
|
||||
init: function() {
|
||||
var _this = this; // For the closure
|
||||
this.on('success', function(file, response) {
|
||||
if (response == 'OK') {
|
||||
loadFolders();
|
||||
} else {
|
||||
this.defaultOptions.error(file, response.join('\n'));
|
||||
}
|
||||
});
|
||||
},
|
||||
headers: {
|
||||
'Authorization': 'Bearer ' + getUrlParam('token')
|
||||
},
|
||||
acceptedFiles: "{{ implode(',', $helper->availableMimeTypes()) }}",
|
||||
maxFilesize: ({{ $helper->maxUploadSize() }} / 1000)
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<ul class="nav nav-pills flex-column">
|
||||
@foreach($root_folders as $root_folder)
|
||||
<li class="nav-item root-item">
|
||||
<a class="nav-link" href="#" data-type="0" onclick="moveToNewFolder(`{{$root_folder->url}}`)">
|
||||
<i class="fa fa-folder fa-fw"></i> {{ $root_folder->name }}
|
||||
<input type="hidden" id="goToFolder" name="goToFolder" value="{{ $root_folder->url }}">
|
||||
<div id="items">
|
||||
@foreach($items as $i)
|
||||
<input type="hidden" id="{{ $i }}" name="items[]" value="{{ $i }}">
|
||||
@endforeach
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@foreach($root_folder->children as $directory)
|
||||
<li class="nav-item sub-item">
|
||||
<a class="nav-link" href="#" data-type="0" onclick="moveToNewFolder(`{{$directory->url}}`)">
|
||||
<i class="fa fa-folder fa-fw"></i> {{ $directory->name }}
|
||||
<input type="hidden" id="goToFolder" name="goToFolder" value="{{ $directory->url }}">
|
||||
<div id="items">
|
||||
@foreach($items as $i)
|
||||
<input type="hidden" id="{{ $i }}" name="items[]" value="{{ $i }}">
|
||||
@endforeach
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
function moveToNewFolder($folder) {
|
||||
$("#notify").modal('hide');
|
||||
var items =[];
|
||||
$("#items").find("input").each(function() {items.push(this.id)});
|
||||
performLfmRequest('domove', {
|
||||
items: items,
|
||||
goToFolder: $folder
|
||||
}).done(refreshFoldersAndItems);
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<style>
|
||||
#work_space {
|
||||
padding: 30px;
|
||||
height: 100vw;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
#work_space {
|
||||
width: unset;
|
||||
height: unset;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8 bg-light" id="work_space">
|
||||
<div id="containment" class="d-none d-md-inline">
|
||||
<img id="resize" src="{{ $img->url . '?timestamp=' . $img->time }}" height="{{ $height }}" width="{{ $width }}">
|
||||
</div>
|
||||
<div id="resize_mobile" style="background-image: url({{ $img->url . '?timestamp=' . $img->time }})" class="d-block d-md-none"></div>
|
||||
</div>
|
||||
<div class="col-md-4 pt-3">
|
||||
<table class="table table-compact table-striped">
|
||||
<thead></thead>
|
||||
<tbody>
|
||||
@if ($scaled)
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('laravel-filemanager::lfm.resize-ratio') }}</td>
|
||||
<td class="text-right">{{ number_format($ratio, 2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('laravel-filemanager::lfm.resize-scaled') }}</td>
|
||||
<td class="text-right">
|
||||
{{ trans('laravel-filemanager::lfm.resize-true') }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('laravel-filemanager::lfm.resize-old-height') }}</td>
|
||||
<td class="text-right">{{ $original_height }}px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap">{{ trans('laravel-filemanager::lfm.resize-old-width') }}</td>
|
||||
<td class="text-right">{{ $original_width }}px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap" style="vertical-align: middle">{{ trans('laravel-filemanager::lfm.resize-new-height') }}</td>
|
||||
<td class="text-right"><input type="text" id="height_display" class="form-control w-50 d-inline mr-2" value="{{ $height }}">px</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-nowrap" style="vertical-align: middle">{{ trans('laravel-filemanager::lfm.resize-new-width') }}</td>
|
||||
<td class="text-right"><input type="text" id="width_display" class="form-control w-50 d-inline mr-2" value="{{ $width }}">px</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="d-flex mb-3">
|
||||
<button class="btn btn-secondary w-50 mr-1" onclick="loadItems()">{{ trans('laravel-filemanager::lfm.btn-cancel') }}</button>
|
||||
<button class="btn btn-primary w-50" onclick="doResize()">{{ trans('laravel-filemanager::lfm.btn-resize') }}</button>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="img" name="img" value="{{ $img->name }}">
|
||||
<input type="hidden" name="ratio" value="{{ $ratio }}">
|
||||
<input type="hidden" name="scaled" value="{{ $scaled }}">
|
||||
<input type="hidden" id="original_height" name="original_height" value="{{ $original_height }}">
|
||||
<input type="hidden" id="original_width" name="original_width" value="{{ $original_width }}">
|
||||
<input type="hidden" id="height" name="height" value="{{ $height }}">
|
||||
<input type="hidden" id="width" name="width" value="{{ $width }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
renderResizedValues($("#width_display").val(), $("#height_display").val());
|
||||
|
||||
$("#resize").resizable({
|
||||
aspectRatio: {{ config('lfm.resize_aspectRatio')?'true':'false' }},
|
||||
@if(config('lfm.resize_containment'))
|
||||
containment: "#containment",
|
||||
@endif
|
||||
handles: "n, e, s, w, se, sw, ne, nw",
|
||||
resize: function (event, ui) {
|
||||
renderResizedValues(ui.size.width, ui.size.height);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#width_display, #height_display').change(function () {
|
||||
var newWidth = $("#width_display").val();
|
||||
var newHeight = $("#height_display").val();
|
||||
|
||||
renderResizedValues(newWidth, newHeight);
|
||||
$("#containment > .ui-wrapper").width(newWidth).height(newHeight);
|
||||
$("#resize").width(newWidth).height(newHeight);
|
||||
});
|
||||
|
||||
function renderResizedValues(newWidth, newHeight) {
|
||||
$("#width").val(newWidth);
|
||||
$("#height").val(newHeight);
|
||||
$("#width_display").val(newWidth);
|
||||
$("#height_display").val(newHeight);
|
||||
|
||||
$('#resize_mobile').css('background-size', '100% 100%');
|
||||
|
||||
if (newWidth < newHeight) {
|
||||
$('#resize_mobile').css('width', (newWidth / newHeight * 100) + '%').css('padding-bottom', '100%');
|
||||
} else if (newWidth > newHeight) {
|
||||
$('#resize_mobile').css('width', '100%').css('padding-bottom', (newHeight / newWidth * 100) + '%');
|
||||
} else { // newWidth === newHeight
|
||||
$('#resize_mobile').css('width', '100%').css('padding-bottom', '100%');
|
||||
}
|
||||
}
|
||||
|
||||
function doResize() {
|
||||
performLfmRequest('doresize', {
|
||||
img: $("#img").val(),
|
||||
dataHeight: $("#height").val(),
|
||||
dataWidth: $("#width").val()
|
||||
}).done(loadItems);
|
||||
}
|
||||
</script>
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
<div class="m-3 d-block d-lg-none">
|
||||
<h1 style="font-size: 1.5rem;">Laravel File Manager</h1>
|
||||
<small class="d-block">Ver 2.0</small>
|
||||
<div class="row mt-3">
|
||||
<div class="col-4">
|
||||
<img src="{{ asset('vendor/laravel-filemanager/img/152px color.png') }}" class="w-100">
|
||||
</div>
|
||||
|
||||
<div class="col-8">
|
||||
<p>Current usage :</p>
|
||||
<p>20 GB (Max : 1 TB)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress mt-3" style="height: .5rem;">
|
||||
<div class="progress-bar progress-bar-striped progress-bar-animated w-75 bg-main" role="progressbar" aria-valuenow="75" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-pills flex-column">
|
||||
@foreach($root_folders as $root_folder)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#" data-type="0" data-path="{{ $root_folder->url }}">
|
||||
<i class="fa fa-folder fa-fw"></i> {{ $root_folder->name }}
|
||||
</a>
|
||||
</li>
|
||||
@foreach($root_folder->children as $directory)
|
||||
<li class="nav-item sub-item">
|
||||
<a class="nav-link" href="#" data-type="0" data-path="{{ $directory->url }}">
|
||||
<i class="fa fa-folder fa-fw"></i> {{ $directory->name }}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
@endforeach
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<script type='text/javascript'>
|
||||
function getUrlParam(paramName) {
|
||||
var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i');
|
||||
var match = window.location.search.match(reParam);
|
||||
return ( match && match.length > 1 ) ? match[1] : null;
|
||||
}
|
||||
|
||||
var funcNum = getUrlParam('CKEditorFuncNum');
|
||||
|
||||
var par = window.parent;
|
||||
var op = window.opener;
|
||||
var o = (par && par.CKEDITOR) ? par : ((op && op.CKEDITOR) ? op : false);
|
||||
|
||||
if (op) window.close();
|
||||
if (o !== false) o.CKEDITOR.tools.callFunction(funcNum, "{{ $file }}");
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue