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

[TASK] Add date posted to job SEO tab

parent b4a4dff8
No related branches found
No related tags found
1 merge request!20[FEATURE] Extended TCAs for Structured Data (SEO)
......@@ -107,6 +107,11 @@ class Job extends AbstractEntity {
*/
protected $employmentTypes = '';
/**
* @var int $datePosted
*/
protected $datePosted = 0;
/**
* @return string
*/
......@@ -316,4 +321,18 @@ class Job extends AbstractEntity {
public function setEmploymentTypes(string $employmentTypes): void {
$this->employmentTypes = $employmentTypes;
}
/**
* @return int
*/
public function getDatePosted(): int {
return $this->datePosted;
}
/**
* @param int $datePosted
*/
public function setDatePosted(int $datePosted): void {
$this->datePosted = $datePosted;
}
}
......@@ -52,7 +52,7 @@ return call_user_func(
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, path_segment, job_id, department, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date,
company, task, qualification, description, contact','employment_types',
company, task, qualification, description, contact','employment_types', 'date_posted',
],
'types' => [
'1' => [
......@@ -64,7 +64,7 @@ return call_user_func(
contact,
description,
--div--; LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:tca.qualification_tab, task, qualification,
--div--; LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:tca.seo_tab, employment_types,
--div--; LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:tca.seo_tab, employment_types, date_posted,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
],
],
......@@ -361,7 +361,17 @@ return call_user_func(
['LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.employment_types.other', 'OTHER']
]
]
]
],
'date_posted' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.date_posted',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'date'
],
],
],
];
}, '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-17T15:46:49Z">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-09-17T16:23:36Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -173,6 +173,10 @@
<source><![CDATA[Contact]]></source>
<target><![CDATA[Kontakt]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.date_posted" approved="yes">
<source><![CDATA[Date the job offer was posted]]></source>
<target><![CDATA[Datum der Veröffentlichung der Stellenanzeige]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.department" approved="yes">
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></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-17T15:46:49Z">
<file source-language="en" datatype="plaintext" original="messages" date="2019-09-17T16:23:36Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -135,6 +135,9 @@
<trans-unit id="tx_sgjobs_domain_model_job.contact">
<source><![CDATA[Contact]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.date_posted">
<source><![CDATA[Date the job offer was posted]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.department">
<source><![CDATA[Department]]></source>
</trans-unit>
......
......@@ -12,6 +12,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
start_date int(11) unsigned DEFAULT '0' NOT NULL,
company text DEFAULT '' NOT NULL,
employment_types text DEFAULT '' NOT NULL,
date_posted int(11) unsigned DEFAULT '0' 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