Skip to content
Snippets Groups Projects
Verified Commit b1f42551 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[FEATURE] Add preselection feature of options (list view)

parent 41b8a801
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,6 @@ use TYPO3\CMS\Core\Utility\PathUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Http\ForwardResponse;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException;
use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException;
use TYPO3\CMS\Extbase\Persistence\Exception\IllegalObjectTypeException;
use TYPO3\CMS\Extbase\Property\Exception\TypeConverterException;
......@@ -247,6 +246,21 @@ class JoblistController extends ActionController {
$this->view->assign('selectedExperienceLevel', $filters['filterExperienceLevel'] ?? '');
$this->view->assign('selectedFunction', $filters['filterFunction'] ?? '');
$this->view->assign('selectedRemote', $filters['filterRemote'] ?? '');
} else {
if (isset($this->settings['preselectedLocation']) && $this->settings['preselectedLocation']) {
$this->view->assign('selectedLocation', $this->settings['preselectedLocation']);
$filters['filterLocation'] = $this->settings['preselectedLocation'];
}
if (isset($this->settings['preselectedDepartment']) && $this->settings['preselectedDepartment']) {
$this->view->assign('selectedDepartment', $this->settings['preselectedDepartment']);
$filters['filterDepartment'] = $this->settings['preselectedDepartment'];
}
if (isset($this->settings['preselectedExperienceLevel']) && $this->settings['preselectedExperienceLevel']) {
$this->view->assign('selectedExperienceLevel', $this->settings['preselectedExperienceLevel']);
$filters['filterExperienceLevel'] = $this->settings['preselectedExperienceLevel'];
}
}
$filters['filterByDepartment'] = $this->settings['filterByDepartment'] ?? '';
......@@ -436,7 +450,6 @@ class JoblistController extends ActionController {
['code' => PageAccessFailureReasons::PAGE_NOT_FOUND]
);
throw new ImmediateResponseException($response, 1741779370);
}
......
......@@ -69,9 +69,6 @@
<label>
LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.teaser_locations
</label>
<description>
LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.teaser_locations.description
</description>
<config>
<type>select</type>
<renderType>selectMultipleSideBySide</renderType>
......@@ -117,6 +114,57 @@
</foreign_table_where>
</config>
</settings.filterByExperienceLevel>
<settings.preselectedLocation>
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.preselectedLocation</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items>
<numIndex index="0">
<numIndex index="0">--</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
</items>
<foreign_table>tx_sgjobs_domain_model_company</foreign_table>
<foreign_table_where>AND tx_sgjobs_domain_model_company.sys_language_uid IN (0,-1) ORDER BY tx_sgjobs_domain_model_company.name ASC</foreign_table_where>
</config>
</TCEforms>
</settings.preselectedLocation>
<settings.preselectedDepartment>
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_department.preselectedDepartment</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items>
<numIndex index="0">
<numIndex index="0">--</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
</items>
<foreign_table>tx_sgjobs_domain_model_department</foreign_table>
<foreign_table_where>AND tx_sgjobs_domain_model_department.sys_language_uid IN (0,-1) ORDER BY tx_sgjobs_domain_model_department.title ASC</foreign_table_where>
</config>
</TCEforms>
</settings.preselectedDepartment>
<settings.preselectedExperienceLevel>
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.preselectedExperienceLevel</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items>
<numIndex index="0">
<numIndex index="0">--</numIndex>
<numIndex index="1">0</numIndex>
</numIndex>
</items>
<foreign_table>tx_sgjobs_domain_model_experience_level</foreign_table>
<foreign_table_where>AND tx_sgjobs_domain_model_experience_level.sys_language_uid IN (0,-1) ORDER BY tx_sgjobs_domain_model_experience_level.sorting ASC</foreign_table_where>
</config>
</TCEforms>
</settings.preselectedExperienceLevel>
</el>
</ROOT>
</sDEF>
......
......@@ -561,6 +561,18 @@
<source><![CDATA[Location]]></source>
<target><![CDATA[Arbeitsort]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.preselectedLocation">
<source><![CDATA[Preselected Location]]></source>
<target><![CDATA[Vorausgewählter Arbeitsort]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department.preselectedDepartment">
<source><![CDATA[Preselected Department]]></source>
<target><![CDATA[Vorausgewählter Bereich]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.preselectedExperienceLevel">
<source><![CDATA[Preselected Experience Level]]></source>
<target><![CDATA[Vorausgewählter Erfahrungslevel]]></target>
</trans-unit>
</body>
</file>
</xliff>
......@@ -429,6 +429,15 @@
<trans-unit id="tx_sgjobs_domain_model_location.location">
<source><![CDATA[Location]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.preselectedLocation">
<source><![CDATA[Preselected Location]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department.preselectedDepartment">
<source><![CDATA[Preselected Department]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.preselectedExperienceLevel">
<source><![CDATA[Preselected Experience Level]]></source>
</trans-unit>
</body>
</file>
</xliff>
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