Skip to content

Commit

Permalink
Merge pull request #17 from TYPO3incubator/surfcamp-team5_fjora_2
Browse files Browse the repository at this point in the history
Employee list frontend filter
  • Loading branch information
o-ba authored Apr 12, 2024
2 parents f44546b + 08a36b3 commit 7cd481c
Show file tree
Hide file tree
Showing 13 changed files with 885 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ TCEFORM {
company.disabled = 1
middle_name.disabled = 1
www.disabled = 1

title.label = LLL:EXT:psi/Resources/Private/Language/locallang.xlf:fe_users.title.label
}
}
29 changes: 29 additions & 0 deletions local_packages/psi/Configuration/TCA/Overrides/fe_users.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Add new fields to fe_users table
*/

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
$feUserDepartment = [
'employee_department' => [
'exclude' => 1,
'label' => 'Departament',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.none', '0'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.management', '1'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.marketing', '2'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.legal', '3'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.hr', '4'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.finance', '5'],
['LLL:EXT:psi/Resources/Private/Language/locallang_db.xlf:fe_users.department.it', '6'],
],
'default' => '0',
],
],
];

ExtensionManagementUtility::addTCAcolumns('fe_users', $feUserDepartment);
ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'employee_department', '', 'after: name');
28 changes: 28 additions & 0 deletions local_packages/psi/Resources/Private/Language/es.locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,34 @@
<source>Read more</source>
<target>Sigue leyendo</target>
</trans-unit>
<trans-unit id="fe_users.department.all">
<source>All Departments</source>
<target>Todos los Departamentos</target>
</trans-unit>
<trans-unit id="fe_users.department.management">
<source>Management</source>
<target>Gestión</target>
</trans-unit>
<trans-unit id="fe_users.department.marketing">
<source>Marketing</source>
<target>Marketing</target>
</trans-unit>
<trans-unit id="fe_users.department.legal">
<source>Legal</source>
<target>Legal</target>
</trans-unit>
<trans-unit id="fe_users.department.hr">
<source>HR</source>
<target>Recursos Humanos</target>
</trans-unit>
<trans-unit id="fe_users.department.finance">
<source>Finance</source>
<target>Finanzas</target>
</trans-unit>
<trans-unit id="fe_users.department.it">
<source>IT</source>
<target>Tecnología de la Información</target>
</trans-unit>
</body>
</file>
</xliff>
21 changes: 21 additions & 0 deletions local_packages/psi/Resources/Private/Language/locallang.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,27 @@
<trans-unit id="news-readmore" resname="news-readmore">
<source>Read more</source>
</trans-unit>
<trans-unit id="fe_users.department.all">
<source>All Departments</source>
</trans-unit>
<trans-unit id="fe_users.department.management">
<source>Management</source>
</trans-unit>
<trans-unit id="fe_users.department.marketing">
<source>Marketing</source>
</trans-unit>
<trans-unit id="fe_users.department.legal">
<source>Legal</source>
</trans-unit>
<trans-unit id="fe_users.department.hr">
<source>HR</source>
</trans-unit>
<trans-unit id="fe_users.department.finance">
<source>Finance</source>
</trans-unit>
<trans-unit id="fe_users.department.it">
<source>IT</source>
</trans-unit>
</body>
</file>
</xliff>
21 changes: 21 additions & 0 deletions local_packages/psi/Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@
<trans-unit id="tt_content.textpic.layout.1">
<source>Image position right</source>
</trans-unit>
<trans-unit id="fe_users.department.none">
<source>None</source>
</trans-unit>
<trans-unit id="fe_users.department.management">
<source>Management</source>
</trans-unit>
<trans-unit id="fe_users.department.marketing">
<source>Marketing</source>
</trans-unit>
<trans-unit id="fe_users.department.legal">
<source>Legal</source>
</trans-unit>
<trans-unit id="fe_users.department.hr">
<source>HR</source>
</trans-unit>
<trans-unit id="fe_users.department.finance">
<source>Finance</source>
</trans-unit>
<trans-unit id="fe_users.department.it">
<source>IT</source>
</trans-unit>
</body>
</file>
</xliff>
Loading

0 comments on commit 7cd481c

Please sign in to comment.