Installing the sm_employeelist extension is very simple.
Install the extension using TYPO3's extension manager.
Include the extension's static code in your page template (Note: If you want to use all plugins you have to select every single static file here).
Insert a new page content to one of your pages. Select the Employee List plugin.
First of all, set the Startingpoint. That's the page/sysfolder where the extension looks for employees, departments, positions and telephone numbers. I recommend using a sysfolder in which all the data is stored.
Continue to configure the plugin. You can use the flexform to configure the output of a single page content. If you want to use more than one page (e.g. one for each different list) you should set the pages' Ids in your template, so you don't have to define them on each single page content.
General settings
Option | Description |
Page Ids | You can define the Ids of your websites pages where the individual lists are located. For example: If you define the details page here, the employee list will link to that page if you click on the employee's name. I recommend to set these values in the template (see section Common settings for the page's template). |
Special groups | Here you can define certain usergroups/departments as 'special groups'. These will not be shown on lists, but as icons on the employee's special page. For example, I created a department 'first aid' and assigned a little red cross to it. So on each details page of an employee that is in this department, there will appear a little red cross right under his image. The syntax is as follows: GroupID,IconFile,Description Each row defines a single special group. The icon file has to be placed in the img-folder of the extension. |
Special content | If you set this value, the page content will only display the chosen content (current birthdays/jubilees or statistics) and nothing else (all other settings are ignored). |
Settings for list page
Option | Description |
Date format | Format of dates (birthday / first entry) on the lists (syntax: strftime)Default (17.01.2007): %d.%m.%Y |
List type | Defines which type of list will be displayed. |
Fields to display | Defines which fields of the employees will be displayed on the list (from left to right). Possible values are: id, fullname, fulladdress, title, surname, firstname, address, city, zip, company, country, birthday, image, sex, hobbies, signature, signatureimage, departments, positions, collectivenumbers, firstentry, telephone, fax, email, website, description, username, ipaddress, lastwinlogon, age, workyears, workinghours, workingtime |
List can be sorted by columns | Defines whether the list can be sorted by clicking on the column headers. |
Link names to detail page | Defines whether the employees' names will be linked to their details pages. |
Display links to new first letter | Defines whether to show a shortcut list with links to each new first letter of the values in the column the list is sorted by on top of the list (see screenshot of employee list). |
Maximum width / height of employee images | Defines the maximum width / height of the employees' images. Bigger / smaller images will be resized. |
Link employees' images to big versions | Defines whether to link the employees' images to the original image file. |
Set CSS-classes for employees according to their positions / CSS-classes for positions' priorities | If set, employees will be given the custom CSS-classes you can define according to their priority. Syntax: Priority,CSS-class name Priorities lower than 50: employees with a priority lower than the given one will be given the CSS-class, priorities higher than 50: employees with a priority higher than the given one will be given the CSS-class. |
Hide employees in these departments | Defines departments that will not be shown on the list. For example, in my company we have a 'department' for ex-workers, that should not be shown on the list (and therefore will not be included in statistics) but should be displayed on the department list or on the employees' details pages. |
List excluded departments in footer | If set, a list of the excluded departments will be shown at the bottom of the list. |
Settings for details page
Option | Description |
Date format | Format (strftime) of dates on the details page.Default (01. January 2007): %d. %B %Y |
Fields to display in the details section | Employee's fields that will be shown in the details section of the details page. For possible values take a look at the corresponding field in the list page settings. |
Template file for details page | Here you can enter the path to a custom template file for the details page. The default is employeeSingleView.html which is located in the tpl-folder of the extension. Take a look at the file to find out what markers the extension uses. |
Maximum width / height of the employee's image | See corresponding field in the list page settings. |
Link employee's image to big version | See corresponding field in the list page settings. |
Detail fields that will be linked to custom lists | Defines which detail field(s) will be linked to 'custom lists'. For example, you could create a link on the field 'city' to get a list of people coming from the same city as the current employee. The link will point to the page you defined as the default list page or (if none defined) to the current page. |
Special list settings
Option | Description |
Number of columns on the image list | How many columns with images will be created on the image list. Default is 5. |
Show only images of employees in the following positions | If you want to create an image list of only employees in certain positions (e.g. IT-Guys), you could select these here. |
Number of columns / rows on the birthday list | Should be self explaining. The list creates a new page after the number or rows is reached. |
Number of columns on the telephone list | How many columns will be created on the telephone list. Default is 2 and my default CSS is optimized for 2 columns. |
Show additional information on the telephone list | Whether or not to show the content of the employee's / department's description field in an extra column on the telephone list. |
Show date of last change on telephone list | Whether to display the date of the latest change on top of the telephone list. This date is automatically calculated by the last change to any (!) field of an employee. |
Settings for the event list
These options appear on the flexform for the event list.
Option | Description |
EnableCaching | Enables caching. |
All settings from the flexform could also be set in the page's template. For a list of possible settings see section Reference.
I recommend to set some configuration in your page's template, so you don't have to define them every time you create a new list. Simply set the following values (you will have to precede them with plugin.tx_smemployeelist_pi1.):
Option | Description |
pidList | The page ID of your users sysfolder. |
flexform.general.listPage | The page ID of your default employee list. |
flexform.general.detailsPage | The page ID of your employee details page. |
flexform.general.deptListPage | The page ID of your department list. |
flexform.general.posListPage | The page ID of your position list. |
flexform.general.numberListPage | The page ID of your list of collective numbers. |
The template file for the automatic mails from the event list is located in the extension's directory under pi2/mail.txt. It is a simple HTML-file, that you can change according to your needs. The following variables can be placed anywhere in the template and will be replaced with the corresponding values.
Variable | Description |
__EMPLOYEE__ | The first name of the employee the mail goes to. |
__EVENT__ | The title of the event. |
__URL__ | The URL to the event on the event list. |
__SENDER__ | The email address of the sender (as defined in the event record) |
General settings
Property: | Data type: | Description: | Default: |
|---|---|---|---|
pidList | int | ID of users sysfolder. | 0 |
recursive | bool | Whether to search for database records in pidList and its subpages. | 1 |
List settings
Property: | Data type: | Description: | Default: |
|---|---|---|---|
orderByFields | string | A list of fields the lists can be sorted by. Some fields don't make sense here, so this list does not include all possible employee fields. | Id, fullname, zip, city, country, birthday, sex, signature, company, firstentry, telephone, fax, email, website, description, username, ipaddress, lastwinlogon |
Flexform settings
These settings refer to the flexform settings. If these are set in the template, you don't have to set them in the flexform. If both are set, flexform values will take effect. Look at the example below the table to get a feeling on how to address the fields correctly.
Property: | Data type: | Description: | Default: |
|---|---|---|---|
general.listPage | int | ID of the default employee list page. | 0 |
general.detailsPage | int | ID of the employee details page. | 0 |
general.deptListPage | int | ID of the department list page. | 0 |
general.posListPage | int | ID of the position list page. | 0 |
general.numberListPage | int | ID of the collective number list page. | 0 |
general.specialGroups | string | Defines special groups.Example: specialGroups ( 37,ico_football.gif,Plays football 38,ico_firstAid.gif,Is able to give First Aid ) Result: departments 37 and 38 aren't shown on lists but as icons (the GIF-files) with info texts ('plays football' etc.) on the employees' details pages. | |
list.dateFormat | string | The date format (strftime) on the lists. | %d.%m.%Y |
list.listfields | string | The fields to display on the lists. For possible values see section Settings for list page. | fullname |
list.sortable | bool | Whether the list can be sorted by its columns. | 1 |
list.linkNames | bool | Whether employees' names will be linked to the details pages. | 1 |
list.showAnchors | bool | Whether to show a list of links to new first letters of the current sorting column. | 1 |
list.imageMaxWidth | int | Maximum image width in pixel. | 100 |
list.imageMaxHeight | int | Maximum image height in pixel. | 100 |
list.clickEnlarge | bool | Whether to link the employees' images to the original images. | 1 |
list.excludeGroups | string | A list of groups to exclude from the list. Example: excludeGroups = 22,23 Result: Employees in groups 22 or 23 will not be shown on the list. | |
list.excludeGroupsInfo | bool | Whether to list the excluded groups below the list. | 1 |
list.priorityClasses | string | A list of CSS-classes that will be assigned to employees when they have a certain priority. Example: priorityClasses ( 49,lowPriority 55,highPriority 60,higherPriority 70,highestPriority ) Result: Employees below priority 49 will be assigned the CSS-class 'lowPriority', employees above priority 55 will be assigned the CSS-class 'highPriority' etc. | 49,lowPriority 55,highPriority 60,higherPriority 70,highestPriority |
details.dateFormat | string | The date format (strftime) on the details page. | %d. %B %Y |
details.fields | string | The fields to display in the details section. For possible values see section Settings for list page. | fulladdress, birthday, hobbies |
details.imageMaxWidth | int | Maximum image width in pixel. | 150 |
details.imageMaxHeight | int | Maximum image height in pixel. | 150 |
details.clickEnlarge | bool | Whether to link the employees' images to the original images. | 1 |
details.customFields | string | A list of fields on the details page that will be linked to custom lists. Example: customFields = city,zip Result: A click on the city or the zip leads to a list of all employees having the same city / zip. | |
specialLists.ILcolumns | int | Number of columns on the image list. | 5 |
specialLists.BLcolumns | int | Number of columns on the birthday list. | 2 |
specialLists.BLrows | int | Number of rows on the birthday list. | 100 |
specialLists.TLcolumns | int | Number of columns on the telephone list. | 2 |
Example
Here is a sample configuration of the extension:
plugin.tx_smemployeelist_pi1 {pidList = 21
recursive = 1
flexform { general {listPage = 11
detailsPage = 12
deptListPage = 13
posListPage = 14
numberListPage = 15
specialGroups (
37,ico_football.gif,Plays football
38,ico_firstAid.gif,Is able to give First Aid
)
)
list {dateFormat = %d.%m.%Y
listfields = fullname,signature,telephone
sortable = 1
linkNames = 1
showAnchors = 1
imageMaxWidth = 100
imageMaxHeight = 100
clickEnlarge = 1
excludeGroups = 23,24
excludeGroupsInfo = 1
priorityClasses (
49,lowPriority
55,highPriority
60,higherPriority
70,highestPriority
)
}
details {dateFormat = %d. %B %Y
fields = fulladdress,birthday,hobbies,firstentry,collectivenumbers
imageMaxWidth = 150
imageMaxHeight = 150
clickEnlarge = 1
}
specialLists {ILcolumns = 5
BLcolumns = 2
BLrows = 100
TLcolumns = 2
}
}
}