Skip to content
Snippets Groups Projects
Commit dcbfb5c1 authored by Sergiu-Lucian Petrica's avatar Sergiu-Lucian Petrica
Browse files

Allowed for larger application titles + made documentation + changed file save location

parent 5b353439
No related branches found
No related tags found
1 merge request!1Feature/multi upload
......@@ -92,7 +92,7 @@ class JoblistController extends AbstractAjaxController {
ResourceFactory::class
);
$storage = $resourceFactory->getStorageObject(1);
$fileObject = $storage->getFile('/Applications/temp/' . $GLOBALS['TSFE']->fe_user->id . '/' . $type . '/' . $file);
$fileObject = $storage->getFile('/Extension/temp/' . $GLOBALS['TSFE']->fe_user->id . '/' . $type . '/' . $file);
$storage->deleteFile($fileObject);
}
}
......@@ -211,7 +211,7 @@ class JoblistController extends ActionController {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$resourceFactory = $objectManager->get(ResourceFactory::class);
$storage = $resourceFactory->getStorageObject(1);
$folderObject = $storage->getFolder('/Applications/' . $folder);
$folderObject = $storage->getFolder('/Extension/' . $folder);
return $storage->getFilesInFolder($folderObject);
}
......@@ -253,7 +253,7 @@ class JoblistController extends ActionController {
$storage = $resourceFactory->getStorageObject(1);
$newName = date('Ymd-His') . '_' . $applicationData->getFirstName();
$sourceFolder = $storage->getFolder('/Applications/temp/' . $folder);
$sourceFolder = $storage->getFolder('/Extension/temp/' . $folder);
$subFolders = $storage->getFoldersInFolder($sourceFolder);
$fileNames = [];
......@@ -268,11 +268,11 @@ class JoblistController extends ActionController {
}
$sourceFolder->rename($newName);
$sourceFolder = $storage->getFolder('/Applications/temp/' . $newName);
if (!$storage->hasFolder('/Applications/jobs/')) {
$storage->createFolder('/Applications/jobs/');
$sourceFolder = $storage->getFolder('/Extension/temp/' . $newName);
if (!$storage->hasFolder('/Extension/JobApplication/')) {
$storage->createFolder('/Extension/JobApplication/');
}
$targetFolder = $storage->getFolder('/Applications/jobs/');
$targetFolder = $storage->getFolder('/Extension/JobApplication/');
$applicationFile = $storage->createFile($newName . '.txt', $sourceFolder);
$applicationFilePath = str_replace(
......@@ -369,11 +369,11 @@ class JoblistController extends ActionController {
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
$resourceFactory = $objectManager->get(ResourceFactory::class);
$storage = $resourceFactory->getStorageObject(1);
if (!$storage->hasFolder('/Applications/temp/' . $applicationId . '/' . $fieldName)) {
$storage->createFolder('/Applications/temp/' . $applicationId . '/' . $fieldName);
if (!$storage->hasFolder('/Extension/temp/' . $applicationId . '/' . $fieldName)) {
$storage->createFolder('/Extension/temp/' . $applicationId . '/' . $fieldName);
}
$targetFalDirectory = '1:/Applications/temp/' . $applicationId . '/' . $fieldName;
$targetFalDirectory = '1:/Extension/temp/' . $applicationId . '/' . $fieldName;
// Register every upload field from the form:
$this->registerUploadField($data, $namespace, $fieldName, $targetFalDirectory);
......
......@@ -27,6 +27,7 @@ namespace SGalinski\SgJobs\Domain\Model;
***************************************************************/
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
/**
* The JobApplication model
......@@ -138,6 +139,12 @@ class JobApplication extends AbstractEntity {
*/
protected $message = '';
public function __construct() {
$this->coverLetter = new ObjectStorage();
$this->cv = new ObjectStorage();
$this->certificates = new ObjectStorage();
}
/**
* @return string
*/
......
# Configuration Steps
# Ext: sg_jobs
The first step is, that you need to change the extension key. You can do it by simply changing the folder name to the new key.
Example: sg_jobs => sg_timeline
<img src="https://www.sgalinski.de/typo3conf/ext/project_theme/Resources/Public/Images/logo.svg" />
Now you need to replace the following occourences:
License: [GNU GPL, Version 2](https://www.gnu.org/licenses/gpl-2.0.html)
- sg_jobs => sg_timeline
- tx_sgjobs => tx_sgtimeline
- tx-sgjobs => tx-sgtimeline
- SgJobs => SgTimeline
Repository: https://gitlab.sgalinski.de/typo3/sg_account
After you have done this, you need to adapt the data in the ext_emconf.php and the composer.json.
Please report bugs here: https://gitlab.sgalinski.de/typo3/sg_account
## Own Tables
TYPO3 version: >7.6
Search in your project for the "@todo own_tables:" comments and solve them.
## About
This extension provides job application functionality for a Typo3 installation
This files are used:
- Classes/Domain/Model/Base.php
- Classes/Domain/Repository/BaseRepository.php
- Configuration/TCA/tx_sgjobs_domain_model_base.php
- Resources/Private/Language/de.locallang_db.xlf
- Resources/Private/Language/locallang_db.xlf
- Resources/Public/Icons/tx_sgjobs_domain_model_base.png
- ext_tables.php
- ext_tables.sql
### Features:
* Creating jobs, including related details like companies and contacts
* Applying for the created jobs
* Applications include file uploads
* Every application is saved conveniently in a CSV format, along with the
uploaded files
* Sends mail notifications when applications are submitted
## Frontend Plugin
## Integration
Typoscript files need to be included manually
Search in your project for the "@todo frontend_plugin:" comments and solve them.
This files are used:
- Classes/Controller/ListController.php
- Resources/Private/Language/de.locallang.xlf
- Resources/Private/Language/de.locallang_backend.xlf
- Resources/Private/Language/locallang.xlf
- Resources/Private/Language/locallang_backend.xlf
- Resources/Private/Layouts/Default.html
- Resources/Private/Partials/ListEntry.html
- Resources/Private/Templates/List/Detail.html
- Resources/Private/Templates/List/ListAll.html
- ext_localconf.php
- ext_tables.php
```
plugin.tx_sgjobs {
settings {
allowedFileExtensions - allowed file extensions for the uploads (default pdf)
allowedMimeTypes - allowed mime types for the uploads (default application/pdf)
}
}
```
## Backend Module
The Backend module is found in the **WEB** section under the name **Job Offers**
Search in your project for the "@todo backend_module:" comments and solve them.
This files are used:
- Classes/Controller/ModerationController.php
- Configuration/TypoScript/Backend/constants.txt
- Configuration/TypoScript/Backend/setup.txt
- Resources/Private/Backend/Layouts/Default.html
- Resources/Private/Backend/Partials/SomeStuff.html
- Resources/Private/Backend/Templates/Moderation/List.html
- Resources/Private/Language/de.locallang.xlf
- Resources/Private/Language/de.locallang_backend.xlf
- Resources/Private/Language/locallang.xlf
- Resources/Private/Language/locallang_backend.xlf
- Resources/Public/Icons/moderation-module-icon.png
- ext_localconf.php
- ext_tables.sql
You can create a new job offer by clicking on the **New Job Offer** button.
## Composer Autoloader
- Entry in composer json of Project root: "sgalinski/sg-timeline": "dev-master"
## Automated Email Messages
## Last steps
The extension uses **sg_mail** to configure email templates for the following email messages:
- Add Typoscript in Project Theme Aggregate
- Check if there are any "@todo" entries left in your extension, if yes solve them.
- Remove the content from this README and insert your own stuff, like installation or configuration instructions.
```
plugin.tx_sgjobs {
settings {
applicationEmail - the e-mail address that application notifications are sent to
}
}
```
......@@ -3,7 +3,7 @@ CREATE TABLE tx_sgjobs_domain_model_job (
pid int(11) DEFAULT '0' NOT NULL,
-- Custom fields
title varchar(30) DEFAULT '' NOT NULL,
title text DEFAULT '' NOT NULL,
job_id varchar(30) DEFAULT '' NOT NULL,
task text DEFAULT '' NOT NULL,
qualification text DEFAULT '' 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