Skip to content
Snippets Groups Projects
Commit 781003bc authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

Merge branch 'feature_1_6' into 'master'

Feature 1 6

See merge request !5
parents 8524ff7c f01a4908
No related branches found
No related tags found
1 merge request!5Feature 1 6
......@@ -272,9 +272,8 @@ class JoblistController extends ActionController {
$job = $applyData->getJob();
// look for a configured default job, in case of unsolicited application
if ($job === NULL && $this->settings['defaultJobId']) {
$unsoliticedJob = $this->settings['defaultJobId'];
$applyData->setJobId($unsoliticedJob);
if (($job === NULL || $applyData->getJobId() === NULL) && $applyData->getCompany() !== NULL) {
$applyData->setJobId($applyData->getCompany()->getJobId());
}
if ($applyData->_isNew()) {
......@@ -403,8 +402,14 @@ class JoblistController extends ActionController {
* @return array
*/
private function getApplicationMailMarkers($applyData): array {
$location = '';
if ($applyData->getCompany() !== NULL) {
$location = $applyData->getCompany()->getCity();
}
return [
'salutation' => $applyData->getGender(),
'location' => $location,
'firstname' => $applyData->getFirstName(),
'lastname' => $applyData->getLastName(),
'street' => $applyData->getStreet(),
......
......@@ -37,6 +37,11 @@ class Company extends AbstractEntity {
*/
protected $city = '';
/**
* @var string $jobId
*/
protected $jobId = '';
/**
* @var string $name
*/
......@@ -145,4 +150,18 @@ class Company extends AbstractEntity {
public function setContact(Contact $contact) {
$this->contact = $contact;
}
/**
* @return string
*/
public function getJobId() {
return $this->jobId;
}
/**
* @param string $jobId
*/
public function setJobId(string $jobId) {
$this->jobId = $jobId;
}
}
......@@ -12,6 +12,12 @@ return [
'value' => 'Webdeveloper',
'description' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang.xlf:application_mail.marker.jobtitle'
],
[
'marker' => 'application.company.location',
'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING,
'value' => 'München',
'description' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang.xlf:application_mail.marker.location'
],
[
'marker' => 'application.gender',
'type' => \SGalinski\SgMail\Service\MailTemplateService::MARKER_TYPE_STRING,
......
......@@ -8,7 +8,7 @@ return [
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'searchFields' => 'city, country, description, name, street, contact',
'searchFields' => 'job_id, city, country, description, name, street, contact',
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
......@@ -26,12 +26,12 @@ return [
'Resources/Public/Icons/tx_sgjobs_domain_model_company.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, city, street name, country, description, contact',
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job_id, city, street name, country, description, contact',
],
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden,
city, street,name, country, description, contact;;;richtext[*]:rte_transform[mode=ts],
job_id, city, street,name, country, description, contact;;;richtext[*]:rte_transform[mode=ts],
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
],
],
......@@ -131,6 +131,15 @@ return [
'eval' => 'trim'
],
],
'job_id' => [
'exclude' => 0,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_company.job_id',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'name' => [
'exclude' => 0,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_company.name',
......
......@@ -45,6 +45,10 @@
<source>Last name</source>
<target>Nachname</target>
</trans-unit>
<trans-unit id="application_mail.marker.location" approved="yes">
<source>The location regarding the unsolicited application</source>
<target>Der Standort für die Initiativbewerbung</target>
</trans-unit>
<trans-unit id="application_mail.marker.message" approved="yes">
<source>Message</source>
<target>Bemerkungen</target>
......
......@@ -69,6 +69,10 @@
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.job_id" approved="yes">
<source>Job ID</source>
<target>Job ID</target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.name" approved="yes">
<source>Name</source>
<target>Name</target>
......
......@@ -36,6 +36,9 @@
<trans-unit id="application_mail.marker.lastname">
<source>Last name</source>
</trans-unit>
<trans-unit id="application_mail.marker.location">
<source>The location regarding the unsolicited application</source>
</trans-unit>
<trans-unit id="application_mail.marker.message">
<source>Message</source>
</trans-unit>
......
......@@ -54,6 +54,9 @@
<trans-unit id="tx_sgjobs_domain_model_company.description">
<source>Description</source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.job_id">
<source>Job ID</source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_company.name">
<source>Name</source>
</trans-unit>
......
Eine neue {f:if(condition: '{application.jobTitle}', then: 'Bewerbung als <b>{application.jobTitle}</b>.', else: 'Initiativbewerbung.')}
Eine neue {f:if(condition: '{application.jobTitle}', then: 'Bewerbung als <b>{application.jobTitle}</b> für den Standort <b>{application.company.city}</b>.', else: 'Initiativbewerbung für den Standort <b>{application.company.city}</b>.')}
Geschlecht: {f:if(condition: '{application.gender} == \'0\'', then: 'weiblich', else: 'männlich')}
......
......@@ -6,7 +6,7 @@
"license": [
"GPL-2.0+"
],
"version": "1.5.2",
"version": "1.6.0",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/sg_jobs"
},
......
......@@ -4,7 +4,7 @@ $EM_CONF[$_EXTKEY] = array (
'title' => 'Jobs',
'description' => 'Manage and display your Job offers.',
'category' => 'plugin',
'version' => '1.5.2',
'version' => '1.6.0',
'state' => 'stable',
'uploadfolder' => FALSE,
'createDirs' => '',
......
......@@ -59,6 +59,7 @@ CREATE TABLE tx_sgjobs_domain_model_company (
country varchar(255) DEFAULT '' NOT NULL,
description text DEFAULT '' NOT NULL,
contact int(11) unsigned DEFAULT '0' NOT NULL,
job_id text DEFAULT '' NOT NULL,
-- TYPO3 fields
sorting 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