This commit is contained in:
Dennis Eichhorn 2017-07-17 19:31:51 +02:00
parent 83d3676025
commit ce388fdd97
4 changed files with 5 additions and 1 deletions

View File

@ -48,11 +48,11 @@ class Installer extends InstallerAbstract
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'media` (
`media_id` int(11) NOT NULL AUTO_INCREMENT,
`media_name` varchar(100) DEFAULT NULL,
`media_description` text DEFAULT NULL,
`media_versioned` tinyint(1) NOT NULL,
`media_file` varchar(255) NOT NULL,
`media_extension` varchar(10) DEFAULT NULL,
`media_collection` tinyint(1) DEFAULT NULL,
`media_description` varchar(255) DEFAULT NULL,
`media_size` int(11) DEFAULT NULL,
`media_created_by` int(11) DEFAULT NULL,
`media_created_at` datetime DEFAULT NULL,

View File

@ -33,6 +33,7 @@ class MediaMapper extends DataMapperAbstract
protected static $columns = [
'media_id' => ['name' => 'media_id', 'type' => 'int', 'internal' => 'id'],
'media_name' => ['name' => 'media_name', 'type' => 'string', 'internal' => 'name'],
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description'],
'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'versioned'],
'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path'],
'media_extension' => ['name' => 'media_extension', 'type' => 'string', 'internal' => 'extension'],

View File

@ -21,6 +21,7 @@ return ['Media' => [
'Created' => 'Created',
'Creator' => 'Creator',
'Data' => 'Data',
'Description' => 'Description',
'Editability' => 'Editability',
'Extension' => 'Extension',
'Files' => 'Files',

View File

@ -27,6 +27,8 @@ echo $this->getData('nav')->render(); ?>
<table class="layout wf-100">
<tr><td><label for="iName"><?= $this->getText('Name'); ?></label>
<tr><td><input type="text" id="iName" name="name" placeholder="&#xf040;">
<tr><td><label for="iDescription"><?= $this->getText('Description'); ?></label>
<tr><td><textarea id="iDescription" name="description"></textarea>
<tr><td><label for="iFiles"><?= $this->getText('Files'); ?></label>
<tr><td><input type="file" id="iFiles" name="files" multiple><input name="media" type="hidden">
<tr><td><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">