Skip to content
Snippets Groups Projects
Commit f29c74a1 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Add new department field and remove the area text field

This commit adds a new field and a new record type, the department.
It comes as a replacement for the area text field and allows for
department records to be created. This also introduces a migration
wizard, that can create new departments out of the old area entries.
parent 0faa6931
No related branches found
No related tags found
No related merge requests found
Showing
with 552 additions and 80 deletions
......@@ -68,6 +68,12 @@ class JoblistController extends ActionController {
*/
private $jobApplicationRepository;
/**
* @var \SGalinski\SgJobs\Domain\Repository\DepartmentRepository
* @inject
*/
private $departmentRepository;
/**
* Show all job offers and options to manage them
*
......@@ -81,7 +87,7 @@ class JoblistController extends ActionController {
$this->view->assign('selectedCountry', $filters['filterCountry']);
$this->view->assign('selectedCompany', $filters['filterCompany']);
$this->view->assign('selectedLocation', $filters['filterLocation']);
$this->view->assign('selectedArea', $filters['filterArea']);
$this->view->assign('selectedDepartment', $filters['filterDepartment']);
$this->view->assign('selectedFunction', $filters['filterFunction']);
}
......@@ -384,8 +390,8 @@ class JoblistController extends ActionController {
$companies = $this->companyRepository->getAllCompanyNames($rootPageId);
$this->view->assign('companies', $companies);
$areas = $this->jobRepository->getAllAreas($rootPageId);
$this->view->assign('areas', $areas);
$departments = $this->departmentRepository->findAll();
$this->view->assign('departments', $departments);
}
/**
......
<?php
namespace SGalinski\SgJobs\Domain\Model;
/**
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/**
* Class Department
*
* @package SGalinski\SgJobs\Domain\Model
* @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
*/
class Department extends AbstractEntity {
/**
* The title of the department
*
* @var string
*/
protected $title;
/**
* @return string
*/
public function getTitle(): string {
return $this->title;
}
/**
* @param string $title
*/
public function setTitle(string $title) {
$this->title = $title;
}
}
......@@ -53,9 +53,9 @@ class Job extends AbstractEntity {
protected $qualification = '';
/**
* @var string $area
* @var \SGalinski\SgJobs\Domain\Model\Department
*/
protected $area = '';
protected $department;
/**
* @var bool
......@@ -210,17 +210,17 @@ class Job extends AbstractEntity {
}
/**
* @return string
* @return Department
*/
public function getArea(): string {
return $this->area;
public function getDepartment(): Department {
return $this->department;
}
/**
* @param string $area
* @param Department $department
*/
public function setArea(string $area) {
$this->area = $area;
public function setDepartment(Department $department) {
$this->department = $department;
}
/**
......
<?php
namespace SGalinski\SgJobs\Domain\Repository;
/**
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
use TYPO3\CMS\Extbase\Persistence\Repository;
/**
* Class DepartmentRepository
*
* @package SGalinski\SgJobs\Domain\Repository
* @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
*/
class DepartmentRepository extends Repository {
}
......@@ -127,37 +127,6 @@ class JobRepository extends Repository {
return $this->findByJobIds($recordPageId, $result, $limit, $offset);
}
/**
* Returns all areas filtered by page id
*
* @param int $pageUid
* @return mixed
* @throws \InvalidArgumentException
*/
public function getAllAreas($pageUid) {
/** @var QueryInterface $query */
$query = $this->createQuery();
$query->setOrderings(
[
'sorting' => QueryInterface::ORDER_ASCENDING,
]
);
$companyConstraints[] = $query->equals('pid', $pageUid);
$query->matching($query->logicalAnd($companyConstraints));
$result = $query->execute()->toArray();
$areaArray = [''];
/** @var Job $job */
foreach ($result as $job) {
$areaName = $job->getArea();
$areaArray[$areaName] = $areaName;
}
return $areaArray;
}
/**
* Returns a job filtered by company and page id
*
......@@ -293,8 +262,8 @@ class JobRepository extends Repository {
$constraints[] = $query->equals('company.name', $filters['filterLocation']);
}
if ($filters['filterArea'] !== '0' && $filters['filterArea'] !== NULL) {
$constraints[] = $query->equals('area', $filters['filterArea']);
if ($filters['filterDepartment'] !== '0' && $filters['filterDepartment'] !== NULL) {
$constraints[] = $query->equals('department', $filters['filterDepartment']);
}
if (\count($constraints)) {
......
<?php
/**
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
namespace SGalinski\SgJobs\Updates;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Updates\AbstractUpdate;
/**
* Class DepartmentUpdateWizard
*
* @package SGalinski\SgJobs\Updates
* @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
*/
class DepartmentUpdateWizard extends AbstractUpdate {
/**
* @var string
*/
protected $title = 'Migrate old fulltext job areas to department records';
/**
* Checks whether updates are required.
*
* @param string &$description The description for the update
* @return bool Whether an update is required (TRUE) or not (FALSE)
*/
public function checkForUpdate(&$description): bool {
if ($this->isWizardDone()) {
return FALSE;
}
if (!$this->checkIfTableExists('tx_sgjobs_domain_model_department')) {
return FALSE;
}
if (
$this->hasAreaField() ||
$this->hasDeletedAreaField()
) {
$description = 'Job areas can be migrated to the new department records';
return TRUE;
}
return FALSE;
}
/**
* Performs the accordant updates.
*
* @param array &$dbQueries Queries done in this update
* @param string &$customMessage Custom message
* @return bool Whether everything went smoothly or not
*/
public function performUpdate(array &$dbQueries, &$customMessage): bool {
$customMessage = '';
$connection = $this->getDatabaseConnection();
$queryBuilder = $connection->createQueryBuilder();
$field = $this->hasDeletedAreaField() ? 'zzz_deleted_area' : 'area';
$queryBuilder->getRestrictions()->removeAll();
$jobs = $queryBuilder->select('uid', 'pid', 'sys_language_uid', $field)
->from('tx_sgjobs_domain_model_job')
->execute()
->fetchAll();
$dbQueries[] = $queryBuilder->getSQL();
$newDepartments = [];
if (\count($jobs) > 0) {
foreach ($jobs as $index => $job) {
if ($job[$field]) {
$identifier = $job[$field] . '-' . $job['pid'] . '-' . $job['sys_language_uid'];
$newDepartments[$identifier] = [
'title' => $job[$field],
'pid' => $job['pid'],
'sys_language_uid' => $job['sys_language_uid']
];
} else {
$customMessage .= 'The Job with id ' . $job['uid'] . ' does not have an area set.'
. 'Please set a department manually later, because it is a required field now!' . \PHP_EOL;
unset($jobs[$index]);
}
}
if (\count($jobs) > 0) {
\array_walk($newDepartments, function ($department) use (&$dbQueries, $connection) {
$queryBuilder = $connection->createQueryBuilder();
$queryBuilder->insert('tx_sgjobs_domain_model_department')->values($department)->execute();
$dbQueries[] = $queryBuilder->getSQL();
});
$queryBuilder->resetQueryParts();
$departments = $queryBuilder->select('uid', 'pid', 'sys_language_uid', 'title')
->from('tx_sgjobs_domain_model_department')
->execute()
->fetchAll();
$identifiedDepartments = [];
foreach ($departments as $department) {
$identifier = $department['title'] . '-' . $department['pid'] . '-' . $department['sys_language_uid'];
$identifiedDepartments[$identifier] = $department;
}
$dbQueries[] = $queryBuilder->getSQL();
foreach ($jobs as $index => $job) {
$identifier = $job[$field] . '-' . $job['pid'] . '-' . $job['sys_language_uid'];
if (isset($identifiedDepartments[$identifier])) {
$jobs[$index]['department'] = $identifiedDepartments[$identifier]['uid'];
unset($jobs[$index][$field]);
} else {
unset($jobs[$index]);
}
}
if (\count($jobs) > 0) {
\array_walk($jobs, function ($job) use (&$dbQueries, $connection) {
$queryBuilder = $connection->createQueryBuilder();
$queryBuilder->update('tx_sgjobs_domain_model_job')
->set('department', (int) $job['department'])
->where(
$queryBuilder->expr()->eq(
'uid',
$queryBuilder->createNamedParameter($job['uid'], \PDO::PARAM_INT)
)
)->execute();
$dbQueries[] = $queryBuilder->getSQL();
});
}
}
}
$this->markWizardAsDone();
return TRUE;
}
/**
* Check if the job table has a deleted area field
*
* @return bool
*/
protected function hasDeletedAreaField() {
return $this->hasField('zzz_deleted_area');
}
/**
* Check if the job table has an area field
*
* @return bool
*/
protected function hasAreaField() {
return $this->hasField('area');
}
/**
* Check if the job database table has a field with the given name in it
*
* @param $fieldName
* @return bool
*/
protected function hasField($fieldName) {
$connection = $this->getDatabaseConnection();
$tableColumns = $connection->getSchemaManager()->listTableColumns('tx_sgjobs_domain_model_job');
if (\array_key_exists($fieldName, $tableColumns)) {
return TRUE;
}
return FALSE;
}
/**
* Get the database query builder
*
* @return Connection
*/
protected function getDatabaseConnection(): Connection {
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
return $connectionPool->getConnectionForTable('tx_sgjobs_domain_model_job');
}
}
<?php
/**
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
return [
'ctrl' => [
'title' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_department',
'label' => 'title',
'label_alt_force' => 1,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'searchFields' => 'title',
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'sortby' => 'sorting',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('sg_jobs') .
'Resources/Public/Icons/tx_sgjobs_domain_model_department.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title',
],
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden,
title,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
],
],
'palettes' => [
'sysLanguageAndHidden' => [
'showitem' => 'sys_language_uid;;;;1-1-1, l10n_diffsource, hidden;;1, ',
'canNotCollapse' => 1,
]
],
'columns' => [
'sys_language_uid' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.language',
'config' => [
'type' => 'select',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => [
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.allLanguages', -1],
['LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.default_value', 0]
],
],
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.l18n_parent',
'config' => [
'type' => 'select',
'items' => [
['', 0],
],
'foreign_table' => 'tx_sgjobs_domain_model_department',
'foreign_table_where' => 'AND tx_sgjobs_domain_model_department.pid=###CURRENT_PID### AND tx_sgjobs_domain_model_department.sys_language_uid IN (-1,0)',
],
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
],
],
't3ver_label' => [
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.versionLabel',
'config' => [
'type' => 'input',
'size' => 30,
'max' => 255,
]
],
'pid' => [
'exclude' => 0,
'label' => 'PID',
'config' => [
'type' => 'none',
]
],
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'starttime' => [
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.starttime',
'config' => [
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
],
],
'endtime' => [
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xml:LGL.endtime',
'config' => [
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => [
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
],
],
],
'title' => [
'exclude' => 0,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_department.title',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
],
]
],
];
......@@ -8,7 +8,7 @@ return [
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => TRUE,
'searchFields' => 'title, job_id, start_date, alternative_start_date, company, contact, area',
'searchFields' => 'title, job_id, start_date, alternative_start_date, company, contact, department',
'versioningWS' => 2,
'versioning_followPages' => TRUE,
'origUid' => 't3_origuid',
......@@ -26,12 +26,12 @@ return [
'Resources/Public/Icons/tx_sgjobs_domain_model_job.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, job_id, area, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date,
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, job_id, department, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date,
company, task, qualification, description, contact',
],
'types' => [
'1' => [
'showitem' => '--palette--;;sysLanguageAndHidden,title, job_id, --palette--;;palette_title_start,,--palette--;;palette_apply_function,,--palette--;;palette_area_function,
'showitem' => '--palette--;;sysLanguageAndHidden,title, job_id, --palette--;;palette_title_start,,--palette--;;palette_apply_function,,--palette--;;palette_department_function,
--palette--;;palette_location_contact, description, --div--; LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tca.qualification_tab, task, qualification, div;;richtext[*]:rte_transform[mode=ts],
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime',
],
......@@ -43,7 +43,7 @@ return [
],
'palette_title_start' => ['showitem' => 'start_date, alternative_start_date', 'canNotCollapse' => 1],
'palette_apply_function' => ['showitem' => 'hide_apply_by_email, hide_apply_by_postal', 'canNotCollapse' => 1],
'palette_area_function' => ['showitem' => 'area, featured_offer', 'canNotCollapse' => 1],
'palette_department_function' => ['showitem' => 'department, featured_offer', 'canNotCollapse' => 1],
'palette_location_contact' => ['showitem' => 'company, contact', 'canNotCollapse' => 1]
],
'columns' => [
......@@ -145,13 +145,20 @@ return [
'eval' => 'trim'
],
],
'area' => [
'department' => [
'exclude' => 0,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.area',
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.department',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_sgjobs_domain_model_department',
'minitems' => 1,
'items' => [
[
'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.department.none',
0
]
]
],
],
'featured_offer' => [
......
......@@ -30,7 +30,7 @@ $tx_sgjobs_domain_model_job_application = [
'Resources/Public/Icons/tx_sgjobs_domain_model_job.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, company, area, start_date, alternative_start_date,
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, company, department, start_date, alternative_start_date,
company, task, qualification, description, contact, privacy_policy',
],
'types' => [
......
......@@ -290,8 +290,8 @@
<source><![CDATA[Apply by mail]]></source>
<target><![CDATA[Bewerbung per Post]]></target>
</trans-unit>
<trans-unit id="frontend.area" approved="yes">
<source><![CDATA[Area]]></source>
<trans-unit id="frontend.department" approved="yes">
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="frontend.description" approved="yes">
......@@ -314,8 +314,8 @@
<source><![CDATA[Entry date]]></source>
<target><![CDATA[Eintrittsdatum]]></target>
</trans-unit>
<trans-unit id="frontend.filter.areas" approved="yes">
<source><![CDATA[Area]]></source>
<trans-unit id="frontend.filter.departments" approved="yes">
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="frontend.filter.companies" approved="yes">
......@@ -372,4 +372,4 @@
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
......@@ -153,10 +153,14 @@
<source><![CDATA[Display apply by postal service section]]></source>
<target><![CDATA[Bewerbung per Post einblenden]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.area" approved="yes">
<trans-unit id="tx_sgjobs_domain_model_job.department" approved="yes">
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.department.none">
<source><![CDATA[--Please choose--]]></source>
<target><![CDATA[--Bitte wählen--]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.company" approved="yes">
<source><![CDATA[Company]]></source>
<target><![CDATA[Unternehmen]]></target>
......@@ -349,6 +353,14 @@
<source><![CDATA[Location]]></source>
<target><![CDATA[Arbeitsort]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department">
<source><![CDATA[Department]]></source>
<target><![CDATA[Bereich]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department.title">
<source><![CDATA[Title]]></source>
<target><![CDATA[Titel]]></target>
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
......@@ -219,8 +219,8 @@
<trans-unit id="frontend.apply_by_mail">
<source><![CDATA[Apply by mail]]></source>
</trans-unit>
<trans-unit id="frontend.area">
<source><![CDATA[Area]]></source>
<trans-unit id="frontend.department">
<source><![CDATA[Department]]></source>
</trans-unit>
<trans-unit id="frontend.description">
<source><![CDATA[Description]]></source>
......@@ -237,8 +237,8 @@
<trans-unit id="frontend.entry_date">
<source><![CDATA[Entry date]]></source>
</trans-unit>
<trans-unit id="frontend.filter.areas">
<source><![CDATA[Area]]></source>
<trans-unit id="frontend.filter.departments">
<source><![CDATA[Departments]]></source>
</trans-unit>
<trans-unit id="frontend.filter.companies">
<source><![CDATA[Company]]></source>
......@@ -281,4 +281,4 @@
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
......@@ -120,9 +120,12 @@
<trans-unit id="tx_sgjobs_domain_model_job.applyByPostal">
<source><![CDATA[Display apply by postal service section]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.area">
<trans-unit id="tx_sgjobs_domain_model_job.department">
<source><![CDATA[Department]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.department.none">
<source><![CDATA[--Please choose--]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.company">
<source><![CDATA[Company]]></source>
</trans-unit>
......@@ -267,6 +270,12 @@
<trans-unit id="tx_sgjobs_domain_model_location.location">
<source><![CDATA[Location]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department">
<source><![CDATA[Department]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_department.title">
<source><![CDATA[Title]]></source>
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
......@@ -193,8 +193,8 @@
<source><![CDATA[Entry date]]></source>
<target><![CDATA[入境时间]]></target>
</trans-unit>
<trans-unit id="frontend.filter.areas" approved="yes">
<source><![CDATA[Area]]></source>
<trans-unit id="frontend.filter.departments" approved="yes">
<source><![CDATA[Department]]></source>
<target><![CDATA[行业]]></target>
</trans-unit>
<trans-unit id="frontend.filter.companies" approved="yes">
......@@ -227,4 +227,4 @@
</trans-unit>
</body>
</file>
</xliff>
\ No newline at end of file
</xliff>
......@@ -29,11 +29,11 @@
id="filter-companies"/>
</div>
<div class="sgjobs-filter-bar-form-control">
<label for="filter-areas">
<f:translate key="frontend.filter.areas"/>
<label for="filter-departments">
<f:translate key="frontend.filter.departments"/>
</label>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedArea}"
property="filterArea" optionValueField="value" options="{areas}" id="filter-areas"/>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedDepartment}"
property="filterDepartment" optionValueField="value" options="{departments}" id="filter-departments"/>
</div>
</div>
</f:form>
......
......@@ -34,8 +34,8 @@
{job.company.country} - {job.company.zip} {job.company.city}
</p>
<h3><f:translate key="frontend.area" /></h3>
<p>{job.area}</p>
<h3><f:translate key="frontend.department" /></h3>
<p>{job.department.title}</p>
<h3><f:translate key="frontend.organisation" /></h3>
<p>{job.company.name}</p>
......
......@@ -4,9 +4,9 @@
<div id="sgjobs-joblist">
<f:render
partial="Filter"
arguments="{recordPageId: recordPageId, filters: filters, countries: countries, cities: cities, companies: companies, areas: areas,
arguments="{recordPageId: recordPageId, filters: filters, countries: countries, cities: cities, companies: companies, departments: departments,
functions: functions, selectedCountry: selectedCountry, selectedCompany: selectedCompany,
selectedLocation: selectedLocation, selectedArea: selectedArea, selectedFunction: selectedFunction, limit: limit}"
selectedLocation: selectedLocation, selectedDepartment: selectedDepartment, selectedFunction: selectedFunction, limit: limit}"
/>
<div class="row default-content-element equal-height-columns stretch-first-child">
......
<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title>module-extensionmanager</title><g fill="none" fill-rule="evenodd"><path d="M0 0h64v64H0z" fill="#F08D34"/><path d="M33.018 27.928l10.897-3.8c.518-.194 1.094.068 1.288.585.194.517-.068 1.093-.585 1.287L34 29.703V42.93c0 .59-.448 1.066-1 1.066s-1-.477-1-1.066V29.687l-10.67-3.815c-.517-.194-.78-.77-.585-1.287.194-.518.77-.78 1.287-.586l10.986 3.928zm.454-12c-.26-.083-.687-.082-.944 0l-16.056 5.12c-.26.085-.472.366-.472.644v20.633c0 .27.215.56.472.642l16.056 5.122c.26.082.687.08.944 0l16.056-5.123c.26-.083.472-.364.472-.642V21.692c0-.272-.215-.56-.472-.643l-16.056-5.122z" fill="#FFF"/></g></svg>
\ No newline at end of file
......@@ -17,7 +17,7 @@ $EM_CONF[$_EXTKEY] = array (
'depends' =>
array (
'typo3' => '8.7.0-8.7.99',
'php' => '5.6.0-7.2.99',
'php' => '7.0.0-7.2.99',
),
'conflicts' =>
array (
......
......@@ -71,3 +71,7 @@ $signalSlotDispatcher->connect(
\SGalinski\SgJobs\SignalSlot\SitemapSignalSlot::class,
'beforeSitemapGeneration'
);
// Register the upgrade wizard
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'][\SGalinski\SgJobs\Updates\DepartmentUpdateWizard::class]
= \SGalinski\SgJobs\Updates\DepartmentUpdateWizard::class;
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