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

Merge branch 'feature_experienceLevelFilter' into 'master'

Feature experience level filter

See merge request !22
parents eede3ffe 6c3f9a42
No related branches found
No related tags found
1 merge request!22Feature experience level filter
......@@ -179,6 +179,12 @@ class JoblistController extends ActionController {
// get all jobs for the current page
$ordering = (int) $frontendPluginSettings['orderBy'];
$experienceLevel = (int) $frontendPluginSettings['filterByExperienceLevel'];
if ($experienceLevel !== 0) {
$filters['filterExperienceLevel'] = $experienceLevel;
}
$this->jobRepository->setAllowManualSorting((bool) $isManualSortingAllowed);
$jobs = $this->jobRepository->findJobsByFilter($filters, $jobLimit, $offset, $ordering)->toArray();
......
......@@ -26,7 +26,9 @@ namespace SGalinski\SgJobs\Domain\Model;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use TYPO3\CMS\Extbase\Domain\Model\FileReference;
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
/**
* The Contact model
......@@ -77,6 +79,12 @@ class Contact extends AbstractEntity {
*/
protected $hideInFrontend = FALSE;
/**
* @lazy
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
protected $image;
/**
* @return string
*/
......@@ -202,4 +210,22 @@ class Contact extends AbstractEntity {
public function setStreet($street) {
$this->street = $street;
}
/**
* @param FileReference $image
*/
public function setImage(FileReference $image): void {
$this->image = $image;
}
/**
* @return FileReference
*/
public function getImage(): ?FileReference {
if ($this->image instanceof LazyLoadingProxy) {
$this->image->_loadRealInstance();
}
return $this->image;
}
}
......@@ -60,6 +60,23 @@
</config>
</TCEforms>
</settings.orderBy>
<settings.filterByExperienceLevel>
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.experienceLevel</label>
<config>
<type>select</type>
<renderType>selectSingle</renderType>
<items type="array">
<numIndex index="0">
<numIndex index="0">LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.experienceLevel_all</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.filterByExperienceLevel>
</el>
</ROOT>
</sDEF>
......
......@@ -53,12 +53,12 @@ return call_user_func(
'iconfile' => 'EXT:' . $extKey . '/Resources/Public/Icons/' . $table . '.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, first_name, last_name, street, city, zip, email, phone, hide_in_frontend',
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, first_name, last_name, street, city, zip, email, phone, image, hide_in_frontend',
],
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden,
hide_in_frontend, title, first_name, last_name, street, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts],
hide_in_frontend, title, first_name, last_name, image, street, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts],
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
],
],
......@@ -181,6 +181,19 @@ return call_user_func(
'eval' => 'trim, required'
],
],
'image' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'image', [
'appearance' => [
'useSortable' => TRUE,
],
'minitems' => 0,
'maxitems' => 1,
]
),
],
'street' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.street',
......
......@@ -101,7 +101,7 @@
<source><![CDATA[Locations]]></source>
<target><![CDATA[Arbeitsorte]]></target>
</trans-unit>
<trans-unit id="backend.filters.locations.description" approved="yes" xml:space="preserve">
<trans-unit id="backend.filters.locations.description" approved="yes">
<source><![CDATA[(Use the ctrl or cmd keys to deselect an option or to select multiple options) ]]></source>
<target><![CDATA[Benutze die STRG oder CMD-Tasten, um eine Option abzuwählen oder mehrere anzuwählen
]]></target>
......@@ -174,6 +174,10 @@
<source><![CDATA[Location *]]></source>
<target><![CDATA[Standort *]]></target>
</trans-unit>
<trans-unit id="frontend.apply.contact" approved="yes">
<source><![CDATA[Your contact]]></source>
<target><![CDATA[Dein Kontakt]]></target>
</trans-unit>
<trans-unit id="frontend.apply.country" approved="yes">
<source><![CDATA[Country *]]></source>
<target><![CDATA[Land *]]></target>
......@@ -258,6 +262,10 @@
<source><![CDATA[privacy policy]]></source>
<target><![CDATA[Datenschutzinformationen]]></target>
</trans-unit>
<trans-unit id="frontend.apply.recommend" approved="yes">
<source><![CDATA[Recommend job]]></source>
<target><![CDATA[Stelle weiterempfehlen]]></target>
</trans-unit>
<trans-unit id="frontend.apply.salutation" approved="yes">
<source><![CDATA[Salutation]]></source>
<target><![CDATA[Anrede]]></target>
......@@ -302,10 +310,6 @@
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="frontend.experienceLevel" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="frontend.description" approved="yes">
<source><![CDATA[Description]]></source>
<target><![CDATA[Beschreibung]]></target>
......@@ -322,10 +326,18 @@
<source><![CDATA[Apply by email]]></source>
<target><![CDATA[Bewerbung per Mail]]></target>
</trans-unit>
<trans-unit id="frontend.emailContact" approved="yes">
<source><![CDATA[Email Contact]]></source>
<target><![CDATA[E-Mail-Kontakt]]></target>
</trans-unit>
<trans-unit id="frontend.entry_date" approved="yes">
<source><![CDATA[Entry date]]></source>
<target><![CDATA[Eintrittsdatum]]></target>
</trans-unit>
<trans-unit id="frontend.experienceLevel" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="frontend.filter.companies" approved="yes">
<source><![CDATA[Company]]></source>
<target><![CDATA[Unternehmen]]></target>
......@@ -390,10 +402,6 @@
<source><![CDATA[Vacancies worldwide]]></source>
<target><![CDATA[Offene Stellen weltweit]]></target>
</trans-unit>
<trans-unit id="frontend.emailContact">
<source><![CDATA[Email Contact]]></source>
<target><![CDATA[E-Mail-Kontakt]]></target>
</trans-unit>
</body>
</file>
</xliff>
......@@ -77,10 +77,6 @@
<source><![CDATA[City]]></source>
<target><![CDATA[Stadt]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state" approved="yes">
<source><![CDATA[State]]></source>
<target><![CDATA[Bundesland]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.country" approved="yes">
<source><![CDATA[Country]]></source>
<target><![CDATA[Land]]></target>
......@@ -101,6 +97,10 @@
<source><![CDATA[Name]]></source>
<target><![CDATA[Name]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state" approved="yes">
<source><![CDATA[State]]></source>
<target><![CDATA[Bundesland]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.street" approved="yes">
<source><![CDATA[Street]]></source>
<target><![CDATA[Straße]]></target>
......@@ -129,6 +129,10 @@
<source><![CDATA[Hide contact information on the website -> obsolete, will be overwritten by Job settings]]></source>
<target><![CDATA[Kontaktinformationen auf Website ausblenden -> obsolet, wird von Job settings überschrieben]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_contact.image" approved="yes">
<source><![CDATA[Image]]></source>
<target><![CDATA[Bild]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_contact.last_name" approved="yes">
<source><![CDATA[Last name]]></source>
<target><![CDATA[Nachname]]></target>
......@@ -153,14 +157,14 @@
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_experience_level" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department.title" approved="yes">
<source><![CDATA[Title]]></source>
<target><![CDATA[Titel]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_experience_level" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_experience_level.title" approved="yes">
<source><![CDATA[Title]]></source>
<target><![CDATA[Titel]]></target>
......@@ -213,14 +217,6 @@
<source><![CDATA[--Please choose--]]></source>
<target><![CDATA[--Bitte wählen--]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level.none" approved="yes">
<source><![CDATA[--Please choose--]]></source>
<target><![CDATA[--Bitte wählen--]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.description" approved="yes">
<source><![CDATA[Job description]]></source>
<target><![CDATA[Beschreibung]]></target>
......@@ -261,6 +257,22 @@
<source><![CDATA[Volunteer]]></source>
<target><![CDATA[Freiwillig]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experienceLevel" approved="yes">
<source><![CDATA[Experience Level Filter]]></source>
<target><![CDATA[Filter nach Berufserfahrung]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experienceLevel_all" approved="yes">
<source><![CDATA[All]]></source>
<target><![CDATA[Alle]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level" approved="yes">
<source><![CDATA[Experience Level]]></source>
<target><![CDATA[Erfahrung]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level.none" approved="yes">
<source><![CDATA[--Please choose--]]></source>
<target><![CDATA[--Bitte wählen--]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.featuredOffer" approved="yes">
<source><![CDATA[Featured Offer (will always show up in the job offer teaser)]]></source>
<target><![CDATA[Diese Stellenausschreibung in jedem Job-Teaser anzeigen]]></target>
......
......@@ -132,6 +132,9 @@
<trans-unit id="frontend.apply.company">
<source><![CDATA[Location *]]></source>
</trans-unit>
<trans-unit id="frontend.apply.contact">
<source><![CDATA[Your contact]]></source>
</trans-unit>
<trans-unit id="frontend.apply.country">
<source><![CDATA[Country *]]></source>
</trans-unit>
......@@ -195,6 +198,9 @@
<trans-unit id="frontend.apply.privacyPolicy.link">
<source><![CDATA[privacy policy]]></source>
</trans-unit>
<trans-unit id="frontend.apply.recommend">
<source><![CDATA[Recommend job]]></source>
</trans-unit>
<trans-unit id="frontend.apply.salutation">
<source><![CDATA[Salutation]]></source>
</trans-unit>
......@@ -228,9 +234,6 @@
<trans-unit id="frontend.department">
<source><![CDATA[Department]]></source>
</trans-unit>
<trans-unit id="frontend.experienceLevel">
<source><![CDATA[Experience Level]]></source>
</trans-unit>
<trans-unit id="frontend.description">
<source><![CDATA[Description]]></source>
</trans-unit>
......@@ -243,9 +246,15 @@
<trans-unit id="frontend.email">
<source><![CDATA[Apply by email]]></source>
</trans-unit>
<trans-unit id="frontend.emailContact">
<source><![CDATA[Email Contact]]></source>
</trans-unit>
<trans-unit id="frontend.entry_date">
<source><![CDATA[Entry date]]></source>
</trans-unit>
<trans-unit id="frontend.experienceLevel">
<source><![CDATA[Experience Level]]></source>
</trans-unit>
<trans-unit id="frontend.filter.companies">
<source><![CDATA[Company]]></source>
</trans-unit>
......@@ -294,9 +303,6 @@
<trans-unit id="frontend.teaserHeadline">
<source><![CDATA[Vacancies worldwide]]></source>
</trans-unit>
<trans-unit id="frontend.emailContact">
<source><![CDATA[Email Contact]]></source>
</trans-unit>
</body>
</file>
</xliff>
......@@ -60,9 +60,6 @@
<trans-unit id="tx_sgjobs_domain_model_company.city">
<source><![CDATA[City]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state">
<source><![CDATA[State]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.country">
<source><![CDATA[Country]]></source>
</trans-unit>
......@@ -78,6 +75,9 @@
<trans-unit id="tx_sgjobs_domain_model_company.name">
<source><![CDATA[Name]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.state">
<source><![CDATA[State]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.street">
<source><![CDATA[Street]]></source>
</trans-unit>
......@@ -102,6 +102,9 @@
<trans-unit id="tx_sgjobs_domain_model_contact.hide_in_frontend">
<source><![CDATA[Hide contact information on the website -> obsolete, will be overwritten by Job settings]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_contact.image">
<source><![CDATA[Image]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_contact.last_name">
<source><![CDATA[Last name]]></source>
</trans-unit>
......@@ -165,12 +168,6 @@
<trans-unit id="tx_sgjobs_domain_model_job.department.none">
<source><![CDATA[--Please choose--]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level">
<source><![CDATA[Experience Level]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level.none">
<source><![CDATA[--Please choose--]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.description">
<source><![CDATA[Job description]]></source>
</trans-unit>
......@@ -201,6 +198,18 @@
<trans-unit id="tx_sgjobs_domain_model_job.employment_types.volunteer">
<source><![CDATA[Volunteer]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experienceLevel">
<source><![CDATA[Experience Level Filter]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experienceLevel_all">
<source><![CDATA[All]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level">
<source><![CDATA[Experience Level]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.experience_level.none">
<source><![CDATA[--Please choose--]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.featuredOffer">
<source><![CDATA[Featured Offer (will always show up in the job offer teaser)]]></source>
</trans-unit>
......
{namespace h=SGalinski\SgJobs\ViewHelpers}
{namespace base=SGalinski\ProjectBase\ViewHelpers}
<f:layout name="Default" />
<f:section name="main">
......@@ -75,9 +76,29 @@
</a>
</div>
</div>
</div>
<f:if condition="{job.attachment}">
<div class="col-md-4 col-sm-6 col-xs-12">
<f:if condition="{job.contact}">
<div class="highlight-box bg-card sgjobs-meta-box">
<div class="default-content-element sg-jobs-contact-box">
<div class="sg-jobs-contact-box__text">
<p class="h4"><f:translate key="frontend.apply.contact" /></p>
{job.contact.firstName} {job.contact.lastName}
{job.contact.phone}
{job.contact.email}
</div>
<f:if condition="{job.contact.image}">
<div class="sg-jobs-contact-box__image">
<f:image image="{job.contact.image}" />
</div>
</f:if>
</div>
<hr>
<div class="default-content-element sgjobs-social-sharer">
<p class="h4"><f:translate key="frontend.apply.recommend" /></p>
<base:sharer />
</div>
</div>
</f:if>
<f:if condition="{job.attachment}">
<div class="highlight-box bg-card sgjobs-meta-box">
<div class="default-content-element downloads">
<f:link.typolink target="_blank" parameter="{job.attachment.0.originalResource.publicUrl}" class="download-link">
......@@ -90,8 +111,8 @@
</f:link.typolink>
</div>
</div>
</div>
</f:if>
</f:if>
</div>
</div>
</div>
</div>
......
......@@ -205,6 +205,7 @@ CREATE TABLE tx_sgjobs_domain_model_contact (
zip varchar(255) DEFAULT '' NOT NULL,
email varchar(255) DEFAULT '' NOT NULL,
phone varchar(255) DEFAULT '' NOT NULL,
image int(11) unsigned DEFAULT '0',
hide_in_frontend tinyint(4) unsigned DEFAULT '0' NOT NULL,
-- TYPO3 fields
......
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