diff --git a/Controller/BackendController.php b/Controller/BackendController.php index 7429252..85e5336 100644 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -15,7 +15,7 @@ declare(strict_types=1); namespace Modules\Calendar\Controller; use Modules\Calendar\Models\CalendarMapper; - +use Modules\Dashboard\Models\DashboardElementInterface; use phpOMS\Asset\AssetType; use phpOMS\Contract\RenderableInterface; use phpOMS\Message\RequestAbstract; @@ -30,8 +30,13 @@ use phpOMS\Views\View; * @license OMS License 1.0 * @link https://orange-management.org * @since 1.0.0 + * + * @todo Orange-Management/Modules#52 + * Allow user to define start of week + * Weeks should be customizable. Some prefer the week to start on Monday, others on Sunday etc. + * This is probably a global setting in the backend or user localization! */ -final class BackendController extends Controller +final class BackendController extends Controller implements DashboardElementInterface { /** * Routing end-point for application behaviour. @@ -67,16 +72,7 @@ final class BackendController extends Controller } /** - * Routing end-point for application behaviour. - * - * @param RequestAbstract $request Request - * @param ResponseAbstract $response Response - * @param mixed $data Generic data - * - * @return RenderableInterface - * - * @since 1.0.0 - * @codeCoverageIgnore + * {@inheritdoc} */ public function viewDashboard(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface { diff --git a/Models/CalendarMapper.php b/Models/CalendarMapper.php index 5fb4c31..7e78799 100644 --- a/Models/CalendarMapper.php +++ b/Models/CalendarMapper.php @@ -9,7 +9,10 @@ * @license OMS License 1.0 * @version 1.0.0 * @link https://orange-management.org - * @todo only load events of 3 month or 1 year?! + * + * @todo Orange-Management/Modules#191 + * When showing a calendar the default behavior should be to only load a fixed amount of months in order to avoid unnecessary overhead. + * Maybe only load the current month, the next month and the previous month. */ declare(strict_types=1); @@ -27,14 +30,6 @@ use phpOMS\DataStorage\Database\DataMapperAbstract; */ final class CalendarMapper extends DataMapperAbstract { - /** - * Class name. - * - * @var string - * @since 1.0.0 - */ - protected static $CLASS = __CLASS__; - /** * Columns. * diff --git a/Theme/Backend/calendar-dashboard.tpl.php b/Theme/Backend/calendar-dashboard.tpl.php index 223c83c..2660eb0 100644 --- a/Theme/Backend/calendar-dashboard.tpl.php +++ b/Theme/Backend/calendar-dashboard.tpl.php @@ -1,4 +1,10 @@ getData('calendar'); ?>
diff --git a/Theme/Backend/dashboard-calendar.tpl.php b/Theme/Backend/dashboard-calendar.tpl.php index 4864065..3287925 100644 --- a/Theme/Backend/dashboard-calendar.tpl.php +++ b/Theme/Backend/dashboard-calendar.tpl.php @@ -12,6 +12,11 @@ */ declare(strict_types=1); +/** + * @todo Orange-Management/Modules#69 + * Create a popup when clicking on an event with full information. + */ + ?>
getData('calendar')->render($this->getData('cal')); ?>