mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-03 11:18:40 +00:00
Case fix!
This commit is contained in:
parent
6692842974
commit
24d7fdc1b9
0
Theme/Backend/Elements/media-select.tpl.php
Normal file
0
Theme/Backend/Elements/media-select.tpl.php
Normal file
1
Theme/Backend/Elements/media-upload.tpl.php
Normal file
1
Theme/Backend/Elements/media-upload.tpl.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<span id="media-upload"></span>
|
||||
20
Theme/Backend/Lang/Navigation.en.lang.php
Normal file
20
Theme/Backend/Lang/Navigation.en.lang.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['Navigation'] = [
|
||||
'Create' => 'Create',
|
||||
'List' => 'List',
|
||||
'Media' => 'Media',
|
||||
];
|
||||
18
Theme/Backend/Lang/api.en.lang.php
Normal file
18
Theme/Backend/Lang/api.en.lang.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG[1] = [
|
||||
'i:ModuleInstalled' => 'Installation of the module {$1} was successful.',
|
||||
];
|
||||
36
Theme/Backend/Lang/en.lang.php
Normal file
36
Theme/Backend/Lang/en.lang.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
$MODLANG['Media'] = [
|
||||
'Account' => 'Account',
|
||||
'Author' => 'Author',
|
||||
'Changed' => 'Changed',
|
||||
'Changedby' => 'Changed by',
|
||||
'Created' => 'Created',
|
||||
'Creator' => 'Creator',
|
||||
'Data' => 'Data',
|
||||
'Editability' => 'Editability',
|
||||
'Extension' => 'Extension',
|
||||
'Files' => 'Files',
|
||||
'Media' => 'Media',
|
||||
'Name' => 'Name',
|
||||
'Permission' => 'Permission',
|
||||
'Preview' => 'Preview',
|
||||
'Settings' => 'Settings',
|
||||
'Size' => 'Size',
|
||||
'Type' => 'Type',
|
||||
'Upload' => 'Upload',
|
||||
'Visibility' => 'Visibility',
|
||||
];
|
||||
34
Theme/Backend/media-create.tpl.php
Normal file
34
Theme/Backend/media-create.tpl.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
<section class="box w-50">
|
||||
<h1><?= $this->l11n->lang['Media']['Upload']; ?></h1>
|
||||
<div class="inner">
|
||||
<form method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/media/create'); ?>">
|
||||
<table class="layout wf-100">
|
||||
<tr><td><label for="iName"><?= $this->l11n->lang['Media']['Name']; ?></label>
|
||||
<tr><td><input type="text" id="iName" name="name" placeholder="">
|
||||
<tr><td><label for="iFiles"><?= $this->l11n->lang['Media']['Files']; ?></label>
|
||||
<tr><td><input type="file" id="iFiles" name="files" multiple><input name="media" type="hidden">
|
||||
<tr><td><input type="submit" value="<?= $this->l11n->lang[0]['Create']; ?>">
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
56
Theme/Backend/media-list.tpl.php
Normal file
56
Theme/Backend/media-list.tpl.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
|
||||
$mediaMapper = new \Modules\Media\Models\MediaMapper($this->app->dbPool->get());
|
||||
$media = $mediaMapper->getNewest(25);
|
||||
|
||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||
$footerView->setPages(count($media) / 25);
|
||||
$footerView->setPage(1);
|
||||
|
||||
echo $this->getData('nav')->render(); ?>
|
||||
<section class="box">
|
||||
<table class="table">
|
||||
<caption><?= $this->l11n->lang['Media']['Media']; ?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->l11n->lang['Media']['Name']; ?>
|
||||
<td><?= $this->l11n->lang['Media']['Type']; ?>
|
||||
<td><?= $this->l11n->lang['Media']['Size']; ?>
|
||||
<td><?= $this->l11n->lang['Media']['Creator']; ?>
|
||||
<td><?= $this->l11n->lang['Media']['Created']; ?>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3"><?= $footerView->render(); ?>
|
||||
<tbody>
|
||||
<?php $count = 0; foreach($media as $key => $value) : $count++;
|
||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/media/single?id=' . $value->getId()); ?>
|
||||
<tr>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getExtension(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getSize(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getCreatedBy(); ?></a>
|
||||
<td><a href="<?= $url; ?>"><?= $value->getCreatedAt()->format('Y-m-d H:i:s'); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if($count === 0) : ?>
|
||||
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
</section>
|
||||
32
Theme/Backend/media-single.tpl.php
Normal file
32
Theme/Backend/media-single.tpl.php
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
/**
|
||||
* @var \phpOMS\Views\View $this
|
||||
*/
|
||||
$media = $this->getData('media');
|
||||
echo $this->getData('nav')->render();
|
||||
?>
|
||||
|
||||
<section class="box w-100">
|
||||
<h1><?= $media->getName() ?></h1>
|
||||
<div class="inner">
|
||||
<?php if(in_array($media->getExtension(), ['gif', 'bmp', 'jpg', 'jpeg', 'png'])) : ?>
|
||||
<img src="<?= $media->getPath(); ?>">
|
||||
<?php else : ?>
|
||||
<pre><?= htmlspecialchars(file_get_contents(ROOT_PATH . '/' . $media->getPath())); ?></pre>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Reference in New Issue
Block a user