Skip to content
Snippets Groups Projects
Commit 953d975e authored by Michael Kessler's avatar Michael Kessler
Browse files

[FEATURE] Add remote filter

parent e7bb3b86
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
......@@ -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']);
}
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......
......@@ -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')}"/>
......
......@@ -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">
......
......@@ -150,3 +150,16 @@
}
}
}
.sgjobs-filter-checkbox-form-control {
> label {
margin-left: 5px;
}
}
.sgjobs-checkbox {
width: auto;
box-shadow: none;
display: inline;
height: 13px;
}
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