Skip to content
Snippets Groups Projects
Commit 97ec51a1 authored by Dominik Beyer's avatar Dominik Beyer
Browse files

[TASK] Add location field

parent 109fff69
No related branches found
No related tags found
No related merge requests found
......@@ -102,6 +102,11 @@ class Job extends AbstractEntity {
*/
protected $startDate = 0;
/**
* @var string $location
*/
protected $location = '';
/**
* @var int $sorting
*/
......@@ -339,6 +344,20 @@ class Job extends AbstractEntity {
$this->alternativeStartDate = $alternativeStartDate;
}
/**
* @return string
*/
public function getLocation() {
return $this->location;
}
/**
* @param string $location
*/
public function setLocation(string $location) {
$this->location = $location;
}
/**
* @return bool
*/
......
......@@ -36,7 +36,7 @@ $columns = [
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'searchFields' => 'title, job_id, path_segment, start_date, alternative_start_date, company, contact, department, experience_level',
'searchFields' => 'title, job_id, path_segment, start_date, alternative_start_date, location, company, contact, department, experience_level',
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
......@@ -56,7 +56,7 @@ $columns = [
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden, --palette--;;palette_title,
--palette--;;palette_title_start,
--palette--;;palette_title_start_location,
--palette--;;palette_apply_function,
department,
experience_level,
......@@ -80,7 +80,7 @@ $columns = [
'canNotCollapse' => 1,
],
'palette_title' => ['showitem' => 'title, path_segment, job_id', 'canNotCollapse' => 1],
'palette_title_start' => ['showitem' => 'start_date, alternative_start_date', 'canNotCollapse' => 1],
'palette_title_start_location' => ['showitem' => 'start_date, alternative_start_date, location', 'canNotCollapse' => 1],
'palette_apply_function' => ['showitem' => 'hide_apply_by_email, hide_apply_by_postal, featured_offer', 'canNotCollapse' => 1],
'palette_location_specifications' => ['showitem' => 'telecommute_possible, office_work_possible'],
'palette_seo_dates' => ['showitem' => 'date_posted, valid_through'],
......@@ -324,6 +324,15 @@ $columns = [
'eval' => 'trim'
],
],
'location' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.location',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'task' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.task',
......@@ -505,7 +514,7 @@ $columns = [
],
];
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '10.3.0', '<')) {
$columns['interface']['showRecordFieldList'] = 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, path_segment, job_id, department, experience_level, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date,company, task, qualification, description, contact, telecommute, employment_types, date_posted, valid_through, salary_currency, base_salary, max_salary, salary_unit';
$columns['interface']['showRecordFieldList'] = 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, path_segment, job_id, department, experience_level, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date, location, company, task, qualification, description, contact, telecommute, employment_types, date_posted, valid_through, salary_currency, base_salary, max_salary, salary_unit';
}
return $columns;
......@@ -378,7 +378,7 @@ $columns = [
],
];
if (version_compare(\TYPO3\CMS\Core\Utility\VersionNumberUtility::getCurrentTypo3Version(), '10.3.0', '<')) {
$columns['interface']['showRecordFieldList'] = 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, company, department, experience_level, start_date, alternative_start_date,company, task, qualification, description, contact, privacy_policy';
$columns['interface']['showRecordFieldList'] = 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, company, department, experience_level, start_date, alternative_start_date, location, company, task, qualification, description, contact, privacy_policy';
}
return $columns;
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-08-06T13:15:41Z">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2021-05-27T11:07:16Z">
<header>
<type>module</type>
<description>General language labels used in frontend and backend.</description>
......@@ -101,7 +101,7 @@
<source><![CDATA[Locations]]></source>
<target><![CDATA[Arbeitsorte]]></target>
</trans-unit>
<trans-unit id="backend.filters.locations.description" approved="yes">
<trans-unit id="backend.filters.locations.description" approved="yes" xml:space="preserve">
<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>
......@@ -390,6 +390,10 @@
<source><![CDATA[Location]]></source>
<target><![CDATA[Standort]]></target>
</trans-unit>
<trans-unit id="frontend.locationLabel" approved="yes">
<source><![CDATA[<b>Location:</b>]]></source>
<target><![CDATA[<b>Standort:</b>]]></target>
</trans-unit>
<trans-unit id="frontend.organisation" approved="yes">
<source><![CDATA[Organisation]]></source>
<target><![CDATA[Organisation]]></target>
......@@ -412,4 +416,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2019-08-06T13:15:41Z">
<file source-language="en" datatype="plaintext" original="messages" date="2021-05-27T11:07:16Z">
<header>
<type>module</type>
<description>General language labels used in frontend and backend.</description>
......@@ -294,6 +294,9 @@
<trans-unit id="frontend.location">
<source><![CDATA[Location]]></source>
</trans-unit>
<trans-unit id="frontend.locationLabel">
<source><![CDATA[<b>Location:</b>]]></source>
</trans-unit>
<trans-unit id="frontend.organisation">
<source><![CDATA[Organisation]]></source>
</trans-unit>
......@@ -311,4 +314,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" target-language="zh" datatype="plaintext" original="messages" date="2019-08-06T13:15:41Z">
<file source-language="en" target-language="zh" datatype="plaintext" original="messages" date="2021-05-27T11:07:16Z">
<header>
<type>module</type>
<description>General language labels used in frontend and backend.</description>
......@@ -215,11 +215,11 @@
</trans-unit>
<trans-unit id="frontend.filter.remote" approved="yes">
<source><![CDATA[Show only jobs that can be executed remotely.]]></source>
<target><![CDATA[]]></target>
<target><![CDATA[Show only jobs that can be executed remotely.]]></target>
</trans-unit>
<trans-unit id="frontend.filter.selections.all" approved="yes">
<source><![CDATA[All]]></source>
<target><![CDATA[]]></target>
<target><![CDATA[All]]></target>
</trans-unit>
<trans-unit id="frontend.location" approved="yes">
<source><![CDATA[Location]]></source>
......@@ -239,4 +239,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>
\ No newline at end of file
......@@ -28,7 +28,19 @@
</f:if>
</li>
<li>
<f:format.raw><f:translate key="frontend.jobLocation" extensionName="project_theme" /></f:format.raw>
<f:if condition="{job.location}">
<f:then>
<f:format.raw>
<f:translate key="frontend.locationLabel" extensionName="sg_jobs"/>
</f:format.raw>
{job.location}
</f:then>
<f:else>
<f:format.raw>
<f:translate key="frontend.jobLocation" extensionName="project_theme"/>
</f:format.raw>
</f:else>
</f:if>
</li>
</ul>
......
......@@ -44,7 +44,21 @@
</f:else>
</f:if>
</li>
<li><f:format.raw><f:translate key="frontend.jobLocation" extensionName="project_theme" /></f:format.raw></li>
<li>
<f:if condition="{job.location}">
<f:then>
<f:format.raw>
<f:translate key="frontend.locationLabel" extensionName="sg_jobs"/>
</f:format.raw>
{job.location}
</f:then>
<f:else>
<f:format.raw>
<f:translate key="frontend.jobLocation" extensionName="project_theme"/>
</f:format.raw>
</f:else>
</f:if>
</li>
</ul>
<hr>
<h3><f:format.raw><f:translate key="frontend.jobApplyNow" extensionName="project_theme" /></f:format.raw></h3>
......
......@@ -7,6 +7,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
qualification text DEFAULT '' NOT NULL,
alternative_start_date text DEFAULT '' NOT NULL,
start_date int(11) unsigned DEFAULT '0' NOT NULL,
location text DEFAULT '' NOT NULL,
company text DEFAULT '' NOT NULL,
telecommute_possible tinyint(4) unsigned DEFAULT '0' NOT NULL,
office_work_possible tinyint(4) unsigned DEFAULT '1' NOT NULL,
......
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