Skip to content
Snippets Groups Projects
Commit 8fda21b2 authored by Tim Wagner's avatar Tim Wagner
Browse files

[TASK] Add salary_unit selection to Job SEO TCA

parent c9f70320
No related branches found
No related tags found
1 merge request!20[FEATURE] Extended TCAs for Structured Data (SEO)
......@@ -118,10 +118,15 @@ class Job extends AbstractEntity {
protected $validThrough = 0;
/**
* @var string
* @var string $salaryCurrency
*/
protected $salaryCurrency = '';
/**
* @var string $salaryUnit
*/
protected $salaryUnit = '';
/**
* @return string
*/
......@@ -373,4 +378,18 @@ class Job extends AbstractEntity {
public function setSalaryCurrency(string $salaryCurrency): void {
$this->salaryCurrency = $salaryCurrency;
}
/**
* @return string
*/
public function getSalaryUnit(): string {
return $this->salaryUnit;
}
/**
* @param string $salaryUnit
*/
public function setSalaryUnit(string $salaryUnit): void {
$this->salaryUnit = $salaryUnit;
}
}
......@@ -81,7 +81,7 @@ return call_user_func(
'palette_apply_function' => ['showitem' => 'hide_apply_by_email, hide_apply_by_postal, featured_offer', 'canNotCollapse' => 1],
'palette_seo_dates' => ['showitem' => 'date_posted, valid_through'],
'palette_salary' => [
'showitem' => 'salary_currency'
'showitem' => 'salary_currency, salary_unit'
]
],
'columns' => [
......@@ -397,6 +397,22 @@ return call_user_func(
'eval' => 'upper',
],
],
'salary_unit' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit.hour', 'HOUR'],
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit.day', 'DAY'],
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit.week', 'WEEK'],
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit.month', 'MONTH'],
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.salary_unit.year', 'YEAR'],
]
]
],
],
];
}, 'sg_jobs', 'tx_sgjobs_domain_model_job'
......
<?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-09-18T16:49:57Z">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-09-18T17:24:50Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -285,6 +285,30 @@
<source><![CDATA[Currency code according to ISO 4217, consisting of three capital letters.]]></source>
<target><![CDATA[Währungscode nach ISO 4217, bestehend aus drei Großbuchstaben.]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit" approved="yes">
<source><![CDATA[Period of salary specification (money per ...)]]></source>
<target><![CDATA[Zeitabschnitt der Gehaltsangabe (Geld pro ...)]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.day" approved="yes">
<source><![CDATA[Day]]></source>
<target><![CDATA[Tag]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.hour" approved="yes">
<source><![CDATA[Hour]]></source>
<target><![CDATA[Stunde]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.month" approved="yes">
<source><![CDATA[Month]]></source>
<target><![CDATA[Monat]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.week" approved="yes">
<source><![CDATA[Week]]></source>
<target><![CDATA[Woche]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.year" approved="yes">
<source><![CDATA[Year]]></source>
<target><![CDATA[Jahr]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.start_date" approved="yes">
<source><![CDATA[Start date]]></source>
<target><![CDATA[Einstiegsdatum]]></target>
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2019-09-18T16:49:57Z">
<file source-language="en" datatype="plaintext" original="messages" date="2019-09-18T17:24:50Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -219,6 +219,24 @@
<trans-unit id="tx_sgjobs_domain_model_job.salary_currency">
<source><![CDATA[Currency code according to ISO 4217, consisting of three capital letters.]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit">
<source><![CDATA[Period of salary specification (money per ...)]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.day">
<source><![CDATA[Day]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.hour">
<source><![CDATA[Hour]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.month">
<source><![CDATA[Month]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.week">
<source><![CDATA[Week]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.salary_unit.year">
<source><![CDATA[Year]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.start_date">
<source><![CDATA[Start date]]></source>
</trans-unit>
......
......@@ -15,6 +15,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
date_posted int(11) unsigned DEFAULT '0' NOT NULL,
valid_through int(11) unsigned DEFAULT '0' NOT NULL,
salary_currency varchar(3) DEFAULT '' NOT NULL,
salary_unit varchar(5) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
department int(11) DEFAULT '0' NOT NULL,
contact int(11) unsigned DEFAULT '0' 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