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

[TASK] Add office-work possible SEO configuration

parent 638e4f97
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 $telecommutePossible = FALSE;
/**
* @var bool
*/
protected $officeWorkPossible = TRUE;
/**
* @var string $employmentTypes
*/
......@@ -352,6 +357,20 @@ class Job extends AbstractEntity {
$this->telecommutePossible = $telecommutePossible;
}
/**
* @return bool
*/
public function getOfficeWorkPossible(): bool {
return $this->officeWorkPossible;
}
/**
* @param bool $officeWorkPossible
*/
public function setOfficeWorkPossible(bool $officeWorkPossible): void {
$this->officeWorkPossible = $officeWorkPossible;
}
/**
* @return string
*/
......
......@@ -80,7 +80,7 @@ return call_user_func(
'palette_title' => ['showitem' => 'title, path_segment, job_id', 'canNotCollapse' => 1],
'palette_title_start' => ['showitem' => 'start_date, alternative_start_date', 'canNotCollapse' => 1],
'palette_apply_function' => ['showitem' => 'hide_apply_by_email, hide_apply_by_postal, featured_offer', 'canNotCollapse' => 1],
'palette_location_specifications' => ['showitem' => 'telecommute_possible'],
'palette_location_specifications' => ['showitem' => 'telecommute_possible, office_work_possible'],
'palette_seo_dates' => ['showitem' => 'date_posted, valid_through'],
'palette_salary' => [
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:tca.salary_palette',
......@@ -361,6 +361,14 @@ return call_user_func(
'type' => 'check',
],
],
'office_work_possible' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table . '.officeWorkPossible',
'config' => [
'type' => 'check',
],
],
'employment_types' => [
'exclude' => TRUE,
'l10n_mode' => 'exclude',
......
<?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-10-08T10:20:37Z">
<file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2019-10-08T10:36:23Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -265,6 +265,10 @@
<source><![CDATA[Page that shows a list of all job offers in the frontend]]></source>
<target><![CDATA[Seite auf der eine Liste aller Stellenanzeigen im Frontend angezeigt wird]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.officeWorkPossible" approved="yes">
<source><![CDATA[Job can be executed in the office of the specified company]]></source>
<target><![CDATA[Job kann im Büro der angegebenen Firma ausgeführt werden]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.orderBy" approved="yes">
<source><![CDATA[Sorting of job offers]]></source>
<target><![CDATA[Sortierung der Stellenangebote]]></target>
......
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages" date="2019-10-08T10:20:37Z">
<file source-language="en" datatype="plaintext" original="messages" date="2019-10-08T10:36:23Z">
<header>
<type>database</type>
<description>General language labels used in frontend and backend.</description>
......@@ -204,6 +204,9 @@
<trans-unit id="tx_sgjobs_domain_model_job.offers_page">
<source><![CDATA[Page that shows a list of all job offers in the frontend]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.officeWorkPossible">
<source><![CDATA[Job can be executed in the office of the specified company]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.orderBy">
<source><![CDATA[Sorting of job offers]]></source>
</trans-unit>
......
......@@ -29,17 +29,19 @@
<f:if condition="{job.telecommutePossible}">
"jobLocationType": "TELECOMMUTE",
</f:if>
<f:if condition="{job.officeWorkPossible}">
"jobLocation": {leftBrace}
"@type": "Place",
"address": {leftBrace}
"@type": "PostalAddress",
"streetAddress": "{job.company.street -> f:format.htmlentities()}",
"addressLocality": "{job.company.city -> f:format.htmlentities()}",
"postalCode": "{job.company.zip}",
"addressCountry": "{job.company.country -> f:format.htmlentities()}"
{rightBrace}
{rightBrace},
</f:if>
"jobLocation": {leftBrace}
"@type": "Place",
"address": {leftBrace}
"@type": "PostalAddress",
"streetAddress": "{job.company.street}",
"addressLocality": "{job.company.city}",
"postalCode": "{job.company.zip}",
"addressCountry": "{job.company.country}"
{rightBrace}
{rightBrace}
{rightBrace}
</script>
</f:alias>
......@@ -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,
telecommute_possible tinyint(4) unsigned DEFAULT '0' NOT NULL,
office_work_possible tinyint(4) unsigned DEFAULT '1' NOT NULL,
employment_types text DEFAULT '' NOT NULL,
date_posted int(11) unsigned DEFAULT '0' NOT NULL,
valid_through 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