From f5533142ea41f0d905f0cd58d08a58682c18ee2f Mon Sep 17 00:00:00 2001 From: Robbe Serry Date: Wed, 1 Nov 2023 17:54:20 +0000 Subject: [PATCH] remove obsolete controllers and views --- .../Corporate/InternshipController.php | 340 ----------------- .../Corporate/StudentJobController.php | 341 ------------------ .../Resources/config/assetic.config.php | 28 -- .../Resources/config/install/acl.config.php | 6 - .../config/install/configuration.config.php | 15 - .../views/br/career/company/view.twig | 4 +- .../views/br/career/internshipfair/view.twig | 2 +- .../views/br/corporate/internship/add.twig | 17 - .../corporate/internship/delete-request.twig | 3 - .../views/br/corporate/internship/delete.twig | 3 - .../views/br/corporate/internship/edit.twig | 1 - .../br/corporate/internship/overview.twig | 248 ------------- .../views/br/corporate/student-job/add.twig | 17 - .../corporate/student-job/delete-request.twig | 3 - .../br/corporate/student-job/delete.twig | 3 - .../views/br/corporate/student-job/edit.twig | 1 - .../br/corporate/student-job/overview.twig | 254 ------------- 17 files changed, 3 insertions(+), 1283 deletions(-) delete mode 100644 module/BrBundle/Controller/Corporate/InternshipController.php delete mode 100644 module/BrBundle/Controller/Corporate/StudentJobController.php delete mode 100644 module/BrBundle/Resources/views/br/corporate/internship/add.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/internship/delete-request.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/internship/delete.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/internship/edit.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/internship/overview.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/student-job/add.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/student-job/delete-request.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/student-job/delete.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/student-job/edit.twig delete mode 100644 module/BrBundle/Resources/views/br/corporate/student-job/overview.twig diff --git a/module/BrBundle/Controller/Corporate/InternshipController.php b/module/BrBundle/Controller/Corporate/InternshipController.php deleted file mode 100644 index 802a31a08a..0000000000 --- a/module/BrBundle/Controller/Corporate/InternshipController.php +++ /dev/null @@ -1,340 +0,0 @@ - - */ -class InternshipController extends \BrBundle\Component\Controller\CorporateController -{ - public function overviewAction() - { - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $paginator = $this->paginator()->createFromQuery( - $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Job') - ->findAllActiveByCompanyAndTypeQuery($person->getCompany(), 'internship'), - $this->getParam('page') - ); - - $logoPath = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.public_logo_path'); - - $requests = $this->getOpenRequests($person->getCompany()); - - $unfinishedRequestsJobs = array(); - foreach ($requests as $request) { - $unfinishedRequestsJobs[$request->getJob()->getId()] = $request->getRequestType(); - } - - return new ViewModel( - array( - 'paginator' => $paginator, - 'paginationControl' => $this->paginator()->createControl(true), - 'logoPath' => $logoPath, - 'requests' => $requests, - 'unfinishedRequests' => $unfinishedRequestsJobs, - ) - ); - } - - public function addAction() - { - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $form = $this->getForm('br_corporate_job_add'); - - if ($this->getRequest()->isPost()) { - $formData = $this->getRequest()->getPost(); - $form->setData($formData); - - if ($form->isValid()) { - $job = $form->hydrateObject( - new Job($person->getCompany(), 'internship') - ); - - $job->pending(); - - $this->getEntityManager()->persist($job); - - $request = new Request($job, 'add', $person); - - $this->getEntityManager()->persist($request); - $this->getEntityManager()->flush(); - - $mailAddress = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.vacancy_mail'); - - $mailName = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.vacancy_mail_name'); - - $link = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.vacancy_link'); - - $mail = new Message(); - $mail->setBody($link) - ->setFrom($mailAddress, $mailName) - ->addTo($mailAddress, $mailName) - ->setSubject('New Request ' . $person->getCompany()->getName()); - - if (getenv('APPLICATION_ENV') != 'development') { - $this->getMailTransport()->send($mail); - } - - $this->flashMessenger()->success( - 'Success', - 'The request has been sent to our administrators for approval.' - ); - - $this->redirect()->toRoute( - 'br_corporate_internship', - array( - 'action' => 'overview', - ) - ); - - return new ViewModel(); - } - } - - return new ViewModel( - array( - 'form' => $form, - ) - ); - } - - public function editAction() - { - $oldJob = $this->getInternshipEntity(); - if ($oldJob === null) { - return new ViewModel(); - } - - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $requests = $this->getOpenRequests($person->getCompany()); - - $unfinishedRequestsJobs = array(); - foreach ($requests as $request) { - if ($request->getRequestType() == 'edit' || $request->getRequestType() == 'edit reject') { - $unfinishedRequestsJobs[$request->getEditJob()->getId()] = $request->getRequestType(); - } elseif ($request->getRequestType() == 'delete') { - $unfinishedRequestsJobs[$request->getJob()->getId()] = $request->getRequestType(); - } - } - - if (isset($unfinishedRequestsJobs[$oldJob->getId()])) { - $this->redirect()->toRoute( - 'br_corporate_internship', - array( - 'action' => 'overview', - ) - ); - } - - $form = $this->getForm('br_corporate_job_edit', array('job' => $oldJob)); - - if ($this->getRequest()->isPost()) { - $formData = $this->getRequest()->getPost(); - $form->setData($formData); - - if ($form->isValid()) { - if ($oldJob->isApproved()) { - $job = $form->hydrateObject( - new Job($person->getCompany(), 'internship') - ); - $job->pending(); - $this->getEntityManager()->persist($job); - - $request = new Request($job, 'edit', $person, $oldJob); - $this->getEntityManager()->persist($request); - } else { - $job = $form->hydrateObject($oldJob); - $this->getEntityManager()->persist($job); - - $unhandledRequest = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findUnhandledRequestsByJob($oldJob); - - if (count($unhandledRequest) == 0) { - $oldRequest = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findOneByJob($oldJob->getId()); - - $request = new Internship($job, 'edit reject', $person, $oldRequest->getEditJob()); - $this->getEntityManager()->persist($request); - - if (isset($oldRequest)) { - $this->getEntityManager()->remove($oldRequest); - } - } - } - - $this->getEntityManager()->flush(); - - $this->flashMessenger()->success( - 'Success', - 'The request has been sent to our administrators for approval.' - ); - - $this->redirect()->toRoute( - 'br_corporate_internship', - array( - 'action' => 'overview', - ) - ); - - return new ViewModel(); - } - } - - return new ViewModel( - array( - 'form' => $form, - ) - ); - } - - public function deleteAction() - { - $internship = $this->getInternshipEntity(); - if ($internship === null) { - return new ViewModel(); - } - - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $internship->remove(); - $this->getEntityManager()->persist($internship); - $this->getEntityManager()->flush(); - - return new ViewModel( - array( - 'result' => (object) array('status' => 'success'), - ) - ); - } - - public function deleteRequestAction() - { - $request = $this->getRequestEntity(); - if ($request === null) { - $this->redirect()->toRoute( - 'br_corporate_internship', - array( - 'action' => 'overview', - ) - ); - } - - $request = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findOneById($request->getId()); - - $this->getEntityManager()->remove($request); - $this->getEntityManager()->flush(); - - return new ViewModel( - array( - 'result' => (object) array('status' => 'success'), - ) - ); - } - - /** - * @return Job|null - */ - private function getInternshipEntity() - { - $job = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Job') - ->findOneActiveById($this->getParam('id', 0)); - - if (!($job instanceof Job)) { - $this->flashMessenger()->error( - 'Error', - 'No internship was found!' - ); - - $this->redirect()->toRoute( - 'br_career_vacancy', - array( - 'action' => 'overview', - ) - ); - - return; - } - - return $job; - } - - /** - * @return \BrBundle\Entity\Company\Request|null - */ - private function getRequestEntity() - { - $request = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findOneById($this->getParam('id', 0)); - - if (!($request instanceof Request)) { - $this->flashMessenger()->error( - 'Error', - 'No request was found!' - ); - - $this->redirect()->toRoute( - 'br_career_vacancy', - array( - 'action' => 'overview', - ) - ); - - return; - } - - return $request; - } - - /** - * @return array - */ - private function getOpenRequests($company) - { - $unhandledRequests = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findAllUnhandledByCompany($company, null); - - $handledRejects = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request') - ->findRejectsByCompany($company, null); - - return array_merge($handledRejects, $unhandledRequests); - } -} diff --git a/module/BrBundle/Controller/Corporate/StudentJobController.php b/module/BrBundle/Controller/Corporate/StudentJobController.php deleted file mode 100644 index 16e530d297..0000000000 --- a/module/BrBundle/Controller/Corporate/StudentJobController.php +++ /dev/null @@ -1,341 +0,0 @@ - - * @author Incalza Dario - * @author Niels Avonds - */ -class StudentJobController extends \BrBundle\Component\Controller\CorporateController -{ - public function overviewAction() - { - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $paginator = $this->paginator()->createFromQuery( - $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Job') - ->findAllActiveByCompanyAndTypeQuery($person->getCompany(), 'student job'), - $this->getParam('page') - ); - - $logoPath = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.public_logo_path'); - - $requests = $this->getOpenRequests($person->getCompany()); - - $unfinishedRequestsJobs = array(); - foreach ($requests as $request) { - $unfinishedRequestsJobs[$request->getJob()->getId()] = $request->getRequestType(); - } - - return new ViewModel( - array( - 'paginator' => $paginator, - 'paginationControl' => $this->paginator()->createControl(true), - 'logoPath' => $logoPath, - 'requests' => $requests, - 'unfinishedRequests' => $unfinishedRequestsJobs, - ) - ); - } - - public function addAction() - { - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $form = $this->getForm('br_corporate_job_add'); - - if ($this->getRequest()->isPost()) { - $formData = $this->getRequest()->getPost(); - $form->setData($formData); - - if ($form->isValid()) { - $job = $form->hydrateObject( - new Job($person->getCompany(), 'student job') - ); - - $job->pending(); - - $this->getEntityManager()->persist($job); - - $request = new StudentJob($job, 'add', $person); - - $this->getEntityManager()->persist($request); - $this->getEntityManager()->flush(); - - $mailAddress = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.student_job_mail'); - - $mailName = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.student_job_mail_name'); - - $link = $this->getEntityManager() - ->getRepository('CommonBundle\Entity\General\Config') - ->getConfigValue('br.student_job_link'); - - $mail = new Message(); - $mail->setBody($link) - ->setFrom($mailAddress, $mailName) - ->addTo($mailAddress, $mailName) - ->setSubject('New student Job Request ' . $person->getCompany()->getName()); - - if (getenv('APPLICATION_ENV') != 'development') { - $this->getMailTransport()->send($mail); - } - - $this->flashMessenger()->success( - 'Success', - 'The request has been sent to our administrators for approval.' - ); - - $this->redirect()->toRoute( - 'br_corporate_student_job', - array( - 'action' => 'overview', - ) - ); - - return new ViewModel(); - } - } - - return new ViewModel( - array( - 'form' => $form, - ) - ); - } - - public function editAction() - { - $oldJob = $this->getStudentJobEntity(); - if ($oldJob === null) { - return new ViewModel(); - } - - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $requests = $this->getOpenRequests($person->getCompany()); - - $unfinishedRequestsJobs = array(); - foreach ($requests as $request) { - if ($request->getRequestType() == 'edit' || $request->getRequestType() == 'edit reject') { - $unfinishedRequestsJobs[$request->getEditJob()->getId()] = $request->getRequestType(); - } elseif ($request->getRequestType() == 'delete') { - $unfinishedRequestsJobs[$request->getJob()->getId()] = $request->getRequestType(); - } - } - - if (isset($unfinishedRequestsJobs[$oldJob->getId()])) { - $this->redirect()->toRoute( - 'br_corporate_student_job', - array( - 'action' => 'overview', - ) - ); - } - - $form = $this->getForm('br_corporate_job_edit', array('job' => $oldJob)); - - if ($this->getRequest()->isPost()) { - $formData = $this->getRequest()->getPost(); - $form->setData($formData); - - if ($form->isValid()) { - if ($oldJob->isApproved()) { - $job = $form->hydrateObject( - new Job($person->getCompany(), 'student job') - ); - $job->pending(); - $this->getEntityManager()->persist($job); - - $request = new StudentJob($job, 'edit', $person, $oldJob); - $this->getEntityManager()->persist($request); - } else { - $job = $form->hydrateObject($oldJob); - $this->getEntityManager()->persist($job); - - $unhandledRequest = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findUnhandledRequestsByJob($oldJob); - - if (count($unhandledRequest) == 0) { - $oldRequest = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findOneByJob($oldJob->getId()); - - $request = new StudentJob($job, 'edit reject', $person, $oldRequest->getEditJob()); - $this->getEntityManager()->persist($request); - - if (isset($oldRequest)) { - $this->getEntityManager()->remove($oldRequest); - } - } - } - - $this->getEntityManager()->flush(); - - $this->flashMessenger()->success( - 'Success', - 'The request has been sent to our administrators for approval.' - ); - - $this->redirect()->toRoute( - 'br_corporate_student_job', - array( - 'action' => 'overview', - ) - ); - - return new ViewModel(); - } - } - - return new ViewModel( - array( - 'form' => $form, - ) - ); - } - - public function deleteAction() - { - $studentJob = $this->getStudentJobEntity(); - if ($studentJob === null) { - return new ViewModel(); - } - - $person = $this->getCorporateEntity(); - if ($person === null) { - return new ViewModel(); - } - - $studentJob->remove(); - $this->getEntityManager()->persist($studentJob); - $this->getEntityManager()->flush(); - - return new ViewModel( - array( - 'result' => (object) array('status' => 'success'), - ) - ); - } - - public function deleteRequestAction() - { - $request = $this->getRequestEntity(); - if ($request === null) { - $this->redirect()->toRoute( - 'br_corporate_student_job', - array( - 'action' => 'overview', - ) - ); - } - - $request = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findOneById($request->getId()); - - $this->getEntityManager()->remove($request); - $this->getEntityManager()->flush(); - - return new ViewModel( - array( - 'result' => (object) array('status' => 'success'), - ) - ); - } - - /** - * @return Job|null - */ - private function getStudentJobEntity() - { - $job = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Job') - ->findOneActiveByTypeAndId('student job', $this->getParam('id', 0)); - - if (!($job instanceof Job)) { - $this->flashMessenger()->error( - 'Error', - 'No job was found!' - ); - - $this->redirect()->toRoute( - 'br_career_student_job', - array( - 'action' => 'overview', - ) - ); - - return; - } - - return $job; - } - - /** - * @return StudentJob|null - */ - private function getRequestEntity() - { - $request = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findOneById($this->getParam('id', 0)); - - if (!($request instanceof StudentJob)) { - $this->flashMessenger()->error( - 'Error', - 'No request was found!' - ); - - $this->redirect()->toRoute( - 'br_career_student_job', - array( - 'action' => 'overview', - ) - ); - - return; - } - - return $request; - } - - /** - * @return array - */ - private function getOpenRequests($company) - { - $unhandledRequests = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findAllUnhandledByCompany($company); - - $handledRejects = $this->getEntityManager() - ->getRepository('BrBundle\Entity\Company\Request\StudentJob') - ->findRejectsByCompany($company); - - return array_merge($handledRejects, $unhandledRequests); - } -} diff --git a/module/BrBundle/Resources/config/assetic.config.php b/module/BrBundle/Resources/config/assetic.config.php index b9dd87ba47..aa48989eb0 100644 --- a/module/BrBundle/Resources/config/assetic.config.php +++ b/module/BrBundle/Resources/config/assetic.config.php @@ -389,34 +389,6 @@ '@bootstrap_js_alert', '@bootstrap_js_rowlink', ), - 'br_career_student_job' => array( - '@common_jquery', - '@bootstrap_css', - '@site_css', - '@bootstrap_js_dropdown', - '@bootstrap_js_transition', - '@bootstrap_js_modal', - '@bootstrap_js_carousel', - '@bootstrap_js_tooltip', - '@bootstrap_js_popover', - '@bootstrap_js_collapse', - '@bootstrap_js_alert', - '@bootstrap_js_rowlink', - ), - 'br_career_internship' => array( - '@common_jquery', - '@bootstrap_css', - '@site_css', - '@bootstrap_js_dropdown', - '@bootstrap_js_transition', - '@bootstrap_js_modal', - '@bootstrap_js_carousel', - '@bootstrap_js_tooltip', - '@bootstrap_js_popover', - '@bootstrap_js_collapse', - '@bootstrap_js_alert', - '@bootstrap_js_rowlink', - ), 'br_career_event' => array( '@common_jquery', '@bootstrap_css', diff --git a/module/BrBundle/Resources/config/install/acl.config.php b/module/BrBundle/Resources/config/install/acl.config.php index e99286bf65..31c371d017 100644 --- a/module/BrBundle/Resources/config/install/acl.config.php +++ b/module/BrBundle/Resources/config/install/acl.config.php @@ -80,12 +80,6 @@ 'br_career_vacancy' => array( 'view', 'overview', ), - 'br_career_internship' => array( - 'view', 'overview', - ), - 'br_career_student_job' => array( - 'view', 'overview', - ), 'br_career_internshipfair' => array( 'view', 'overview', 'file', 'search', ), diff --git a/module/BrBundle/Resources/config/install/configuration.config.php b/module/BrBundle/Resources/config/install/configuration.config.php index c92ca73597..0c721302f3 100644 --- a/module/BrBundle/Resources/config/install/configuration.config.php +++ b/module/BrBundle/Resources/config/install/configuration.config.php @@ -292,21 +292,6 @@ 'value' => 'https://vtk.be/admin/br/request/', 'description' => '', ), - array( - 'key' => 'br.student_job_mail', - 'value' => 'bedrijvenrelaties@vtk.be', - 'description' => 'The mail address to which notifications should be send when a company makes a new vacancy/StudentJob request.', - ), - array( - 'key' => 'br.student_job_mail_name', - 'value' => 'VTK Bedrijvenrelaties', - 'description' => '', - ), - array( - 'key' => 'br.student_job_link', - 'value' => 'https://vtk.be/admin/br/request/', - 'description' => '', - ), array( 'key' => 'br.invoice_header_extra_text', 'value' => 'RPR Leuven', diff --git a/module/BrBundle/Resources/views/br/career/company/view.twig b/module/BrBundle/Resources/views/br/career/company/view.twig index 6b414518b0..0522efa82b 100644 --- a/module/BrBundle/Resources/views/br/career/company/view.twig +++ b/module/BrBundle/Resources/views/br/career/company/view.twig @@ -78,7 +78,7 @@
{% for internship in internships %} - + {{ internship.getName() }} {% endfor %} @@ -94,7 +94,7 @@
{% for studentJob in studentJobs %} - + {{ studentJob.getName() }} {% endfor %} diff --git a/module/BrBundle/Resources/views/br/career/internshipfair/view.twig b/module/BrBundle/Resources/views/br/career/internshipfair/view.twig index b5a85ba97c..caca81696e 100644 --- a/module/BrBundle/Resources/views/br/career/internshipfair/view.twig +++ b/module/BrBundle/Resources/views/br/career/internshipfair/view.twig @@ -115,7 +115,7 @@ {% for internship in internships %} - + {{ internship.getName() }}
{{ translate('Last Updated: ') }}{{ dateLocalized(internship.getLastUpdateDate(), 'd MMMM y') }}
diff --git a/module/BrBundle/Resources/views/br/corporate/internship/add.twig b/module/BrBundle/Resources/views/br/corporate/internship/add.twig deleted file mode 100644 index ebd36bb494..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/internship/add.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'corporate/partials/internship.twig' %} - -{% block content %} -
- -
-

