diff --git a/Classes/Controller/CalendarController.php b/Classes/Controller/CalendarController.php index ad33f6f2..e6ccfeb4 100644 --- a/Classes/Controller/CalendarController.php +++ b/Classes/Controller/CalendarController.php @@ -288,9 +288,11 @@ public function shortcutAction() return 'Invalid object'; } - $fetchEvent = $this->indexRepository->findByEventTraversing($event, true, false, 1); + $limitEvents = (int)$this->settings['shortcutLimitEvents']; + + $fetchEvent = $this->indexRepository->findByEventTraversing($event, true, false, $limitEvents); if (\count($fetchEvent) <= 0) { - $fetchEvent = $this->indexRepository->findByEventTraversing($event, false, true, 1, QueryInterface::ORDER_DESCENDING); + $fetchEvent = $this->indexRepository->findByEventTraversing($event, false, true, $limitEvents, QueryInterface::ORDER_DESCENDING); } $this->view->assignMultiple([ diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 6ca45b1f..8bcd89f9 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -34,6 +34,9 @@ plugin.tx_calendarize { # cat=calendarize//0110; type=int+; label=Default detail PID: Default detail PID for e.g. the Insert record TS configuration defaultDetailPid = 0 + # cat=calendarize//0130; type=int+; label=Shortcut limit events: The amount of events that are selected in the shortcut view. Keep in mind, that future and past are selected separated. + shortcutLimitEvents = 1 + feed { # cat=calendarize//0080; type=string; label=Title of the Feed: The feed title for atom and xml/rss title = Title of the feed diff --git a/Configuration/TypoScript/setup.typoscript b/Configuration/TypoScript/setup.typoscript index 46f2c861..bf9bba16 100644 --- a/Configuration/TypoScript/setup.typoscript +++ b/Configuration/TypoScript/setup.typoscript @@ -11,6 +11,7 @@ plugin.tx_calendarize { listStartTimeOffsetHours = {$plugin.tx_calendarize.settings.listStartTimeOffsetHours} searchEndModifier = {$plugin.tx_calendarize.settings.searchEndModifier} defaultDetailPid = {$plugin.tx_calendarize.settings.defaultDetailPid} + shortcutLimitEvents = {$plugin.tx_calendarize.settings.shortcutLimitEvents} paginateConfiguration { itemsPerPage = 10