diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0a77ca4..7f9dce4 100644 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -20,9 +20,9 @@ use Modules\Media\Models\MediaMapper; use Modules\Media\Models\PermissionState; use Modules\Media\Models\UploadFile; use Modules\Media\Models\UploadStatus; + use phpOMS\Account\PermissionType; use phpOMS\Message\NotificationLevel; - use phpOMS\Message\RequestAbstract; use phpOMS\Message\ResponseAbstract; use phpOMS\System\MimeType; @@ -34,6 +34,25 @@ use phpOMS\System\MimeType; * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Modules#50 + * Allow collection modification + * Allow to change (add/remove) collection components. + * + * @todo Orange-Management/Modules#59 + * Implement resumable uploads + * This is especially useful if someone wants to upload when he/she has wifi access + * + * @todo Orange-Management/Modules#139 + * Allow text file modification directly in the media module + * For text files there should be a edit button which replaces the display with a textarea which can be saved. + * + * @todo Orange-Management/Modules#150 + * Allow to create new files (not only upload) + * In many cases it would be nice to create a new file manually with the module (e.g. create a new .txt or .sqlite file) which then can get edited directly in the media module. + * + * @todo Orange-Management/Modules#160 + * Fix media upload */ final class ApiController extends Controller { diff --git a/Controller/BackendController.php b/Controller/BackendController.php index c5b2e61..3673c39 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -32,6 +32,10 @@ use phpOMS\Views\View; * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Modules#150 + * Allow to create new files (not only upload) + * In many cases it would be nice to create a new file manually with the module (e.g. create a new .txt or .sqlite file) which then can get edited directly in the media module. */ final class BackendController extends Controller { diff --git a/Models/FileStorageInterface.php b/Models/FileStorageInterface.php deleted file mode 100644 index 4bb7c4b..0000000 --- a/Models/FileStorageInterface.php +++ /dev/null @@ -1,14 +0,0 @@ -> * @since 1.0.0 - * @todo: maybe add file name for searching by file name (path in media_file should not matter for search) */ protected static array $columns = [ 'media_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'], - 'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], - 'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true], + 'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], + 'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true], 'media_description_raw' => ['name' => 'media_description_raw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'versioned'], - 'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path', 'autocomplete' => true], - 'media_virtual' => ['name' => 'media_virtual', 'type' => 'string', 'internal' => 'virtualPath', 'autocomplete' => true], + 'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path', 'autocomplete' => true], + 'media_virtual' => ['name' => 'media_virtual', 'type' => 'string', 'internal' => 'virtualPath', 'autocomplete' => true], 'media_absolute' => ['name' => 'media_absolute', 'type' => 'bool', 'internal' => 'isAbsolute'], 'media_nonce' => ['name' => 'media_nonce', 'type' => 'string', 'internal' => 'nonce'], 'media_password' => ['name' => 'media_password', 'type' => 'string', 'internal' => 'password'], diff --git a/Models/UploadFile.php b/Models/UploadFile.php index 6770159..366d72a 100644 --- a/Models/UploadFile.php +++ b/Models/UploadFile.php @@ -329,7 +329,6 @@ class UploadFile { switch ($error) { case \UPLOAD_ERR_NO_FILE: - // TODO: no file sent return UploadStatus::NOTHING_UPLOADED; case \UPLOAD_ERR_INI_SIZE: case \UPLOAD_ERR_FORM_SIZE: diff --git a/Theme/Backend/Components/Upload/upload.tpl.php b/Theme/Backend/Components/Upload/upload.tpl.php index 0b65502..89c9d85 100644 --- a/Theme/Backend/Components/Upload/upload.tpl.php +++ b/Theme/Backend/Components/Upload/upload.tpl.php @@ -1,3 +1,7 @@ +

getHtml('Media') ?>

diff --git a/Theme/Backend/media-create.tpl.php b/Theme/Backend/media-create.tpl.php index 85351da..4382a32 100644 --- a/Theme/Backend/media-create.tpl.php +++ b/Theme/Backend/media-create.tpl.php @@ -13,9 +13,13 @@ declare(strict_types=1); /** - * @var \phpOMS\Views\View $this + * @todo Orange-Management/Modules#58 + * Implement drag/drop upload */ +/** + * @var \phpOMS\Views\View $this + */ echo $this->getData('nav')->render(); ?>