diff --git a/Admin/Activate.php b/Admin/Activate.php index e0244a5..5383b48 100644 --- a/Admin/Activate.php +++ b/Admin/Activate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Editor\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\ActivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Activate extends ActivateAbstract /** * {@inheritdoc} */ - public static function activate(Pool $dbPool, InfoManager $info) + public static function activate(DatabasePool $dbPool, InfoManager $info) { parent::activate($dbPool, $info); } diff --git a/Admin/Deactivate.php b/Admin/Deactivate.php index 8d85e94..f1b2414 100644 --- a/Admin/Deactivate.php +++ b/Admin/Deactivate.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Editor\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\DeactivateAbstract; use phpOMS\Module\InfoManager; @@ -37,7 +37,7 @@ class Deactivate extends DeactivateAbstract /** * {@inheritdoc} */ - public static function deactivate(Pool $dbPool, InfoManager $info) + public static function deactivate(DatabasePool $dbPool, InfoManager $info) { parent::deactivate($dbPool, $info); } diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php index 795e5d0..b89cdff 100644 --- a/Admin/Install/Navigation.php +++ b/Admin/Install/Navigation.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -14,7 +14,7 @@ * @link http://orange-management.com */ namespace Modules\Editor\Admin\Install; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; /** * Navigation class. @@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool; */ class Navigation { - public static function install(Pool $dbPool) + public static function install(string $path, DatabasePool $dbPool) { $navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true); diff --git a/Admin/Installer.php b/Admin/Installer.php index ce08345..dbd38fd 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,15 +16,15 @@ namespace Modules\Editor\Admin; use phpOMS\DataStorage\Database\DatabaseType; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\InfoManager; use phpOMS\Module\InstallerAbstract; /** - * Calendar install class. + * Editor install class. * * @category Modules - * @package Modules\Calendar + * @package Modules\Editor * @author OMS Development Team * @author Dennis Eichhorn * @license OMS License 1.0 @@ -37,12 +37,45 @@ class Installer extends InstallerAbstract /** * {@inheritdoc} */ - public static function install(Pool $dbPool, InfoManager $info) + public static function install(string $path, DatabasePool $dbPool, InfoManager $info) { - parent::install($dbPool, $info); + parent::install($path, $dbPool, $info); switch ($dbPool->get('core')->getType()) { case DatabaseType::MYSQL: + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'editor_doc` ( + `editor_doc_id` int(11) NOT NULL AUTO_INCREMENT, + `editor_doc_title` varchar(250) NOT NULL, + `editor_doc_plain` text NOT NULL, + `editor_doc_content` text NOT NULL, + `editor_doc_path` varchar(255) NOT NULL, + `editor_doc_created_at` datetime NOT NULL, + `editor_doc_created_by` int(11) NOT NULL, + PRIMARY KEY (`editor_doc_id`), + KEY `editor_doc_created_by` (`editor_doc_created_by`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'editor_doc` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'editor_doc_ibfk_1` FOREIGN KEY (`editor_doc_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'editor_tag` ( + `editor_tag_id` int(11) NOT NULL AUTO_INCREMENT, + `editor_tag_doc` int(11) NOT NULL, + `editor_tag_tag` varchar(20) NOT NULL, + PRIMARY KEY (`editor_tag_id`), + KEY `editor_tag_doc` (`editor_tag_doc`) + )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' + )->execute(); + + $dbPool->get('core')->con->prepare( + 'ALTER TABLE `' . $dbPool->get('core')->prefix . 'editor_tag` + ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'editor_tag_ibfk_1` FOREIGN KEY (`editor_tag_doc`) REFERENCES `' . $dbPool->get('core')->prefix . 'editor_doc` (`editor_doc_id`);' + )->execute(); break; } } diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php new file mode 100644 index 0000000..308d911 --- /dev/null +++ b/Admin/Routes/Web/Api.php @@ -0,0 +1,12 @@ + [ + [ + 'dest' => '\Modules\Editor\Controller:apiEditorCreate', + 'verb' => RouteVerb::SET, + ], + ], +]; diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index 444e390..2519faf 100644 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -19,4 +19,10 @@ return [ 'verb' => RouteVerb::GET, ], ], + '^.*/backend/editor/single.*$' => [ + [ + 'dest' => '\Modules\Editor\Controller:viewEditorSingle', + 'verb' => RouteVerb::GET, + ], + ], ]; diff --git a/Admin/Uninstall.php b/Admin/Uninstall.php index 62e8142..7423a3e 100644 --- a/Admin/Uninstall.php +++ b/Admin/Uninstall.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Editor\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\UninstallAbstract; /** @@ -36,7 +36,7 @@ class Uninstall extends UninstallAbstract /** * {@inheritdoc} */ - public static function uninstall(Pool $dbPool, InfoManager $info) + public static function uninstall(DatabasePool $dbPool, InfoManager $info) { parent::uninstall($dbPool, $info); } diff --git a/Admin/Update.php b/Admin/Update.php index fca09f7..c2f0432 100644 --- a/Admin/Update.php +++ b/Admin/Update.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -16,7 +16,7 @@ namespace Modules\Editor\Admin; -use phpOMS\DataStorage\Database\Pool; +use phpOMS\DataStorage\Database\DatabasePool; use phpOMS\Module\UpdateAbstract; use phpOMS\System\File\Directory; @@ -37,7 +37,7 @@ class Update extends UpdateAbstract /** * {@inheritdoc} */ - public static function update(Pool $dbPool, array $info) + public static function update(DatabasePool $dbPool, array $info) { Directory::deletePath(__DIR__ . '/Update'); mkdir('Update'); diff --git a/Controller.js b/Controller.js new file mode 100644 index 0000000..e69de29 diff --git a/Controller.php b/Controller.php index 7afa350..6fe90ab 100644 --- a/Controller.php +++ b/Controller.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -15,8 +15,11 @@ */ namespace Modules\Editor; +use Model\Message\FormValidation; use Modules\Navigation\Models\Navigation; use Modules\Navigation\Views\NavigationView; +use Modules\Editor\Models\EditorDoc; +use Modules\Editor\Models\EditorDocMapper; use phpOMS\Asset\AssetType; use phpOMS\Contract\RenderableInterface; use phpOMS\Message\RequestAbstract; @@ -46,7 +49,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_PATH = __DIR__; + /* public */ const MODULE_PATH = __DIR__; /** * Module version. @@ -54,7 +57,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_VERSION = '1.0.0'; + /* public */ const MODULE_VERSION = '1.0.0'; /** * Module name. @@ -62,7 +65,7 @@ class Controller extends ModuleAbstract implements WebInterface * @var string * @since 1.0.0 */ - const MODULE_NAME = 'Editor'; + /* public */ const MODULE_NAME = 'Editor'; /** * Providing. @@ -94,7 +97,7 @@ class Controller extends ModuleAbstract implements WebInterface public function setUpEditorEditor(RequestAbstract $request, ResponseAbstract $response, $data = null) { $head = $response->get('Content')->getData('head'); - $head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Editor/ModuleEditor.js'); + $head->addAsset(AssetType::JS, $request->getUri()->getBase() . 'Modules/Editor/Controller.js'); } /** @@ -132,7 +135,73 @@ class Controller extends ModuleAbstract implements WebInterface $view->setTemplate('/Modules/Editor/Theme/Backend/editor-list'); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response)); + $docs = EditorDocMapper::getNewest(50); + $view->addData('docs', $docs); + return $view; } + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @return \Serializable + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function viewEditorSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable + { + $view = new View($this->app, $request, $response); + $view->setTemplate('/Modules/Editor/Theme/Backend/editor'); + $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1005301001, $request, $response)); + + $doc = EditorDocMapper::get((int) $request->getData('id')); + $view->addData('doc', $doc); + + return $view; + } + + private function validateEditorCreate(RequestAbstract $request) : array + { + $val = []; + if ( + ($val['title'] = empty($request->getData('title'))) + || ($val['plain'] = empty($request->getData('plain'))) + ) { + return $val; + } + + return []; + } + + /** + * @param RequestAbstract $request Request + * @param ResponseAbstract $response Response + * @param mixed $data Generic data + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function apiEditorCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) + { + if (!empty($val = $this->validateEditorCreate($request))) { + $response->set('editor_create', new FormValidation($val)); + + return; + } + + $doc = new EditorDoc(); + $doc->setTitle($request->getData('title') ?? ''); + $doc->setPlain($request->getData('plain') ?? ''); + $doc->setContent($request->getData('plain') ?? ''); + $doc->setCreatedAt(new \DateTime('now')); + $doc->setCreatedBy($request->getAccount()); + + EditorDocMapper::create($doc); + + $response->set('editor', $doc->jsonSerialize()); + } + } diff --git a/Models/Editor.js b/Models/Editor.js new file mode 100644 index 0000000..9ffd623 --- /dev/null +++ b/Models/Editor.js @@ -0,0 +1,28 @@ +(function (jsOMS) + { + "use strict"; + + jsOMS.Modules.Editor.Editor = function (editor) + { + + }; + + jsOMS.Modules.Editor.prototype.getSelectedText = function() + { + var text = ''; + var activeEl = document.activeElement; + var activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null; + if ( + (activeElTagName === 'textarea' || activeElTagName === 'input') && + /^(?:text|search|password|tel|url)$/i.test(activeEl.type) && + (typeof activeEl.selectionStart === 'number') + ) { + text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd); + } else if (window.getSelection) { + text = window.getSelection().toString(); + } + return text; + }; + + }(window.jsOMS = window.jsOMS || {}) +); \ No newline at end of file diff --git a/Models/EditorDoc.php b/Models/EditorDoc.php new file mode 100644 index 0000000..32daf0a --- /dev/null +++ b/Models/EditorDoc.php @@ -0,0 +1,275 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Editor\Models; + +use phpOMS\Contract\ArrayableInterface; + +/** + * News article class. + * + * @category Module + * @package Framework + * @author OMS Development Team + * @author Dennis Eichhorn + * @license OMS License 1.0 + * @link http://orange-management.com + * @since 1.0.0 + */ +class EditorDoc implements ArrayableInterface, \JsonSerializable +{ + + /** + * Article ID. + * + * @var int + * @since 1.0.0 + */ + private $id = 0; + + /** + * Title. + * + * @var string + * @since 1.0.0 + */ + private $title = ''; + + /** + * Content. + * + * @var string + * @since 1.0.0 + */ + private $content = ''; + + /** + * Unparsed. + * + * @var string + * @since 1.0.0 + */ + private $plain = ''; + + /** + * Doc path for organizing. + * + * @var string + * @since 1.0.0 + */ + private $path = ''; + + /** + * Created. + * + * @var \DateTime + * @since 1.0.0 + */ + private $createdAt = null; + + /** + * Creator. + * + * @var int + * @since 1.0.0 + */ + private $createdBy = 0; + + /** + * Constructor. + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function __construct() + { + $this->createdAt = new \DateTime('NOW'); + } + + /** + * @return string + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getContent() : string + { + return $this->content; + } + + /** + * @param string $content + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setContent(string $content) + { + $this->content = $content; + } + + /** + * @param string $plain + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setPlain(string $plain) + { + $this->plain = $plain; + } + + /** + * @return string + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getPlain() : string + { + return $this->plain; + } + + /** + * @return \DateTime + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getCreatedAt() : \DateTime + { + return $this->createdAt; + } + + /** + * @return int + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getId() : int + { + return $this->id; + } + + /** + * @return int + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getCreatedBy() : int + { + return $this->createdBy; + } + + /** + * @param int $id + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setCreatedBy(int $id) + { + $this->createdBy = $id; + } + + /** + * @param \DateTime $createdAt + * + * @return void + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setCreatedAt(\DateTime $createdAt) + { + $this->createdAt = $createdAt; + } + + /** + * @return string + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getTitle() : string + { + return $this->title; + } + + /** + * @param string $title + * + * @return mixed + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setTitle(string $title) + { + $this->title = $title; + } + + /** + * @return string + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function getPath() : string + { + return $this->path; + } + + /** + * @param string $path + * + * @return mixed + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public function setPath(string $path) + { + $this->path = $path; + } + + public function toArray() : array + { + return [ + 'id' => $this->id, + 'title' => $this->title, + 'plain' => $this->plain, + 'content' => $this->content, + 'createdAt' => $this->createdAt, + 'createdBy' => $this->createdBy, + ]; + } + + public function __toString() + { + return json_encode($this->toArray()); + } + + public function jsonSerialize() + { + return $this->toArray(); + } +} diff --git a/Models/EditorDocMapper.php b/Models/EditorDocMapper.php new file mode 100644 index 0000000..8896b46 --- /dev/null +++ b/Models/EditorDocMapper.php @@ -0,0 +1,132 @@ + + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +namespace Modules\Editor\Models; + +use Modules\Admin\Models\AccountMapper; +use phpOMS\DataStorage\Database\DataMapperAbstract; +use phpOMS\DataStorage\Database\Query\Builder; +use phpOMS\DataStorage\Database\Query\Column; +use phpOMS\DataStorage\Database\RelationType; + +class EditorDocMapper extends DataMapperAbstract +{ + + /** + * Columns. + * + * @var array + * @since 1.0.0 + */ + static protected $columns = [ + 'editor_doc_id' => ['name' => 'editor_doc_id', 'type' => 'int', 'internal' => 'id'], + 'editor_doc_created_by' => ['name' => 'editor_doc_created_by', 'type' => 'string', 'internal' => 'createdBy'], + 'editor_doc_title' => ['name' => 'editor_doc_title', 'type' => 'string', 'internal' => 'title'], + 'editor_doc_plain' => ['name' => 'editor_doc_plain', 'type' => 'string', 'internal' => 'plain'], + 'editor_doc_content' => ['name' => 'editor_doc_content', 'type' => 'string', 'internal' => 'content'], + 'editor_doc_path' => ['name' => 'editor_doc_path', 'type' => 'string', 'internal' => 'path'], + 'editor_doc_created_at' => ['name' => 'editor_doc_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'], + ]; + + static protected $belongsTo = [ + 'createdBy' => [ + 'mapper' => AccountMapper::class, + 'src' => 'editor_doc_created_by', + ], + ]; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + protected static $table = 'editor_doc'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + protected static $primaryField = 'editor_doc_id'; + + /** + * Created at. + * + * @var string + * @since 1.0.0 + */ + protected static $createdAt = 'editor_doc_created_at'; + + /** + * Create object. + * + * @param mixed $obj Object + * @param int $relations Behavior for relations creation + * + * @return mixed + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function create($obj, int $relations = RelationType::ALL) + { + try { + $objId = parent::create($obj, $relations); + $query = new Builder(self::$db); + $query->prefix(self::$db->getPrefix()) + ->insert( + 'account_permission_account', + 'account_permission_from', + 'account_permission_for', + 'account_permission_id1', + 'account_permission_id2', + 'account_permission_r', + 'account_permission_w', + 'account_permission_m', + 'account_permission_d', + 'account_permission_p' + ) + ->into('account_permission') + ->values($obj->getCreatedBy(), 'editor', 'editor', 1, $objId, 1, 1, 1, 1, 1); + + self::$db->con->prepare($query->toSql())->execute(); + } catch (\Exception $e) { + return false; + } + + return $objId; + } + + /** + * Find. + * + * @param array $columns Columns to select + * + * @return Builder + * + * @since 1.0.0 + * @author Dennis Eichhorn + */ + public static function find(...$columns) : Builder + { + return parent::find(...$columns)->from('account_permission') + ->where('account_permission.account_permission_for', '=', 'editor') + ->where('account_permission.account_permission_id1', '=', 1) + ->where('news.news_id', '=', new Column('account_permission.account_permission_id2')) + ->where('account_permission.account_permission_r', '=', 1); + } +} diff --git a/Theme/Backend/Lang/api.en.lang.php b/Theme/Backend/Lang/api.en.lang.php index 6d5bdff..d28b242 100644 --- a/Theme/Backend/Lang/api.en.lang.php +++ b/Theme/Backend/Lang/api.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 3a6dba6..dfce45b 100644 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -24,6 +24,8 @@ return ['Editor' => [ 'Name' => 'Name', 'Permission' => 'Permission', 'Preview' => 'Preview', + 'Save' => 'Save', 'Start' => 'Start', 'Text' => 'Text', + 'Title' => 'Title', ]]; diff --git a/Theme/Backend/editor.tpl.php b/Theme/Backend/editor.tpl.php index b11ee3d..4ee00fa 100644 --- a/Theme/Backend/editor.tpl.php +++ b/Theme/Backend/editor.tpl.php @@ -1,6 +1,27 @@ -
+ + * @author Dennis Eichhorn + * @copyright 2013 Dennis Eichhorn + * @license OMS License 1.0 + * @version 1.0.0 + * @link http://orange-management.com + */ +/** + * @var \phpOMS\Views\View $this + */ + +$doc = $this->getData('doc') ?? null; +?> +
- +
@@ -25,18 +46,19 @@
- +
+ getContent() : ''; ?>
diff --git a/Theme/backend/Lang/Navigation.en.lang.php b/Theme/backend/Lang/Navigation.en.lang.php index bd84f61..4c814f0 100644 --- a/Theme/backend/Lang/Navigation.en.lang.php +++ b/Theme/backend/Lang/Navigation.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/Lang/api.en.lang.php b/Theme/backend/Lang/api.en.lang.php index 6d5bdff..d28b242 100644 --- a/Theme/backend/Lang/api.en.lang.php +++ b/Theme/backend/Lang/api.en.lang.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD diff --git a/Theme/backend/editor-create.tpl.php b/Theme/backend/editor-create.tpl.php index 73b6fd8..516dc49 100644 --- a/Theme/backend/editor-create.tpl.php +++ b/Theme/backend/editor-create.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -21,8 +21,9 @@ echo $this->getData('nav')->render(); ?>
-
- + + +
@@ -95,7 +96,7 @@ echo $this->getData('nav')->render(); ?>
- +
@@ -113,7 +114,7 @@ echo $this->getData('nav')->render(); ?>
diff --git a/Theme/backend/editor-list.tpl.php b/Theme/backend/editor-list.tpl.php index 49b52cd..f247194 100644 --- a/Theme/backend/editor-list.tpl.php +++ b/Theme/backend/editor-list.tpl.php @@ -2,7 +2,7 @@ /** * Orange Management * - * PHP Version 7.0 + * PHP Version 7.1 * * @category TBD * @package TBD @@ -22,20 +22,27 @@ $footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig'); $footerView->setPages(20); $footerView->setPage(1); +$docs = $this->getData('docs'); + echo $this->getData('nav')->render(); ?>
- - $value) : $count++; ?> + $value) : $count++; + $url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/editor/single?id=' . $value->getId()); ?> + +
getText('Documents'); ?>
getText('Name'); ?> + getText('Title'); ?> getText('Creator'); ?> getText('Created'); ?>
render(); ?>
getTitle(); ?> + getCreatedBy(); ?> + getCreatedAt()->format('Y-m-d H:i:s'); ?>
getText('Empty', 0, 0); ?>