Skip to content
Snippets Groups Projects
Commit fa26216c authored by Kevin von Spiczak's avatar Kevin von Spiczak
Browse files

Merge branch 'feature_4448-json-ld' into 'master'

[TASK] add new csv field for applicantLocationRequirements

See merge request !44
parents 04710617 525f5130
No related branches found
No related tags found
1 merge request!44[TASK] add new csv field for applicantLocationRequirements
......@@ -128,6 +128,11 @@ class Job extends AbstractEntity {
*/
protected $contact;
/**
* @var string
*/
protected $locationRequirements = '';
/**
* @var bool
*/
......@@ -628,4 +633,18 @@ class Job extends AbstractEntity {
$this->relatedJobs->detach($relatedJobs);
}
/**
* @return string
*/
public function getLocationRequirements(): string {
return $this->locationRequirements;
}
/**
* @param string $locationRequirements
*/
public function setLocationRequirements(string $locationRequirements): void {
$this->locationRequirements = $locationRequirements;
}
}
......@@ -65,7 +65,7 @@ $columns = [
'palette_title' => ['showitem' => 'title, path_segment, job_id', '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_location_specifications' => ['showitem' => 'location_requirements, telecommute_possible, office_work_possible'],
'palette_seo_dates' => ['showitem' => 'date_posted, valid_through'],
'palette_salary' => [
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tca.salary_palette',
......@@ -381,6 +381,13 @@ $columns = [
],
]
],
'location_requirements' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.location_requirements',
'config' => [
'type' => 'input',
],
],
'telecommute_possible' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
......
......@@ -385,6 +385,10 @@
<source><![CDATA[Job can be executed fully remotely (teleworking)]]></source>
<target><![CDATA[Job kann vollständig remote ausgeführt werden (Telearbeit)]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.location_requirements" approved="yes">
<source><![CDATA[The country/countries applicants can apply from (comma separated)]]></source>
<target><![CDATA[Das Land/die Länder, aus dem/denen sich Bewerber bewerben können (durch Komma getrennt)]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.title" approved="yes">
<source><![CDATA[Job title]]></source>
<target><![CDATA[Stellenbezeichnung]]></target>
......
......@@ -297,6 +297,9 @@
<trans-unit id="tx_sgjobs_domain_model_job.telecommutePossible">
<source><![CDATA[Job can be executed fully remotely (teleworking)]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.location_requirements">
<source><![CDATA[The country/countries applicants can apply from (comma separated)]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.title">
<source><![CDATA[Job title]]></source>
</trans-unit>
......
......@@ -37,6 +37,18 @@
{rightBrace},
</f:if>
<f:if condition="{job.locationRequirements}">
"applicantLocationRequirements": [
<f:for each="{h:explodeString(string: '{job.locationRequirements}', delimiter: ',')}" as="locationRequirement" iteration="iterator">
{leftBrace}
"@type": "Country",
"name": "{locationRequirement}"
{rightBrace}{f:if(condition: '{iterator.isLast} == FALSE', then: ',')}
</f:for>
],
</f:if>
<f:if condition="{job.telecommutePossible}">
"jobLocationType": "TELECOMMUTE",
</f:if>
......
......@@ -8,6 +8,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
alternative_start_date text DEFAULT '' NOT NULL,
start_date int(11) unsigned DEFAULT '0' NOT NULL,
location text DEFAULT '' NOT NULL,
location_requirements 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