{{ translate('Internship') }}

-
-
- -
- - {% import 'site/partials/form.twig' as forms %} - {{ forms.renderForm(form) }} - -
-{% endblock %} diff --git a/module/BrBundle/Resources/views/br/corporate/internship/delete-request.twig b/module/BrBundle/Resources/views/br/corporate/internship/delete-request.twig deleted file mode 100644 index 89e8fe679b..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/internship/delete-request.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% autoescape false %} - {{ result|json_encode }} -{% endautoescape %} diff --git a/module/BrBundle/Resources/views/br/corporate/internship/delete.twig b/module/BrBundle/Resources/views/br/corporate/internship/delete.twig deleted file mode 100644 index 89e8fe679b..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/internship/delete.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% autoescape false %} - {{ result|json_encode }} -{% endautoescape %} diff --git a/module/BrBundle/Resources/views/br/corporate/internship/edit.twig b/module/BrBundle/Resources/views/br/corporate/internship/edit.twig deleted file mode 100644 index 608c4ea219..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/internship/edit.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends 'br/corporate/internship/add.twig' %} diff --git a/module/BrBundle/Resources/views/br/corporate/internship/overview.twig b/module/BrBundle/Resources/views/br/corporate/internship/overview.twig deleted file mode 100644 index 2ac46cfa90..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/internship/overview.twig +++ /dev/null @@ -1,248 +0,0 @@ -{% extends 'corporate/partials/internship.twig' %} - -{% block content %} - -
-
- - - {#
- × -
- {{ translate('An error occurred while removing internship.') }} -
-
-
- × -
- {{ translate('The removal of the internship was succesfully registered. This will be reviewed by our corporate relations team.') }} -
-
-
- × -
- {{ translate('An error occurred while removing request.') }} -
-
-
- × -
- {{ translate('The removal of the request was succesfully registered.') }} -
-
#} - -
-
-

{{ translate('Internships') }}

-
{{ translate('currently listed on our website') }}
-
- -
-
-
- {% set onceDisabled = false %} - - {% for internship in paginator %} - {% if not internship.isApproved() == false %} - - - - - - - {% endif %} - {% else %} -
- × - {{ translate('No items found') }} -
- {% endfor %} -
- - {% if internship.getCompany().getLogo() is not empty %} - {{ internship.getCompany().getName() }} - {% else %} -
{{ internship.getCompany().getName() }}
- {% endif %} -
-
- {{ internship.getCompany().getName() }} - {{ internship.getName() }} -
- - {{ internship.getSummary(200)|replace({'

': '', '

': '', '
': '', '
': ''})|raw }} -
- {{ translate('View') }} - {% set disabled = ((unfinishedRequests[internship.getId()] == 'delete' or unfinishedRequests[internship.getId()] == 'edit') or unfinishedRequests[internship.getId()] == 'edit reject') %} - {{ translate('Edit') }} - {{ translate('Delete') }} - {% if disabled == true %} {% set onceDisabled = true %}{% endif %} -
- {% include 'site/partials/paginationControl.twig' %} -
- {% if onceDisabled == true %} -
- × - {{ translate('You can only edit or delete when there are no pending or rejectjed requests. Edit or delete the requests if you want to make changes.') }} -
- {% endif %} -
- {% if not requests is empty %} -
-
-

{{ translate('Requests') }}

-
-
-
- {% set onceRejected = false %} - {% set oncePending = false %} -
- - {% for request in requests %} - {% if request.getStatus() == 'rejected' %}{% set onceRejected = true %}{% endif %} - {% if request.getStatus() == 'pending' %}{% set oncePending = true %}{% endif %} - - - - - - {% endfor %} -
- Type: {{ translate(request.getRequestType()) }} -
- Status: {{ translate(request.getStatus()) }} -
- {{ request.getJob().getCompany().getName() }} - {{ request.getJob().getName() }} - -
- {% if request.getStatus() == 'rejected' %} - {{ request.getRejectMessage()|replace({'

': '', '

': '', '
': '', '
': ''})|raw }}
- {% else %} - {{ request.getJob().getSummary(200)|replace({'

': '', '

': '', '
': '', '
': ''})|raw }} - {% endif %} -
- {{ translate('View') }} - {% if not (request.getRequestType() == 'delete') %} - {{ translate('Edit') }} - {% endif %} - {{ translate('Delete') }} -
-
- {% if onceRejected == true %} -
- × - {{ translate('You have one or more rejected requests. Edit the requests if you want to ask for approval again, or delete them if you don\'t need them anymore.') }} -
- {% endif %} - {% if oncePending == true %} -
- × - {{ translate('You have one or more pending requests. We will handle these as fast as possible. Edit the requests if you want to make more changes, or delete them if you don\'t need them anymore.') }} -
- {% endif %} -
- {% endif %} - - - - -
-{% endblock %} - -{% block content_script %} - -{% endblock %} diff --git a/module/BrBundle/Resources/views/br/corporate/student-job/add.twig b/module/BrBundle/Resources/views/br/corporate/student-job/add.twig deleted file mode 100644 index 3cd594f9f2..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/student-job/add.twig +++ /dev/null @@ -1,17 +0,0 @@ -{% extends 'corporate/partials/studentjob.twig' %} - -{% block content %} -
- -
-

{{ translate('Student Job') }}

-
-
- -
- - {% import 'site/partials/form.twig' as forms %} - {{ forms.renderForm(form) }} - -
-{% endblock %} diff --git a/module/BrBundle/Resources/views/br/corporate/student-job/delete-request.twig b/module/BrBundle/Resources/views/br/corporate/student-job/delete-request.twig deleted file mode 100644 index 89e8fe679b..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/student-job/delete-request.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% autoescape false %} - {{ result|json_encode }} -{% endautoescape %} diff --git a/module/BrBundle/Resources/views/br/corporate/student-job/delete.twig b/module/BrBundle/Resources/views/br/corporate/student-job/delete.twig deleted file mode 100644 index 89e8fe679b..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/student-job/delete.twig +++ /dev/null @@ -1,3 +0,0 @@ -{% autoescape false %} - {{ result|json_encode }} -{% endautoescape %} diff --git a/module/BrBundle/Resources/views/br/corporate/student-job/edit.twig b/module/BrBundle/Resources/views/br/corporate/student-job/edit.twig deleted file mode 100644 index e63af54bae..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/student-job/edit.twig +++ /dev/null @@ -1 +0,0 @@ -{% extends 'br/corporate/student-job/add.twig' %} diff --git a/module/BrBundle/Resources/views/br/corporate/student-job/overview.twig b/module/BrBundle/Resources/views/br/corporate/student-job/overview.twig deleted file mode 100644 index bbe2a68aaa..0000000000 --- a/module/BrBundle/Resources/views/br/corporate/student-job/overview.twig +++ /dev/null @@ -1,254 +0,0 @@ -{% extends 'corporate/partials/studentjob.twig' %} - -{% block content %} - -
-
- - - {#
- × -
- {{ translate('An error occurred while removing student job.') }} -
-
-
- × -
- {{ translate('The removal of the student job was succesfully registered. This will be reviewed by our corporate relations team.') }} -
-
-
- × -
- {{ translate('An error occurred while removing request.') }} -
-
-
- × -
- {{ translate('The removal of the request was succesfully registered.') }} -
-
#} - -
-
-

{{ translate('Student Jobs') }}

-
{{ translate('currently listed on our website') }}
-
- -
-
- {% set onceDisabled = false %} -
- - {% for studentJob in paginator %} - {% if not studentJob.isApproved() == false %} - - - - - - - - - {% endif %} - {% else %} -
- × - {{ translate('No items found') }} -
- {% endfor %} -
- - {% if studentJob.getCompany().getLogo() is not empty %} - {{ studentJob.getCompany().getName() }} - {% else %} -
{{ studentJob.getCompany().getName() }}
- {% endif %} -
-
- {{ studentJob.getCompany().getName() }} - {{ studentJob.getName() }} -
- -
- {{ studentJob.getSummary(200)|replace({'

': '', '

': '', '
': '', '
': ''})|raw }} -
- {{ translate('View') }} - {% set disabled = ((unfinishedRequests[studentJob.getId()] == 'delete' or unfinishedRequests[studentJob.getId()] == 'edit') or unfinishedRequests[studentJob.getId()] == 'edit reject') %} - {{ translate('Edit') }} - {{ translate('Delete') }} - {% if disabled == true %} {% set onceDisabled = true %}{% endif %} -
- - {% include 'site/partials/paginationControl.twig' %} -
- {% if onceDisabled == true %} -
- × - {{ translate('You can only edit or delete when there are no pending or rejectjed requests. Edit or delete the requests if you want to make changes.') }} -
- {% endif %} -
- {% if not requests is empty %} -
-
-

{{ translate('Requests') }}

-
-
-
- {% set onceRejected = false %} - {% set oncePending = false %} -
- - {% for request in requests %} - {% if request.getStatus() == 'rejected' %}{% set onceRejected = true %}{% endif %} - {% if request.getStatus() == 'pending' %}{% set oncePending = true %}{% endif %} - - - - - - {% endfor %} -
- Type: {{ translate(request.getRequestType()) }} -

- Status: {{ translate(request.getStatus()) }} -
- {{ request.getJob().getCompany().getName() }} - {{ request.getJob().getName() }} -
- -
- {% if request.getStatus() == 'rejected' %} - {{ request.getRejectMessage()|replace({'

': '', '

': '', '
': '', '
': ''})|raw }}
- {% else %} - {{ request.getJob().getSummary(200)|replace({'

': '', '

': '', '
': '', '
': ''})|raw }} - {% endif %} -
- {{ translate('View') }} - {% if not (request.getRequestType() == 'delete') %} - {{ translate('Edit') }} - {% endif %} - {{ translate('Delete') }} -
-
- {% if onceRejected == true %} -
- × - {{ translate('You have one or more rejected requests. Edit the requests if you want to ask for approval again, or delete them if you don\'t need them anymore.') }} -
- {% endif %} - {% if oncePending == true %} -
- × - {{ translate('You have one or more pending requests. We will handle these as fast as possible. Edit the requests if you want to make more changes, or delete them if you don\'t need them anymore.') }} -
- {% endif %} -
- {% endif %} - - - - - -
-{% endblock %} - -{% block content_script %} - -{% endblock %} \ No newline at end of file