53 |
54 |
55 | -------------------------------------------------------------------------------
56 |
57 | [Chapter 1. Basic Configuration](1-basic-configuration.md) →
58 |
--------------------------------------------------------------------------------
/Resources/public/libs/blueimp-tmpl/css/demo.css:
--------------------------------------------------------------------------------
1 | /*
2 | * JavaScript Templates Demo CSS
3 | * https://github.com/blueimp/JavaScript-Templates
4 | *
5 | * Copyright 2013, Sebastian Tschan
6 | * https://blueimp.net
7 | *
8 | * Licensed under the MIT license:
9 | * https://opensource.org/licenses/MIT
10 | */
11 |
12 | body {
13 | max-width: 750px;
14 | margin: 0 auto;
15 | padding: 1em;
16 | font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
17 | font-size: 1em;
18 | line-height: 1.4em;
19 | background: #222;
20 | color: #fff;
21 | -webkit-text-size-adjust: 100%;
22 | -ms-text-size-adjust: 100%;
23 | }
24 | a {
25 | color: orange;
26 | text-decoration: none;
27 | }
28 | img {
29 | border: 0;
30 | vertical-align: middle;
31 | }
32 | h1 {
33 | line-height: 1em;
34 | }
35 | textarea,
36 | input {
37 | display: inline-block;
38 | width: 100%;
39 | -webkit-box-sizing: border-box;
40 | -moz-box-sizing: border-box;
41 | box-sizing: border-box;
42 | padding: 10px;
43 | margin: 0 0 10px;
44 | font-family: "Lucida Console", Monaco, monospace;
45 | }
46 | .result {
47 | padding: 20px 40px;
48 | background: #fff;
49 | color: #222;
50 | }
51 | .error {
52 | color: red;
53 | }
54 |
55 | @media (min-width: 481px) {
56 | .navigation {
57 | list-style: none;
58 | padding: 0;
59 | }
60 | .navigation li {
61 | display: inline-block;
62 | }
63 | .navigation li:not(:first-child):before {
64 | content: '| ';
65 | }
66 | }
67 |
68 | /* IE7 fixes */
69 | *+html textarea,
70 | *+html input {
71 | width: 460px;
72 | }
73 | *+html .result {
74 | width: 400px;
75 | }
76 |
--------------------------------------------------------------------------------
/Resources/translations/messages.tr.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: başarıyla yüklendi
4 | renamed:
5 | success: Dosya başarıyla yeniden adlandırıldı.
6 | danger: Dosya adı mevcut veya bu işlem için yetkiniz yok
7 | unauthorized: Dosya mevcut değil veya bu işlem için yetkiniz yok
8 | nochanged: Herhangi birşey değiştirilmedi
9 | deleted:
10 | success: Dosyalar başarıyla silindi
11 | danger: Dosyalar mevcut değil veya bu işlem için yetkiniz yok
12 | unauthorized: Dosyalar mevcut değil veya bu işlem için yetkiniz yok
13 | folder:
14 | add:
15 | danger: "Klasör oluşturulurken Hata Oluştu: %message%"
16 | success: Klasör başarıyla oluşturuldu
17 | deleted:
18 | success: Klasör başarıyla silindi
19 | unauthorized: Klasör mevcut değil veya bu işlem için yetkiniz yok
20 | button:
21 | cancel: İPTAL
22 | refresh: Yenile
23 | parent: Parent
24 | save: KAYDET
25 | add:
26 | files: Dosya Yükle...
27 | folder: Yeni Klasör...
28 | delete:
29 | current: Mevcut Klasörü Sil
30 | selected: Seçili Dosyaları Sil
31 | action: SİL
32 | rename:
33 | action: YENİDEN ADLANDIR
34 | tree: Dizinler
35 | title:
36 | add:
37 | folder: Yeni Klasör
38 | rename:
39 | file: Yeniden adlandır
40 | delete: Sil
41 | download: İndir
42 | preview:
43 | file: Aç
44 | input:
45 | default: İsimsiz Klasör
46 | table:
47 | name: Ad
48 | date: Tarih
49 | size: Boyut
50 | dimension: Ebatlar
51 | actions: İşlemler
52 | confirm:
53 | delete: Silmek için onay veriyor musunuz?
54 | size:
55 | mb: MB
56 | kb: KB
57 | select-all: Hepsini Seç
58 | upload:
59 | exception_move_uploaded_file: Yetkiniz yok
60 | search:
61 | placeholder: Arama
--------------------------------------------------------------------------------
/Resources/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: was uploaded successfully
4 | renamed:
5 | success: File has been renamed successfully
6 | danger: File already exists or you are not authorized to rename this file
7 | unauthorized: The files no longer exist or you are not authorized to access this page
8 | nochanged: No changed detected
9 | deleted:
10 | success: The files have been deleted successfully
11 | danger: The files no longer exist or you are not authorized to access this page
12 | unauthorized: The files no longer exist or you are not authorized to access this page
13 | folder:
14 | add:
15 | danger: "An error occurred while creating the directory: %message%"
16 | success: Folder has been created successfully
17 | deleted:
18 | success: Folder has been deleted successfully
19 | unauthorized: Folder no longer exist or you are not authorized to access this page
20 | button:
21 | cancel: CANCEL
22 | refresh: Refresh
23 | parent: Parent
24 | save: SAVE
25 | add:
26 | files: Add files...
27 | folder: New folder...
28 | delete:
29 | current: Delete current folder
30 | selected: Delete selected files
31 | action: DELETE
32 | rename:
33 | action: RENAME
34 | tree: Tree
35 | title:
36 | add:
37 | folder: New folder
38 | rename:
39 | file: Rename
40 | delete: Delete
41 | download: Download
42 | preview:
43 | file: Open
44 | input:
45 | default: Untitled folder
46 | table:
47 | name: Name
48 | date: Date
49 | size: Size
50 | dimension: Dimension
51 | actions: Actions
52 | confirm:
53 | delete: Are you sure that you want to delete?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Select all
58 | upload:
59 | exception_move_uploaded_file: Permission denied
60 | search:
61 | placeholder: Search
--------------------------------------------------------------------------------
/Event/FileManagerEvents.php:
--------------------------------------------------------------------------------
1 |
7 | */
8 | final class FileManagerEvents {
9 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
10 | public const PRE_UPDATE = 'file_manager.pre_update';
11 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
12 | public const POST_UPDATE = 'file_manager.post_update';
13 |
14 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
15 | public const RENAME_FILE = 'file_manager.post_rename_file';
16 |
17 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
18 | public const PRE_DELETE_FILE = 'file_manager.pre_delete_file';
19 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
20 | public const POST_DELETE_FILE = 'file_manager.post_delete_file';
21 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
22 | public const PRE_DELETE_FOLDER = ' file_manager.pre_delete_folder';
23 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
24 | public const POST_DELETE_FOLDER = 'file_manager.post_delete_folder';
25 |
26 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
27 | public const POST_DIRECTORY_FILTER_CONFIGURATION = 'file_manager.post_directory_filter_configuration';
28 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
29 | public const POST_FILE_FILTER_CONFIGURATION = 'file_manager.post_file_filter_configuration';
30 |
31 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
32 | public const POST_CHECK_SECURITY = 'file_manager.post_check_security';
33 | /** @Event("Symfony\Component\EventDispatcher\GenericEvent") */
34 | public const FILE_ACCESS = 'file_manager.file_access';
35 | }
36 |
--------------------------------------------------------------------------------
/Resources/translations/messages.ru.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: успешно загружен
4 | renamed:
5 | success: Файл успешно переименован
6 | danger: Файл уже существует или у вас недостаточно прав чтобы его переименовать
7 | unauthorized: Файлы больше не существуют или у вас недостаточно прав для доступа к этой странице
8 | nochanged: Изменений не найдено
9 | deleted:
10 | success: Файлы успешно удалены
11 | danger: Файлы больше не существуют или у вас недостаточно прав для доступа к этой странице
12 | unauthorized: Файлы больше не существуют или у вас недостаточно прав для доступа к этой странице
13 | folder:
14 | add:
15 | danger: "Ошибка при создании директории: %message%"
16 | success: Папка успешно создана
17 | deleted:
18 | success: Папка успешно удалена
19 | unauthorized: Папка больше не существует или у вас недостаточно прав для доступа к этой странице
20 | button:
21 | cancel: ОТМЕНА
22 | refresh: Обновить
23 | parent: К родительской директории
24 | save: СОХРАНИТЬ
25 | add:
26 | files: Добавить файлы...
27 | folder: Новая папка...
28 | delete:
29 | current: Удалить текущую папку
30 | selected: Удалить выбранные файлы
31 | action: УДАЛИТЬ
32 | rename:
33 | action: ПЕРЕИМЕНОВАТЬ
34 | tree: Дерево
35 | title:
36 | add:
37 | folder: Новая папка
38 | rename:
39 | file: Переименовать
40 | delete: Удалить
41 | download: Скачать
42 | preview:
43 | file: открыть
44 | input:
45 | default: Новая папка
46 | table:
47 | name: Название
48 | date: Дата
49 | size: Размер
50 | dimension: Параметры
51 | actions: Действия
52 | confirm:
53 | delete: Вы уверены что хотите удалить?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Выбрать все
58 | upload:
59 | exception_move_uploaded_file: Доступ запрещен
60 | search:
61 | placeholder: Поиск
--------------------------------------------------------------------------------
/Resources/translations/messages.pl.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: został pomyślnie wgrany
4 | renamed:
5 | success: Nazwa pliku została pomyślnie zmieniona
6 | danger: Plik już istnieje lub nie jesteś uprawniony do zmiany nazwy tego pliku
7 | unauthorized: Pliki już nie istnieją lub nie jesteś uprawniony do dostępu do tej strony
8 | nochanged: Nie wykryto zmian
9 | deleted:
10 | success: Pliki zostały pomyślnie usunięte
11 | danger: Pliki już nie istnieją lub nie masz uprawnień dostępu do tej strony.
12 | unauthorized: Pliki już nie istnieją lub nie masz uprawnień dostępu do tej strony.
13 | folder:
14 | add:
15 | danger: "Wystąpił błąd podczas tworzenia folderu: %message%"
16 | success: Folder został utworzony
17 | deleted:
18 | success: Folder został pomyślnie usunięty
19 | unauthorized: Folder już nie istnieje lub nie masz uprawnień dostępu do tej strony.
20 | button:
21 | cancel: Anuluj
22 | refresh: Odśwież
23 | parent: Rodzic
24 | save: ZAPISZ
25 | add:
26 | files: Dodaj pliki...
27 | folder: Nowy folder...
28 | delete:
29 | current: Usuń bieżący folder
30 | selected: Usuń zaznaczone pliki
31 | action: USUŃ
32 | rename:
33 | action: ZMIEŃ NAZWĘ
34 | tree: Drzewo
35 | title:
36 | add:
37 | folder: Nowy folder
38 | rename:
39 | file: Zmień nazwę
40 | delete: Usuń
41 | download: Pobierz
42 | preview:
43 | file: Otwórz
44 | input:
45 | default: Folder bez nazwy
46 | table:
47 | name: Nazwa
48 | date: Data
49 | size: Rozmiar
50 | dimension: Wymiary
51 | actions: Akcje
52 | confirm:
53 | delete: Czy na pewno chcesz usunąć?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Zaznacz wszystkie
58 | upload:
59 | exception_move_uploaded_file: Brak uprawnień
60 | search:
61 | placeholder: Szukaj
--------------------------------------------------------------------------------
/Resources/translations/messages.pt_BR.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: enviado com sucesso
4 | renamed:
5 | success: O arquivo foi renomeado com sucesso
6 | danger: Arquivo já existe ou você não está autorizado a renomear este arquivo
7 | unauthorized: Os arquivos não existem mais ou você não tem autorização para acessar esta página
8 | nochanged: Nenhuma alteração detectada
9 | deleted:
10 | success: Os arquivos foram apagados com sucesso
11 | danger: Os arquivos não existem mais ou você não tem autorização para acessar esta página
12 | unauthorized: Os arquivos não existem mais ou você não tem autorização para acessar esta página
13 | folder:
14 | add:
15 | danger: "Ocorreu um erro ao criar o diretório: %message%"
16 | success: Pasta criada com sucesso
17 | deleted:
18 | success: A pasta excluída com sucesso
19 | unauthorized: A pasta não existe mais ou você não tem autorização para acessar esta página
20 | button:
21 | cancel: CANCELAR
22 | refresh: Atualizar
23 | parent: Subir
24 | save: SALVAR
25 | add:
26 | files: Adicionar arquivos...
27 | folder: Nova pasta...
28 | delete:
29 | current: Excluir pasta atual
30 | selected: Excluir arquivos selecionados
31 | action: EXCLUIR
32 | rename:
33 | action: RENOMEAR
34 | tree: Pastas
35 | title:
36 | add:
37 | folder: Nova pasta
38 | rename:
39 | file: Renomear
40 | delete: Excluir
41 | download: Download
42 | preview:
43 | file: Abrir
44 | input:
45 | default: Nova pasta
46 | table:
47 | name: Nome
48 | date: Data
49 | size: Tamanho
50 | dimension: Dimensão
51 | actions: Ações
52 | confirm:
53 | delete: Tem certeza de que deseja excluir?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Selecionar tudo
58 | upload:
59 | exception_move_uploaded_file: Permissão negada
60 | search:
61 | placeholder: Pesquisa
--------------------------------------------------------------------------------
/Resources/public/libs/blueimp-tmpl/js/demo/demo.js:
--------------------------------------------------------------------------------
1 | /*
2 | * JavaScript Templates Demo
3 | * https://github.com/blueimp/JavaScript-Templates
4 | *
5 | * Copyright 2013, Sebastian Tschan
6 | * https://blueimp.net
7 | *
8 | * Licensed under the MIT license:
9 | * https://opensource.org/licenses/MIT
10 | */
11 |
12 | /* global tmpl */
13 |
14 | ;(function () {
15 | 'use strict'
16 |
17 | var templateInput = document.getElementById('template')
18 | var dataInput = document.getElementById('data')
19 | var resultNode = document.getElementById('result')
20 | var templateDemoNode = document.getElementById('tmpl-demo')
21 | var templateDataNode = document.getElementById('tmpl-data')
22 |
23 | function renderError (title, error) {
24 | resultNode.innerHTML = tmpl(
25 | 'tmpl-error',
26 | {title: title, error: error}
27 | )
28 | }
29 |
30 | function render (event) {
31 | event.preventDefault()
32 | var data
33 | try {
34 | data = JSON.parse(dataInput.value)
35 | } catch (e) {
36 | renderError('JSON parsing failed', e)
37 | return
38 | }
39 | try {
40 | resultNode.innerHTML = tmpl(
41 | templateInput.value,
42 | data
43 | )
44 | } catch (e) {
45 | renderError('Template rendering failed', e)
46 | }
47 | }
48 |
49 | function empty (node) {
50 | while (node.lastChild) {
51 | node.removeChild(node.lastChild)
52 | }
53 | }
54 |
55 | function init (event) {
56 | if (event) {
57 | event.preventDefault()
58 | }
59 | templateInput.value = templateDemoNode.innerHTML.trim()
60 | dataInput.value = templateDataNode.innerHTML.trim()
61 | empty(resultNode)
62 | }
63 |
64 | document.getElementById('render').addEventListener('click', render)
65 | document.getElementById('reset').addEventListener('click', init)
66 |
67 | init()
68 | }())
69 |
--------------------------------------------------------------------------------
/Resources/translations/messages.ro.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: a fost adaugata cu succes
4 | renamed:
5 | success: Fisierul a fost redenumit cu succes
6 | danger: Fisierul deja exista sau nu esti autorizat sa redenumesti acest fisier
7 | unauthorized: Fisierul nu mai exista sau nu esti autorizat sa accesezi aceasta pagina
8 | nochanged: Nu a fost detectata nici o schimbare
9 | deleted:
10 | success: Fisierul a fost sters cu succes
11 | danger: Fisierul nu mai exista sau nu esti autorizat sa accesezi aceasta pagina
12 | unauthorized: Fisierul nu mai exista sau nu esti autorizat sa accesezi aceasta pagina
13 | folder:
14 | add:
15 | danger: "A aparut o eroare in timpul crearii directorului: %message%"
16 | success: Folderul a fost creat cu succes
17 | deleted:
18 | success: Directorul a fost sters cu succes
19 | unauthorized: Directorul nu mai exista sau nu esti autorizat sa accesezi aceasta pagina
20 | button:
21 | cancel: ANULEAZA
22 | refresh: Reimprospateaza
23 | parent: Parinte
24 | save: SALVEAZA
25 | add:
26 | files: Adauga fisiere...
27 | folder: Director nou...
28 | delete:
29 | current: Sterge directorul curent
30 | selected: Sterge fisierele selectate
31 | action: STERGE
32 | rename:
33 | action: REDENUMESTE
34 | tree: Tree
35 | title:
36 | add:
37 | folder: Director nou
38 | rename:
39 | file: Redenumeste
40 | delete: Sterge
41 | download: Download
42 | preview:
43 | file: Deschide
44 | input:
45 | default: Director nedenumit
46 | table:
47 | name: Nume
48 | date: Data
49 | size: Marime
50 | dimension: Dimensiuni
51 | actions: Actiuni
52 | confirm:
53 | delete: Esti sigur ca vrei sa stergi?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Selecteaza tot
58 | upload:
59 | exception_move_uploaded_file: Permisiune anulata
60 | search:
61 | placeholder: Căutare
--------------------------------------------------------------------------------
/Resources/translations/messages.it.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: è stato caricato correttamente
4 | renamed:
5 | success: Il file è stato rinominato correttamente
6 | danger: Il file esiste già o non sei autorizzato a rinominarlo
7 | unauthorized: I file non esistono più o non sei autorizzato ad accedere a questa pagina
8 | nochanged: Nessuna modifica rilevata
9 | deleted:
10 | success: I file sono stati eliminati correttamente
11 | danger: I file non esistono più o non sei autorizzato ad accedere a questa pagina
12 | unauthorized: I file non esistono più o non sei autorizzato ad accedere a questa pagina
13 | folder:
14 | add:
15 | danger: "Si è verificato un errore durante la creazione della cartella: %message%"
16 | success: La cartella è stata creata correttamente
17 | deleted:
18 | success: La cartella è stata eliminata correttamente
19 | unauthorized: La cartella non esiste più o non sei autorizzato ad accedere a questa pagina
20 | button:
21 | cancel: ANNULLA
22 | refresh: Aggiorna
23 | parent: Genitore
24 | save: SALVA
25 | add:
26 | files: Aggiungi file...
27 | folder: Nuova cartella...
28 | delete:
29 | current: Elimina cartella corrente
30 | selected: Elimina file selezionati
31 | action: ELIMINA
32 | rename:
33 | action: RINOMINA
34 | tree: Albero
35 | title:
36 | add:
37 | folder: Nuova cartella
38 | rename:
39 | file: Rinomina
40 | delete: Elimina
41 | download: Scarica
42 | preview:
43 | file: Apri
44 | input:
45 | default: Cartella senza titolo
46 | table:
47 | name: Nome
48 | date: Data
49 | size: Peso
50 | dimension: Dimensione
51 | actions: Azioni
52 | confirm:
53 | delete: Sei sicuro di voler eliminare?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Seleziona tutto
58 | upload:
59 | exception_move_uploaded_file: Permesso negato
60 | search:
61 | placeholder: Cerca
62 |
--------------------------------------------------------------------------------
/Resources/translations/messages.es.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: Se cargó correctamente
4 | renamed:
5 | success: El archivo ha cambiado de nombre correctamente
6 | danger: El archivo ya existe o no está autorizado para cambiar el nombre de este archivo
7 | unauthorized: Los archivos ya no existen o no está autorizado para acceder a esta página
8 | nochanged: No se detectó ningún cambio
9 | deleted:
10 | success: Los archivos se han eliminado correctamente
11 | danger: Los archivos ya no existen o no está autorizado para acceder a esta página
12 | unauthorized: Los archivos ya no existen o no está autorizado para acceder a esta página
13 | folder:
14 | add:
15 | danger: "Se produjo un error al crear el directorio: %message%"
16 | success: La carpeta se ha creado correctamente
17 | deleted:
18 | success: La carpeta se ha eliminado correctamente
19 | unauthorized: La carpeta ya no existe o no está autorizado para acceder a esta página
20 | button:
21 | cancel: CANCELAR
22 | refresh: Actualizar
23 | parent: Padre
24 | save: GUARDAR
25 | add:
26 | files: Agregar archivos...
27 | folder: Nueva carpeta...
28 | delete:
29 | current: Eliminar la carpeta actual
30 | selected: Eliminar archivos seleccionados
31 | action: BORRAR
32 | rename:
33 | action: RENOMBRAR
34 | tree: Árbol
35 | title:
36 | add:
37 | folder: Nueva carpeta
38 | rename:
39 | file: Renombrar
40 | delete: Eliminar
41 | download: Descargar
42 | preview:
43 | file: Abrir
44 | input:
45 | default: Carpeta sin título
46 | table:
47 | name: Nombre
48 | date: Fecha
49 | size: Tamaño
50 | dimension: Dimensión
51 | actions: Acciones
52 | confirm:
53 | delete: ¿Está seguro de que desea eliminar?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Seleccionar todo
58 | upload:
59 | exception_move_uploaded_file: Permiso denegado
60 | search:
61 | placeholder: Buscar
--------------------------------------------------------------------------------
/Resources/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: is succesvol geuploaded
4 | renamed:
5 | success: Bestand is succesvol hernoemd naar een ander bestand
6 | danger: Bestand bestaat al of u bent niet bevoegd om dit bestand een andere naam te geven.
7 | unauthorized: De bestanden bestaan niet meer of u bent niet bevoegd om deze pagina te openen.
8 | nochanged: Geen wijziging gedetecteerd
9 | deleted:
10 | success: De bestanden zijn met succes verwijderd
11 | danger: De bestanden bestaan niet meer of u bent niet bevoegd om deze pagina te openen.
12 | unauthorized: De bestanden bestaan niet meer of u bent niet bevoegd om deze pagina te openen.
13 | folder:
14 | add:
15 | danger: "Er is een fout opgetreden tijdens het aanmaken van de directory: %message%"
16 | success: Map is met succes aangemaakt
17 | deleted:
18 | success: Map is met succes verwijderd.
19 | unauthorized: Map bestaat niet meer of u bent niet bevoegd om deze pagina te openen.
20 | button:
21 | cancel: ANULEREN
22 | refresh: Verversen
23 | parent: Parent
24 | save: OPSLAAN
25 | add:
26 | files: Voeg bestanden toe...
27 | folder: Nieuwe map...
28 | delete:
29 | current: Verwijder huidige map
30 | selected: Geselecteerde bestanden verwijderen
31 | action: VERWIJDER
32 | rename:
33 | action: HERNOEMEN
34 | tree: Boom
35 | title:
36 | add:
37 | folder: Nieuwe map
38 | rename:
39 | file: Hernoemen
40 | delete: Verwijderen
41 | download: Downloaden
42 | preview:
43 | file: Openen
44 | input:
45 | default: Naamloze map
46 | table:
47 | name: Naam
48 | date: Datum
49 | size: Grootte
50 | dimension: Dimensie
51 | actions: Acties
52 | confirm:
53 | delete: Weet u zeker dat u wilt verwijderen?
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: Selecter alle
58 | upload:
59 | exception_move_uploaded_file: Toestemming geweigerd
60 | search:
61 | placeholder: Zoeken
62 |
--------------------------------------------------------------------------------
/Twig/OrderExtension.php:
--------------------------------------------------------------------------------
1 | 'up', self::DESC => 'down'];
16 |
17 | /**
18 | * OrderExtension constructor.
19 | */
20 | public function __construct(private RouterInterface $router)
21 | {
22 | }
23 |
24 | public function order(Environment $environment, FileManager $fileManager, $type): string {
25 | $order = self::ASC === $fileManager->getQueryParameter('order');
26 | $active = $fileManager->getQueryParameter('orderby') === $type ? 'actived' : null;
27 | $orderBy = [];
28 | $orderBy['orderby'] = $type;
29 | $orderBy['order'] = $active ? ($order ? self::DESC : self::ASC) : self::ASC;
30 | $parameters = array_merge($fileManager->getQueryParameters(), $orderBy);
31 |
32 | $icon = $active ? '-'.($order ? self::ICON[self::ASC] : self::ICON[self::DESC]) : '';
33 |
34 | $href = $this->router->generate('file_manager', $parameters);
35 |
36 | return $environment->render('@ArtgrisFileManager/extension/_order.html.twig', [
37 | 'active' => $active,
38 | 'href' => $href,
39 | 'icon' => $icon,
40 | 'type' => $type,
41 | 'islist' => 'list' === $fileManager->getView(),
42 | ]);
43 | }
44 |
45 | /**
46 | * @return array
47 | */
48 | public function getFunctions(): array {
49 | return [
50 | 'order' => new TwigFunction('order', [$this, 'order'],
51 | ['needs_environment' => true, 'is_safe' => ['html']]),
52 | ];
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Resources/public/libs/blueimp-canvas-to-blob/js/canvas-to-blob.min.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":["canvas-to-blob.js"],"names":["window","CanvasPrototype","HTMLCanvasElement","prototype","hasBlobConstructor","Blob","Boolean","e","hasArrayBufferViewSupport","Uint8Array","size","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","dataURIPattern","dataURLtoBlob","atob","ArrayBuffer","dataURI","matches","mediaType","isBase64","dataString","byteString","arrayBuffer","intArray","i","bb","match","Error","slice","length","decodeURIComponent","charCodeAt","type","append","getBlob","toBlob","mozGetAsFile","callback","quality","toDataURL","this","define","amd","module","exports"],"mappings":"CAgBE,SAAUA,GACV,YAEA,IAAIC,GAAkBD,EAAOE,mBACLF,EAAOE,kBAAkBC,UAC7CC,EAAqBJ,EAAOK,MAAS,WACvC,IACE,MAAOC,SAAQ,GAAID,OACnB,MAAOE,GACP,OAAO,MAGPC,EAA4BJ,GAAsBJ,EAAOS,YAC1D,WACC,IACE,MAAgD,OAAzC,GAAIJ,OAAM,GAAII,YAAW,OAAOC,KACvC,MAAOH,GACP,OAAO,MAGTI,EAAcX,EAAOW,aAAeX,EAAOY,mBAC3BZ,EAAOa,gBAAkBb,EAAOc,cAChDC,EAAiB,0CACjBC,GAAiBZ,GAAsBO,IAAgBX,EAAOiB,MAChEjB,EAAOkB,aAAelB,EAAOS,YAC7B,SAAUU,GACR,GAAIC,GACFC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CAGF,IADAR,EAAUD,EAAQU,MAAMd,IACnBK,EACH,KAAM,IAAIU,OAAM,mBAkBlB,KAfAT,EAAYD,EAAQ,GAChBA,EAAQ,GACR,cAAgBA,EAAQ,IAAM,qBAClCE,IAAaF,EAAQ,GACrBG,EAAaJ,EAAQY,MAAMX,EAAQ,GAAGY,QAGpCR,EAFEF,EAEWL,KAAKM,GAGLU,mBAAmBV,GAGlCE,EAAc,GAAIP,aAAYM,EAAWQ,QACzCN,EAAW,GAAIjB,YAAWgB,GACrBE,EAAI,EAAGA,EAAIH,EAAWQ,OAAQL,GAAK,EACtCD,EAASC,GAAKH,EAAWU,WAAWP,EAGtC,OAAIvB,GACK,GAAIC,OACRG,EAA4BkB,EAAWD,IACvCU,KAAMd,KAGXO,EAAK,GAAIjB,GACTiB,EAAGQ,OAAOX,GACHG,EAAGS,QAAQhB,IAElBrB,GAAOE,oBAAsBD,EAAgBqC,SAC3CrC,EAAgBsC,aAClBtC,EAAgBqC,OAAS,SAAUE,EAAUL,EAAMM,GAE/CD,EADEC,GAAWxC,EAAgByC,WAAa1B,EACjCA,EAAc2B,KAAKD,UAAUP,EAAMM,IAEnCE,KAAKJ,aAAa,OAAQJ,KAG9BlC,EAAgByC,WAAa1B,IACtCf,EAAgBqC,OAAS,SAAUE,EAAUL,EAAMM,GACjDD,EAASxB,EAAc2B,KAAKD,UAAUP,EAAMM,QAI5B,kBAAXG,SAAyBA,OAAOC,IACzCD,OAAO,WACL,MAAO5B,KAEkB,gBAAX8B,SAAuBA,OAAOC,QAC9CD,OAAOC,QAAU/B,EAEjBhB,EAAOgB,cAAgBA,GAEzBhB","file":"canvas-to-blob.min.js"}
--------------------------------------------------------------------------------
/Resources/translations/messages.ca.yml:
--------------------------------------------------------------------------------
1 | file:
2 | add:
3 | success: "S'ha carregat correctament"
4 | renamed:
5 | success: "L'arxiu ha canviat de nom correctament"
6 | danger: "L'arxiu ja existeix o no està autoritzat per canviar el nom d'aquest arxiu"
7 | unauthorized: "Els arxius ja no existeixen o no està autoritzat per accedir a aquesta pàgina"
8 | nochanged: "No s'ha detectat cap canvi"
9 | deleted:
10 | success: "Els arxius s'han eliminat correctament"
11 | danger: "Els arxius ja no existeixen o no està autoritzat per accedir a aquesta pàgina"
12 | unauthorized: "Els arxius ja no existeixen o no està autoritzat per accedir a aquesta pàgina"
13 | folder:
14 | add:
15 | danger: "S'ha produït un error al crear el directori: %message%"
16 | success: "La carpeta s'ha creat correctament"
17 | deleted:
18 | success: "La carpeta s'ha eliminat correctament"
19 | unauthorized: "La carpeta ja no existeix o no està autoritzat per accedir a aquesta pàgina"
20 | button:
21 | cancel: "CANCEL·LAR"
22 | refresh: "Actualitzar"
23 | parent: "Pare"
24 | save: "GUARDAR"
25 | add:
26 | files: "Afegir arxius..."
27 | folder: "Nova carpeta..."
28 | delete:
29 | current: "Eliminar la carpeta actual"
30 | selected: "Eliminar arxius seleccionats"
31 | action: "ESBORRAR"
32 | rename:
33 | action: "REANOMENAR"
34 | tree: "Arbre"
35 | title:
36 | add:
37 | folder: "Nova carpeta"
38 | rename:
39 | file: "Reannomenar"
40 | delete: "Eliminar"
41 | download: "Descarregar"
42 | preview:
43 | file: "Obrir"
44 | input:
45 | default: "Carpeta sense títol"
46 | table:
47 | name: "Nom"
48 | date: "Data"
49 | size: "Mida"
50 | dimension: "Dimensió"
51 | actions: "Accions"
52 | confirm:
53 | delete: "Esteu segur que voleu suprimir?"
54 | size:
55 | mb: MB
56 | kb: kB
57 | select-all: "Selecciona-ho tot"
58 | upload:
59 | exception_move_uploaded_file: "Permís denegat"
60 | search:
61 | placeholder: Cerca
--------------------------------------------------------------------------------
/Resources/doc/book/3-access-file-manager.md:
--------------------------------------------------------------------------------
1 | Chapter 3 - Access to the File Manager
2 | ======================================
3 |
4 | ```yaml
5 | # app/config/config.yml
6 | artgris_file_manager:
7 | conf:
8 | public: # Access URL: /manager/?conf=public
9 | dir: "%kernel.project_dir%/public/uploads"
10 | ...
11 | myprivatefolder: ... # Access URL: /manager/?conf=myprivatefolder
12 | onlypdf: ... # Access URL: /manager/?conf=onlypdf
13 | anystring: ... # Access URL: /manager/?conf=anystring
14 | ```
15 |
16 | Here is a list of URL parameters:
17 |
18 | | Param | Type | Required | Possible values | Default value | Description | Priority (yml / url) |
19 | | :------- |:--------:|:---------:|:------------------------:|:-------------:|:------------------|:------------------:|
20 | | `conf` | `String` | **True** | | | name of the conf |
21 | | `type` | `String` | False | `file`, `image`, `media` | `file` | type (used by tinymce) | yml > url
22 | | `module` | `String` | False | `tiny`, `ckeditor` | `null` | module (used by tinymce) |
23 | | `tree` in url | `Integer` | False | `0`, `1` | `1` | Display Folder Tree (1:Yes, 2:No) | url > yml
24 | | `tree` in yml | `Boolean` | False | `false`, `true` | `true` | Display Folder Tree (1:Yes, 2:No) | url > yml
25 | | `view` | `String` | False | `thumbnail`, `list` | `list` | Display Mode Type | url > yml
26 | | `orderby` | `String` | False | `name`, `date`, `size`, `dimension` | | Sort files |
27 | | `order` | `String` | False | `asc`, `desc` | | Order by asc or desc |
28 | | `extra` | `Array` | False | | `null` | extra parameters (used by service configuration)
29 | | `route` | `String` | False | | | a folder path under the 'dir' folder ex: /subfolder
30 |
31 | Example:
32 |
33 | path('file_manager', {module:'tiny', type:'image', conf:'perso', extra: {'user':'miamolex', 'allow': true}, route: '/subfolder'})
34 |
35 | # Access URL: /manager/?module=tiny&type=image&conf=perso&extra[user]=miamolex&extra[allow]=1&route=/subfolder
36 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "artgris/filemanager-bundle",
3 | "type": "symfony-bundle",
4 | "description": "FileManager is a simple Multilingual File Manager Bundle for Symfony",
5 | "keywords": [
6 | "symfony",
7 | "bundle",
8 | "file manager"
9 | ],
10 | "homepage": "https://github.com/artgris/FileManagerBundle",
11 | "license": "MIT",
12 | "authors": [
13 | {
14 | "name": "Arthur Gribet",
15 | "email": "a.gribet@gmail.com"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=8.1",
20 | "oomphinc/composer-installers-extender": "^2.0",
21 | "symfony/asset": "^6.0||^7.0",
22 | "symfony/event-dispatcher": "^6.0||^7.0",
23 | "symfony/expression-language": "^6.0||^7.0",
24 | "symfony/flex": "^2.3",
25 | "symfony/form": "^6.0||^7.0",
26 | "symfony/framework-bundle": "^6.0||^7.0",
27 | "symfony/mime": "^6.0||^7.0",
28 | "symfony/string": "^6.0||^7.0",
29 | "symfony/translation": "^6.0||^7.0",
30 | "symfony/twig-bridge": "^6.0||^7.0",
31 | "symfony/twig-bundle": "^6.0||^7.0",
32 | "symfony/validator": "^6.0||^7.0"
33 | },
34 | "require-dev": {
35 | "phpunit/phpunit": "^9.5",
36 | "symfony/browser-kit": "^6.0||^7.0",
37 | "symfony/css-selector": "^6.0||^7.0",
38 | "symfony/phpunit-bridge": "^6.0||^7.0",
39 | "symfony/templating": "^6.0||^7.0",
40 | "symfony/var-dumper": "^6.0||^7.0",
41 | "symfony/yaml": "^6.0||^7.0"
42 | },
43 | "config": {
44 | "sort-packages": true,
45 | "preferred-install": {
46 | "symfony/doctrine-bridge": "source",
47 | "*": "dist"
48 | },
49 | "allow-plugins": {
50 | "composer/installers": true,
51 | "symfony/flex": true,
52 | "symfony/runtime": true,
53 | "composer/package-versions-deprecated": true,
54 | "oomphinc/composer-installers-extender": true
55 | }
56 | },
57 | "autoload": {
58 | "psr-4": {
59 | "Artgris\\Bundle\\FileManagerBundle\\": ""
60 | },
61 | "exclude-from-classmap": [
62 | "/Tests/"
63 | ]
64 | },
65 | "autoload-dev": {
66 | "psr-4": {
67 | "Artgris\\Bundle\\FileManagerBundle\\Tests\\": "/Tests/"
68 | }
69 | },
70 | "scripts": {
71 | "auto-scripts": {
72 | "cache:clear": "symfony-cmd",
73 | "assets:install %PUBLIC_DIR%": "symfony-cmd"
74 | }
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/Resources/public/libs/blueimp-tmpl/js/tmpl.js:
--------------------------------------------------------------------------------
1 | /*
2 | * JavaScript Templates
3 | * https://github.com/blueimp/JavaScript-Templates
4 | *
5 | * Copyright 2011, Sebastian Tschan
6 | * https://blueimp.net
7 | *
8 | * Licensed under the MIT license:
9 | * https://opensource.org/licenses/MIT
10 | *
11 | * Inspired by John Resig's JavaScript Micro-Templating:
12 | * http://ejohn.org/blog/javascript-micro-templating/
13 | */
14 |
15 | /* global define */
16 |
17 | ;(function ($) {
18 | 'use strict'
19 | var tmpl = function (str, data) {
20 | var f = !/[^\w\-\.:]/.test(str)
21 | ? tmpl.cache[str] = tmpl.cache[str] || tmpl(tmpl.load(str))
22 | : new Function(// eslint-disable-line no-new-func
23 | tmpl.arg + ',tmpl',
24 | 'var _e=tmpl.encode' + tmpl.helper + ",_s='" +
25 | str.replace(tmpl.regexp, tmpl.func) + "';return _s;"
26 | )
27 | return data ? f(data, tmpl) : function (data) {
28 | return f(data, tmpl)
29 | }
30 | }
31 | tmpl.cache = {}
32 | tmpl.load = function (id) {
33 | return document.getElementById(id).innerHTML
34 | }
35 | tmpl.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g
36 | tmpl.func = function (s, p1, p2, p3, p4, p5) {
37 | if (p1) { // whitespace, quote and backspace in HTML context
38 | return {
39 | '\n': '\\n',
40 | '\r': '\\r',
41 | '\t': '\\t',
42 | ' ': ' '
43 | }[p1] || '\\' + p1
44 | }
45 | if (p2) { // interpolation: {%=prop%}, or unescaped: {%#prop%}
46 | if (p2 === '=') {
47 | return "'+_e(" + p3 + ")+'"
48 | }
49 | return "'+(" + p3 + "==null?'':" + p3 + ")+'"
50 | }
51 | if (p4) { // evaluation start tag: {%
52 | return "';"
53 | }
54 | if (p5) { // evaluation end tag: %}
55 | return "_s+='"
56 | }
57 | }
58 | tmpl.encReg = /[<>&"'\x00]/g // eslint-disable-line no-control-regex
59 | tmpl.encMap = {
60 | '<': '<',
61 | '>': '>',
62 | '&': '&',
63 | '"': '"',
64 | "'": '''
65 | }
66 | tmpl.encode = function (s) {
67 | return (s == null ? '' : '' + s).replace(
68 | tmpl.encReg,
69 | function (c) {
70 | return tmpl.encMap[c] || ''
71 | }
72 | )
73 | }
74 | tmpl.arg = 'o'
75 | tmpl.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);}" +
76 | ',include=function(s,d){_s+=tmpl(s,d);}'
77 | if (typeof define === 'function' && define.amd) {
78 | define(function () {
79 | return tmpl
80 | })
81 | } else if (typeof module === 'object' && module.exports) {
82 | module.exports = tmpl
83 | } else {
84 | $.tmpl = tmpl
85 | }
86 | }(this))
87 |
--------------------------------------------------------------------------------
/Resources/doc/tutorials/input-button.md:
--------------------------------------------------------------------------------
1 | How to add a button that open the File manager to fill out an input field with the file URL
2 | ==========================================================================================
3 |
4 |
5 | > Required: bootstrap and jquery
6 |
7 | ### Step 1 - Create a `button` conf
8 |
9 | ```yml
10 | artgris_file_manager:
11 | conf:
12 | button:
13 | dir: "%kernel.project_dir%/public/uploads"
14 | ```
15 |
16 | ### Step 2 - Create input and button
17 |
18 | ```html
19 |
36 | ```
37 |
38 | ### Step 3 - Add modal with an iframe of your file manager; use `module:1`
39 |
40 | ```html
41 |
42 |
22 | {% block file_name %}
23 | {{ (fileEntity.preview.folder is defined ? fileEntity.preview.folder|raw : file.fileName) }}
24 | {% endblock %}
25 | {% block file_date %}{{ fileEntity.file.mTime|date('d/m/Y') }}{% endblock %} {% block file_size %}{{ fileEntity.HTMLSize ? ' - '~fileEntity.HTMLSize|trans|raw }}{% endblock %}
26 |
27 | {% block file_dimension %}
28 | {{ fileEntity.HTMLDimension }}
29 | {% endblock %}
30 |
31 |
| 15 | {% block select_all %} 16 | 17 | {% endblock %} 18 | | 19 |20 | | 21 | {{ order(fileManager, 'name') }} 22 | | 23 |24 | {{ order(fileManager, 'date') }} 25 | | 26 |27 | {{ order(fileManager, 'size') }} 28 | | 29 |30 | {{ order(fileManager, 'dimension') }} 31 | | 32 |{{ 'table.actions'|trans }} | 33 |
|---|---|---|---|---|---|---|
| 40 | {% block file_checkbox %} 41 | 43 | {% endblock %} 44 | | 45 |46 | {% block file_preview %} 47 | {{ fileEntity.preview ? fileEntity.preview.html|raw }} 48 | {% endblock %} 49 | | 50 |51 | {% block file_name %} 52 | {{ (fileEntity.preview.folder is defined ? fileEntity.preview.folder|raw : file.fileName) }} 53 | {% endblock %} 54 | | 55 |56 | {% block file_date %} 57 | {{ file.mTime|date('d/m/Y') }} 58 | {% endblock %} 59 | | 60 |61 | {% block file_size %} 62 | {{ fileEntity.HTMLSize }} 63 | {% endblock %} 64 | | 65 |66 | {% block file_dimension %} 67 | {{ fileEntity.HTMLDimension }} 68 | {% endblock %} 69 | | 70 |71 | {% block file_action %} 72 | 73 | 84 | 85 | 86 | 99 | 100 | {% if file.type == "file" %} 101 | 105 | 106 | 107 | {% if fileEntity.isImage() %} 108 | 109 | 119 | 120 | {% endif %} 121 | {% endif %} 122 | {% endblock %} 123 | | 124 |