From 74a93740fed50b5fbe12feec17ac7552929074b6 Mon Sep 17 00:00:00 2001 From: Christian Hackl Date: Mon, 24 Jun 2024 14:14:56 +0200 Subject: [PATCH] [FEATURE] added options for detail plugin fields: layout, jobsStorage, jobsListView --- Classes/Controller/JobpostController.php | 8 ++ .../FlexForms/hhsimplejobposts_jobsdetail.xml | 76 +++++++++++++++++++ .../FlexForms/hhsimplejobposts_jobslist.xml | 13 +++- Configuration/TCA/Overrides/tt_content.php | 11 ++- .../Private/Language/locallang_plugin.xlf | 17 +++++ Resources/Private/Templates/Jobpost/Show.html | 4 +- composer.json | 2 +- ext_emconf.php | 2 +- 8 files changed, 126 insertions(+), 7 deletions(-) create mode 100644 Configuration/FlexForms/hhsimplejobposts_jobsdetail.xml diff --git a/Classes/Controller/JobpostController.php b/Classes/Controller/JobpostController.php index 0beff6b..1720127 100644 --- a/Classes/Controller/JobpostController.php +++ b/Classes/Controller/JobpostController.php @@ -324,6 +324,14 @@ public function showAction(Jobpost $jobpost = null): ResponseInterface { $jobpost = $this->jobpostRepository->findByUid(intval($queryParams['tx_hhsimplejobposts_jobslist']['jobpost'])); } + $jobPostStorageString = isset($this->settings['jobsStorage']) ? $this->settings['jobsStorage'] : ''; + if(!empty($jobPostStorageString)) { + $jobPostStorageArray = \explode(',', $jobPostStorageString); + if(!in_array($jobpost->getPid(), $jobPostStorageArray)) { + $jobpost = []; + } + } + if(!empty($jobpost)) { $contactPointEmail = null; $contactPointTelephone = null; diff --git a/Configuration/FlexForms/hhsimplejobposts_jobsdetail.xml b/Configuration/FlexForms/hhsimplejobposts_jobsdetail.xml new file mode 100644 index 0000000..bb27639 --- /dev/null +++ b/Configuration/FlexForms/hhsimplejobposts_jobsdetail.xml @@ -0,0 +1,76 @@ + + + + + + Jobs Detail View + + array + + + + 1 + + + select + selectSingle + + + default + default + + + + + + + + + 1 + + + LLL:EXT:hh_simple_job_posts/Resources/Private/Language/locallang_plugin.xlf:settings.jobsStorage.description + + + group + db + pages + 3 + 10 + 0 + 1 + + + suggest + + + + + + + + + 1 + + + group + db + pages + 1 + 1 + 0 + 1 + + + + + + + + diff --git a/Configuration/FlexForms/hhsimplejobposts_jobslist.xml b/Configuration/FlexForms/hhsimplejobposts_jobslist.xml index 4c6a83a..aef2c55 100644 --- a/Configuration/FlexForms/hhsimplejobposts_jobslist.xml +++ b/Configuration/FlexForms/hhsimplejobposts_jobslist.xml @@ -9,6 +9,7 @@