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

[TASk] Small changes to ui

parent ba8d1b8c
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,10 @@ class JobTeaserController extends ActionController {
* @return void
*/
public function indexAction() {
$allowedLocations = GeneralUtility::trimExplode(',', $this->settings['locations']);
$allowedLocations = [];
if (!empty($this->settings['locations'])) {
$allowedLocations = GeneralUtility::trimExplode(',', $this->settings['locations']);
}
$totalAmountOfOffers = $this->jobRepository->countAll($allowedLocations);
$querySettings = $this->jobRepository->createQuery()->getQuerySettings();
......
......@@ -334,11 +334,14 @@ class JobRepository extends Repository {
/** @var QueryInterface $query */
$query = $this->createQuery();
$constraints = [];
$constraints[] = $query->in('company', $companies);
$result = $query->matching($query->logicalAnd($constraints))->execute();
if (\count($companies) !== 0) {
$constraints[] = $query->in('company', $companies);
$query->matching($query->logicalAnd($constraints));
}
$result = $query->execute();
return $result-> count();
return $result->count();
}
/**
......@@ -351,7 +354,9 @@ class JobRepository extends Repository {
/** @var QueryInterface $query */
$query = $this->createQuery();
$constraints = [];
$constraints[] = $query->in('company', $companies);
if (\count($companies) !== 0) {
$constraints[] = $query->in('company', $companies);
}
$constraints[] = $query->equals('featured_offer', TRUE);
return $query->matching($query->logicalAnd($constraints))->execute();
......
......@@ -50,9 +50,9 @@
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.teaser_locations</label>
<config>
<type>group</type>
<internal_type>db</internal_type>
<allowed>tx_sgjobs_domain_model_company</allowed>
<type>select</type>
<renderType>selectMultipleSideBySide</renderType>
<foreign_table>tx_sgjobs_domain_model_company</foreign_table>
<wizards>
<suggest>
<type>suggest</type>
......
......@@ -6,7 +6,7 @@
"license": [
"GPL-2.0-or-later"
],
"version": "1.9.3",
"version": "1.9.4",
"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.9.3',
'version' => '1.9.4',
'state' => 'stable',
'uploadfolder' => FALSE,
'createDirs' => '',
......
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