diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 9d1a29d99412be99d50c9ef91297c30a42d213a2..19418c4315762ecb1bc39057ede505474f3cdf66 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -139,6 +139,7 @@ class JoblistController extends ActionController { $this->view->assign('selectedDepartment', $filters['filterDepartment']); $this->view->assign('selectedExperienceLevel', $filters['filterExperienceLevel']); $this->view->assign('selectedFunction', $filters['filterFunction']); + $this->view->assign('selectedRemote', $filters['filterRemote']); } $storagePid = (int) $this->configurationManager->getConfiguration( diff --git a/Classes/Domain/Repository/JobRepository.php b/Classes/Domain/Repository/JobRepository.php index 5908210c665c917c4b8b88d0ffd5321e3ec1b703..cda7e43036167c8b84d6387c3b9236b86f57cd32 100644 --- a/Classes/Domain/Repository/JobRepository.php +++ b/Classes/Domain/Repository/JobRepository.php @@ -222,6 +222,10 @@ class JobRepository extends Repository { $constraints[] = $query->equals('company.country', $filters['filterCountry']); } + if ($filters['filterRemote'] !== '' && $filters['filterRemote'] !== NULL) { + $constraints[] = $query->equals('telecommutePossible', TRUE); + } + if ($filters['filterLocation'] !== '0' && $filters['filterLocation'] !== NULL) { $constraints[] = $query->equals('company.city', $filters['filterLocation']); } diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index fb81d5f7c0c370e3989e12effb6764e0d99b600a..41029ee55546c18af43c7bd55f8d806daa6354a3 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -366,6 +366,10 @@ <source><![CDATA[Location]]></source> <target><![CDATA[Standort]]></target> </trans-unit> + <trans-unit id="frontend.filter.remote" approved="yes"> + <source><![CDATA[Show only jobs that can be executed remotely.]]></source> + <target><![CDATA[Zeige nur Stellen an, die remote ausgeführt werden können.]]></target> + </trans-unit> <trans-unit id="frontend.filter.selections.all" approved="yes"> <source><![CDATA[All]]></source> <target><![CDATA[Alle]]></target> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index e94e3d704e12ccfd279f5e1e8ea50f32b6b5a052..8fb1f5629d4750f5563cf96a194bd7f2a5345146 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -276,6 +276,9 @@ <trans-unit id="frontend.filter.locations"> <source><![CDATA[Location]]></source> </trans-unit> + <trans-unit id="frontend.filter.remote"> + <source><![CDATA[Show only jobs that can be executed remotely.]]></source> + </trans-unit> <trans-unit id="frontend.filter.selections.all"> <source><![CDATA[All]]></source> </trans-unit> diff --git a/Resources/Private/Language/zh.locallang.xlf b/Resources/Private/Language/zh.locallang.xlf index ce92a16468a68cff79538c9271391d09e066b4ba..a25adf0e709532d33096e631533c26c5023d23f2 100644 --- a/Resources/Private/Language/zh.locallang.xlf +++ b/Resources/Private/Language/zh.locallang.xlf @@ -213,6 +213,10 @@ <source><![CDATA[Location]]></source> <target><![CDATA[地点]]></target> </trans-unit> + <trans-unit id="frontend.filter.remote" approved="yes"> + <source><![CDATA[Show only jobs that can be executed remotely.]]></source> + <target><![CDATA[]]></target> + </trans-unit> <trans-unit id="frontend.filter.selections.all" approved="yes"> <source><![CDATA[All]]></source> <target><![CDATA[]]></target> diff --git a/Resources/Private/Partials/Filter.html b/Resources/Private/Partials/Filter.html index fdb69611c6be9c8f62d7856f86e55bd8009dc305..9c00602db470c787d90cc70bfab8e3a0399449ec 100644 --- a/Resources/Private/Partials/Filter.html +++ b/Resources/Private/Partials/Filter.html @@ -82,6 +82,22 @@ </div> </div> + <div class="row default-content-element"> + <div class="col-md-6 col-sm-6 col-cs-12"> + <div class="sgjobs-filter-checkbox-form-control"> + <f:form.checkbox + class="sgjobs-checkbox form-control" + property="filterRemote" + id="filter-remote" + value="remote" + checked="{selectedRemote}"/> + <label for="filter-remote"> + <f:translate key="frontend.filter.remote"/> + </label> + </div> + </div> + </div> + <div class="row default-content-element"> <div class="col-md-12 col-sm-12 col-cs-12"> <f:form.submit class="btn btn-md btn-primary" value="{f:translate(key:'frontend.filter.submit')}"/> diff --git a/Resources/Private/Templates/Joblist/Index.html b/Resources/Private/Templates/Joblist/Index.html index 8f1893686ec37dbcebd482b163a94e3f031f43bc..e3b830aaa42f32708a623058d5c4db60d8be3a38 100644 --- a/Resources/Private/Templates/Joblist/Index.html +++ b/Resources/Private/Templates/Joblist/Index.html @@ -8,7 +8,9 @@ partial="Filter" arguments="{recordPageId: recordPageId, filters: filters, countries: countries, cities: cities, companies: companies, departments: departments, experienceLevels: experienceLevels, functions: functions, selectedCountry: selectedCountry, selectedCompany: selectedCompany, - selectedLocation: selectedLocation, selectedDepartment: selectedDepartment, selectedExperienceLevel: selectedExperienceLevel, selectedFunction: selectedFunction, limit: limit}" + selectedLocation: selectedLocation, selectedDepartment: selectedDepartment, + selectedExperienceLevel: selectedExperienceLevel, selectedFunction: selectedFunction, selectedRemote: selectedRemote, + limit: limit }" /> <div class="row default-content-element equal-height-columns stretch-first-child"> diff --git a/Resources/Public/Sass/_sg-jobs.scss b/Resources/Public/Sass/_sg-jobs.scss index 72c8e622584a5bc36dd08cef13be9c186deb0b1e..033e4b027cc567a1c6b67e67645f259eaaf82150 100644 --- a/Resources/Public/Sass/_sg-jobs.scss +++ b/Resources/Public/Sass/_sg-jobs.scss @@ -150,3 +150,16 @@ } } } + +.sgjobs-filter-checkbox-form-control { + > label { + margin-left: 5px; + } +} + +.sgjobs-checkbox { + width: auto; + box-shadow: none; + display: inline; + height: 13px; +}