Skip to content
Snippets Groups Projects
Commit c72e600d authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

[TASK] add limit for automatic related jobs

parent eb917b54
No related branches found
No related tags found
No related merge requests found
......@@ -336,8 +336,9 @@ class JoblistController extends ActionController {
}
$this->view->assign('job', $job);
$enableAutomaticRelatedJobs = (bool) $this->settings['enableAutomaticRelatedJobs'];
$automaticRelatedJobsLimit = (int) $this->settings['automaticRelatedJobsLimit'];
if ($enableAutomaticRelatedJobs) {
$relatedJobs = $this->jobRepository->findRelated($job);
$relatedJobs = $this->jobRepository->findRelated($job, $automaticRelatedJobsLimit);
$this->view->assign('relatedJobs', $relatedJobs);
}
} else {
......
......@@ -27,5 +27,7 @@ plugin.tx_sgjobs {
disallowUnsolicitedApplication = 0
# cat=plugin.tx_sgjobs/other; type=int+; If set to 1, the (automatic) output of related jobs (in regards to the location/department) is enabled
enableAutomaticRelatedJobs = 1
# cat=plugin.tx_sgjobs/other; type=int+; Limits the amount of the rendered (automatic) related jobs on the apply form page
automaticRelatedJobsLimit = 8
}
}
......@@ -26,6 +26,7 @@ plugin.tx_sgjobs {
offersPage = {$plugin.tx_sgjobs.settings.offersPage}
disallowUnsolicitedApplication = {$plugin.tx_sgjobs.settings.disallowUnsolicitedApplication}
enableAutomaticRelatedJobs = {$plugin.tx_sgjobs.settings.enableAutomaticRelatedJobs}
automaticRelatedJobsLimit = {$plugin.tx_sgjobs.settings.automaticRelatedJobsLimit}
}
features {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment