mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-02-13 06:48:41 +00:00
Init
This commit is contained in:
commit
40961f36ec
38
Admin/Install/Navigation.php
Normal file
38
Admin/Install/Navigation.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support\Admin\Install;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Navigation class.
|
||||||
|
*
|
||||||
|
* @category Modules
|
||||||
|
* @package Modules\Admin
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Navigation
|
||||||
|
{
|
||||||
|
public static function install($dbPool)
|
||||||
|
{
|
||||||
|
$navData = json_decode(file_get_contents(__DIR__ . '/nav.install.json'), true);
|
||||||
|
|
||||||
|
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
||||||
|
$class::installExternal($dbPool, $navData);
|
||||||
|
}
|
||||||
|
}
|
||||||
82
Admin/Install/nav.install.json
Normal file
82
Admin/Install/nav.install.json
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 1002901001,
|
||||||
|
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 0,
|
||||||
|
"name": "Support",
|
||||||
|
"uri": null,
|
||||||
|
"target": "self",
|
||||||
|
"icon": "fa fa-question-circle",
|
||||||
|
"order": 80,
|
||||||
|
"from": "Support",
|
||||||
|
"permission": null,
|
||||||
|
"parent": 1000201001,
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": 1002901101,
|
||||||
|
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "Ticket",
|
||||||
|
"uri": "/{/lang}/backend/support/list",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 80,
|
||||||
|
"from": "Support",
|
||||||
|
"permission": null,
|
||||||
|
"parent": 1002901001,
|
||||||
|
"children": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1002901201,
|
||||||
|
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "Settings",
|
||||||
|
"uri": "/{/lang}/backend/support/settings/dashboard",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 80,
|
||||||
|
"from": "Support",
|
||||||
|
"permission": null,
|
||||||
|
"parent": 1002901001,
|
||||||
|
"children": [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1002901301,
|
||||||
|
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "Analysis",
|
||||||
|
"uri": "/{/lang}/backend/support/analysis/dashboard",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 80,
|
||||||
|
"from": "Support",
|
||||||
|
"permission": null,
|
||||||
|
"parent": 1002901001,
|
||||||
|
"children": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 1002902001,
|
||||||
|
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
||||||
|
"type": 2,
|
||||||
|
"subtype": 1,
|
||||||
|
"name": "Support",
|
||||||
|
"uri": "/{/lang}/backend/private/support/dashboard",
|
||||||
|
"target": "self",
|
||||||
|
"icon": null,
|
||||||
|
"order": 5,
|
||||||
|
"from": "Support",
|
||||||
|
"permission": null,
|
||||||
|
"parent": 1003401001,
|
||||||
|
"children": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
49
Admin/Installer.php
Normal file
49
Admin/Installer.php
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support\Admin;
|
||||||
|
|
||||||
|
use phpOMS\DataStorage\Database\DatabaseType;
|
||||||
|
use phpOMS\DataStorage\Database\Pool;
|
||||||
|
use phpOMS\Module\InstallerAbstract;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support install class.
|
||||||
|
*
|
||||||
|
* @category Modules
|
||||||
|
* @package Modules\Support
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Installer extends InstallerAbstract
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public static function install(Pool $dbPool, array $info)
|
||||||
|
{
|
||||||
|
parent::install($dbPool, $info);
|
||||||
|
|
||||||
|
switch ($dbPool->get('core')->getType()) {
|
||||||
|
case DatabaseType::MYSQL:
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
210
Controller.php
Normal file
210
Controller.php
Normal file
|
|
@ -0,0 +1,210 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support;
|
||||||
|
|
||||||
|
use Modules\Navigation\Models\Navigation;
|
||||||
|
use Modules\Navigation\Views\NavigationView;
|
||||||
|
use phpOMS\Contract\RenderableInterface;
|
||||||
|
use phpOMS\Message\RequestAbstract;
|
||||||
|
use phpOMS\Message\RequestDestination;
|
||||||
|
use phpOMS\Message\ResponseAbstract;
|
||||||
|
use phpOMS\Module\ModuleAbstract;
|
||||||
|
use phpOMS\Module\WebInterface;
|
||||||
|
use phpOMS\Views\View;
|
||||||
|
use phpOMS\Views\ViewLayout;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support controller class.
|
||||||
|
*
|
||||||
|
* @category Modules
|
||||||
|
* @package Modules\Support
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Controller extends ModuleAbstract implements WebInterface
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Module name.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $module = 'Support';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Localization files.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $localization = [
|
||||||
|
RequestDestination::BACKEND => ['backend'],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Providing.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $providing = [
|
||||||
|
'Content',
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dependencies.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $dependencies = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Routing elements.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
protected static $routes = [
|
||||||
|
'^.*/backend/support/list.*$' => [['dest' => '\Modules\Support\Controller:viewSupportList', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
'^.*/backend/support/single.*$' => [['dest' => '\Modules\Support\Controller:viewSupportTicket', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
'^.*/backend/support/create.*$' => [['dest' => '\Modules\Support\Controller:viewSupportCreate', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
'^.*/backend/support/analysis.*$' => [['dest' => '\Modules\Support\Controller:viewSupportAnalysis', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
'^.*/backend/support/settings.*$' => [['dest' => '\Modules\Support\Controller:viewSupportSettings', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
'^.*/backend/private/support/dashboard.*$' => [['dest' => '\Modules\Support\Controller:viewPrivateSupportDashboard', 'method' => 'GET', 'type' => ViewLayout::MAIN],],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function viewSupportList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Support/Theme/backend/support-list');
|
||||||
|
$view->addData('nav', $this->createNavigation(1002603001, $request, $response));
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function viewSupportCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Support/Theme/backend/support-create');
|
||||||
|
$view->addData('nav', $this->createNavigation(1002603001, $request, $response));
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function viewSupportAnalysis(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Support/Theme/backend/support-analysis');
|
||||||
|
$view->addData('nav', $this->createNavigation(1002603001, $request, $response));
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function viewSupportSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Support/Theme/backend/support-settings');
|
||||||
|
$view->addData('nav', $this->createNavigation(1002603001, $request, $response));
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
* @param mixed $data Generic data
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function viewPrivateSupportDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
||||||
|
{
|
||||||
|
$view = new View($this->app, $request, $response);
|
||||||
|
$view->setTemplate('/Modules/Support/Theme/backend/user-support-dashboard');
|
||||||
|
$view->addData('nav', $this->createNavigation(1002603001, $request, $response));
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param int $pageId Page/parent Id for navigation
|
||||||
|
* @param RequestAbstract $request Request
|
||||||
|
* @param ResponseAbstract $response Response
|
||||||
|
*
|
||||||
|
* @return RenderableInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
private function createNavigation(\int $pageId, RequestAbstract $request, ResponseAbstract $response)
|
||||||
|
{
|
||||||
|
$nav = Navigation::getInstance($request, $this->app->dbPool);
|
||||||
|
$navView = new NavigationView($this->app, $request, $response);
|
||||||
|
$navView->setTemplate('/Modules/Navigation/Theme/backend/mid');
|
||||||
|
$navView->setNav($nav->getNav());
|
||||||
|
$navView->setLanguage($request->getL11n()->language);
|
||||||
|
$navView->setParent($pageId);
|
||||||
|
|
||||||
|
return $navView;
|
||||||
|
}
|
||||||
|
}
|
||||||
164
Models/Issue.php
Normal file
164
Models/Issue.php
Normal file
|
|
@ -0,0 +1,164 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support;
|
||||||
|
|
||||||
|
use phpOMS\Pattern\Multition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issue class.
|
||||||
|
*
|
||||||
|
* @category Support
|
||||||
|
* @package Framework
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Issue implements Multition
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $name = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created.
|
||||||
|
*
|
||||||
|
* @var \DateTime
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $created = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creator.
|
||||||
|
*
|
||||||
|
* @var \int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $creator = null;
|
||||||
|
|
||||||
|
private static $instances = [];
|
||||||
|
|
||||||
|
public function __construct($id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInstance($id)
|
||||||
|
{
|
||||||
|
if (!isset(self::$instances[$id])) {
|
||||||
|
self::$instances[$id] = new self($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$instances[$id];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function init($id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function __clone()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCreated()
|
||||||
|
{
|
||||||
|
return $this->created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCreated($created)
|
||||||
|
{
|
||||||
|
$this->created = $created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCreator()
|
||||||
|
{
|
||||||
|
return $this->creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCreator($creator)
|
||||||
|
{
|
||||||
|
$this->creator = $creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function serialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function unserialize($data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
178
Models/Message.php
Normal file
178
Models/Message.php
Normal file
|
|
@ -0,0 +1,178 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support;
|
||||||
|
|
||||||
|
use phpOMS\Pattern\Multition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issue class.
|
||||||
|
*
|
||||||
|
* @category Support
|
||||||
|
* @package Framework
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
class Message implements Multition
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $name = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description.
|
||||||
|
*
|
||||||
|
* @var \string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $description = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created.
|
||||||
|
*
|
||||||
|
* @var \Datetime
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $created = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creator.
|
||||||
|
*
|
||||||
|
* @var \int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private $creator = null;
|
||||||
|
|
||||||
|
private static $instances = [];
|
||||||
|
|
||||||
|
public function __construct($id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getInstance($id)
|
||||||
|
{
|
||||||
|
if (!isset(self::$instances[$id])) {
|
||||||
|
self::$instances[$id] = new self($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$instances[$id];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId()
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName()
|
||||||
|
{
|
||||||
|
return $this->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setName($name)
|
||||||
|
{
|
||||||
|
$this->name = $name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCreated()
|
||||||
|
{
|
||||||
|
return $this->created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCreated($created)
|
||||||
|
{
|
||||||
|
$this->created = $created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getCreator()
|
||||||
|
{
|
||||||
|
return $this->creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setCreator($creator)
|
||||||
|
{
|
||||||
|
$this->creator = $creator;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function delete()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function serialize()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function unserialize($data)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init object by ID.
|
||||||
|
*
|
||||||
|
* This usually happens from DB or cache
|
||||||
|
*
|
||||||
|
* @param \int $id Object ID
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function init($id)
|
||||||
|
{
|
||||||
|
// TODO: Implement init() method.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Overwriting clone in order to maintain singleton pattern.
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
*/
|
||||||
|
public function __clone()
|
||||||
|
{
|
||||||
|
// TODO: Implement __clone() method.
|
||||||
|
}
|
||||||
|
}
|
||||||
44
Models/SupportStatus.php
Normal file
44
Models/SupportStatus.php
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?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
|
||||||
|
*/
|
||||||
|
namespace Modules\Support;
|
||||||
|
|
||||||
|
use phpOMS\Datatypes\Enum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support status enum.
|
||||||
|
*
|
||||||
|
* @category Support
|
||||||
|
* @package Framework
|
||||||
|
* @author OMS Development Team <dev@oms.com>
|
||||||
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link http://orange-management.com
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
abstract class SupportStatus extends Enum
|
||||||
|
{
|
||||||
|
const OPEN = 0;
|
||||||
|
|
||||||
|
const REVIEW = 1;
|
||||||
|
|
||||||
|
const LIVE = 2;
|
||||||
|
|
||||||
|
const UNSOLVABLE = 3;
|
||||||
|
|
||||||
|
const SOLVED = 4;
|
||||||
|
|
||||||
|
const CLOSED = 5;
|
||||||
|
}
|
||||||
34
Theme/backend/support-list.tpl.php
Normal file
34
Theme/backend/support-list.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-100">
|
||||||
|
<table class="table">
|
||||||
|
<caption><?= $this->l11n->lang['Support']['Tickets']; ?></caption>
|
||||||
|
<thead>
|
||||||
|
<tr><td><?= $this->l11n->lang[0]['ID']; ?>
|
||||||
|
<td><?= $this->l11n->lang['Support']['Status']; ?>
|
||||||
|
<td><?= $this->l11n->lang['Support']['Priority']; ?>
|
||||||
|
<td class="full"><?= $this->l11n->lang['Support']['Title']; ?>
|
||||||
|
<td><?= $this->l11n->lang['Support']['Responsible']; ?>
|
||||||
|
<tfoot>
|
||||||
|
<tbody>
|
||||||
|
<tr><td colspan="5" class="empty"><?= $this->l11n->lang[0]['Empty']; ?>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
1
Theme/backend/user-support-dashboard.tpl.php
Normal file
1
Theme/backend/user-support-dashboard.tpl.php
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
|
||||||
55
Theme/lang/backend.en.lang.php
Normal file
55
Theme/lang/backend.en.lang.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?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['Support'] = [
|
||||||
|
'Account' => 'Account',
|
||||||
|
'All' => 'All',
|
||||||
|
'AverageProcessTime' => 'Avg. Process Time',
|
||||||
|
'AverageAmount' => 'Average Amount',
|
||||||
|
'Created' => 'Created',
|
||||||
|
'Creator' => 'Creator',
|
||||||
|
'Day' => 'Day',
|
||||||
|
'Due' => 'Due',
|
||||||
|
'Forwarded' => 'Forwarded',
|
||||||
|
'From' => 'From',
|
||||||
|
'Group' => 'Group',
|
||||||
|
'Interval' => 'Interval',
|
||||||
|
'InTime' => 'In Time',
|
||||||
|
'Message' => 'Message',
|
||||||
|
'Media' => 'Media',
|
||||||
|
'Month' => 'Month',
|
||||||
|
'Name' => 'Name',
|
||||||
|
'New' => 'New',
|
||||||
|
'Open' => 'Open',
|
||||||
|
'Person' => 'Person',
|
||||||
|
'Priority' => 'Priority',
|
||||||
|
'Received' => 'Received',
|
||||||
|
'Receiver' => 'Receiver',
|
||||||
|
'Redirected' => 'Redirected',
|
||||||
|
'Responsible' => 'Responsible',
|
||||||
|
'Select' => 'Select',
|
||||||
|
'Settings' => 'Settings',
|
||||||
|
'Size' => 'Size',
|
||||||
|
'Statistics' => 'Statistics',
|
||||||
|
'Status' => 'Status',
|
||||||
|
'Support' => 'Support',
|
||||||
|
'Tickets' => 'Tickets',
|
||||||
|
'Title' => 'Title',
|
||||||
|
'To' => 'To',
|
||||||
|
'Today' => 'Today',
|
||||||
|
'Type' => 'Type',
|
||||||
|
'Week' => 'Week',
|
||||||
|
'Year' => 'Year',
|
||||||
|
];
|
||||||
19
Theme/lang/nav.backend.en.lang.php
Normal file
19
Theme/lang/nav.backend.en.lang.php
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?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'] = [
|
||||||
|
'Support' => 'Support',
|
||||||
|
'Ticket' => 'Ticket',
|
||||||
|
];
|
||||||
BIN
img/module_teaser_small.png
Normal file
BIN
img/module_teaser_small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
53
info.json
Normal file
53
info.json
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"name": {
|
||||||
|
"id": 1002900000,
|
||||||
|
"internal": "Support",
|
||||||
|
"external": "OMS Support"
|
||||||
|
},
|
||||||
|
"version": "1.0.0",
|
||||||
|
"requirements": {
|
||||||
|
"phpOMS": "1.0.0",
|
||||||
|
"phpOMS-db": "1.0.0"
|
||||||
|
},
|
||||||
|
"creator": {
|
||||||
|
"name": "Orange Management",
|
||||||
|
"website": "www.spl1nes.com"
|
||||||
|
},
|
||||||
|
"description": "Support module.",
|
||||||
|
"directory": "Support",
|
||||||
|
"dependencies": {},
|
||||||
|
"providing": {
|
||||||
|
"Navigation": "*"
|
||||||
|
},
|
||||||
|
"load": [
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"165b4fe348524450aa8471c275ea8f685856e196",
|
||||||
|
"90604e24f45665d3036937960efcc695dfd6e149"
|
||||||
|
],
|
||||||
|
"type": 4,
|
||||||
|
"for": 0,
|
||||||
|
"from": "Support",
|
||||||
|
"file": "Support"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"754a08ddf8bcb1cf22f310f09206dd783d42f7dd"
|
||||||
|
],
|
||||||
|
"type": 5,
|
||||||
|
"from": "Support",
|
||||||
|
"for": "Navigation",
|
||||||
|
"file": "nav.backend"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pid": [
|
||||||
|
"165b4fe348524450aa8471c275ea8f685856e196",
|
||||||
|
"90604e24f45665d3036937960efcc695dfd6e149"
|
||||||
|
],
|
||||||
|
"type": 5,
|
||||||
|
"for": "Content",
|
||||||
|
"file": "backend",
|
||||||
|
"from": "Support"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user