diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index e4b97a9..c6d186a --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,4 @@ upload.sh Icon? ehthumbs.db Thumbs.db +/nbproject/ diff --git a/app/Controller/HomeController.php b/app/Controller/HomeController.php index 255123a..8ddb0d9 100755 --- a/app/Controller/HomeController.php +++ b/app/Controller/HomeController.php @@ -1,6 +1,7 @@ to($data['User']['mail']); - $Email->subject('Welcome to our really cool thing'); - $Email->template('registration'); + $Email->subject('Willkommen bei dreamJOB'); + $Email->template('registration_company'); $key = substr($data['User']['code'],2); $Email->viewVars(array('data'=>$data,'key'=>$key)); return $Email->send(); diff --git a/app/Model/DreamjobJobApplication.php b/app/Model/DreamjobJobApplication.php index eb7c88d..2ce946c 100644 --- a/app/Model/DreamjobJobApplication.php +++ b/app/Model/DreamjobJobApplication.php @@ -35,12 +35,12 @@ class DreamjobJobApplication extends AppModel { * * @var array */ - public static function sendMail($mail,$id){ + public static function sendMail($mail,$data,$id){ $Email = new CakeEmail('dreamjobMain'); $Email->to($mail); - $Email->subject('Welcome to our really cool thing'); + $Email->subject('Sie haben eine neue Bewerbung auf dreamJOB erhalten'); $Email->template('job_application'); - $Email->viewVars(array('id'=>$id)); + $Email->viewVars(array('id'=>$id,'data'=>$data)); return $Email->send(); } @@ -51,7 +51,7 @@ class DreamjobJobApplication extends AppModel { if($result){ $open = $this->DreamjobJobOpening->find('first', array('conditions' => array('DreamjobJobOpening.id' => $data['DreamjobJobApplication']['opening_id']))); - $result = self::sendMail($open['User']['mail'],$this->id); + $result = self::sendMail($open['User']['mail'],array('DreamjobCompany'=>$open['DreamjobCompany']),$this->id); } if ($result) { diff --git a/app/Model/DreamjobJobMsg.php b/app/Model/DreamjobJobMsg.php index 3f33539..887a930 100644 --- a/app/Model/DreamjobJobMsg.php +++ b/app/Model/DreamjobJobMsg.php @@ -34,12 +34,18 @@ class DreamjobJobMsg extends AppModel { * * @var array */ - public static function sendMail($mail,$id){ + public static function sendMail($mail,$id,$data,$fromcompany=false){ $Email = new CakeEmail('dreamjobMain'); $Email->to($mail); - $Email->subject('Welcome to our really cool thing'); - $Email->template('job_application_msg'); - $Email->viewVars(array('id'=>$id)); + if($fromcompany){ + $Email->subject('Du hast eine neue Nachricht bei dreamJOB'); + $Email->template('job_application_msg_worker'); + }else{ + $Email->subject('Sie haben eine neue Nachricht auf dreamJOB'); + $Email->template('job_application_msg_company'); + } + $Email->attachments(array('dak.jpg' => WWW_ROOT.DS.'mail'.DS.'dak.jpg')); + $Email->viewVars(array('id'=>$id,'data'=>$data)); return $Email->send(); } public function sendMessage(){ @@ -50,9 +56,9 @@ class DreamjobJobMsg extends AppModel { $app = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id' => $result["DreamjobJobMsg"]["application_id"])) ); if($this->fromcompany) - $result = self::sendMail($app['User']['mail'],$this->application_id); + $result = self::sendMail($app['User']['mail'],$this->application_id,array('DreamjobCompany'=>$app['DreamjobCompany']),true); else - $result = self::sendMail($app['WorkerUser']['mail'],$this->application_id); + $result = self::sendMail($app['WorkerUser']['mail'],$this->application_id,array('User'=>$app['WorkerUser'],'AppUser'=>$app['AppUserWorker'])); } if ($result) { $dataSource->commit(); diff --git a/app/Model/DreamjobWorker.php b/app/Model/DreamjobWorker.php index f61d98e..62db1fa 100755 --- a/app/Model/DreamjobWorker.php +++ b/app/Model/DreamjobWorker.php @@ -43,8 +43,8 @@ class DreamjobWorker extends AppModel { public static function sendMail($data){ $Email = new CakeEmail('dreamjobMain'); $Email->to($data['User']['mail']); - $Email->subject('Welcome to our really cool thing'); - $Email->template('registration'); + $Email->subject('Willkommen bei dreamJOB'); + $Email->template('registration_worker'); $key = substr($data['User']['code'],2); $Email->viewVars(array('data'=>$data,'key'=>$key)); return $Email->send(); diff --git a/app/View/Elements/user_worker_cv_edit.ctp b/app/View/Elements/user_worker_cv_edit.ctp index 79b8a40..bcc6ea2 100644 --- a/app/View/Elements/user_worker_cv_edit.ctp +++ b/app/View/Elements/user_worker_cv_edit.ctp @@ -145,7 +145,7 @@ echo $this->Html->link($text,array('controller'=>'user','action'=>'profil'),arra }else{ if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate']){ ?> - :Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?> : Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?> + :Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?> :Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date'),'dateFormat' => 'DMY','minYear' => date('Y') - 100, 'maxYear' => date('Y')));?> diff --git a/app/View/Emails/html/job_application.ctp b/app/View/Emails/html/job_application.ctp index e519b6b..295482e 100644 --- a/app/View/Emails/html/job_application.ctp +++ b/app/View/Emails/html/job_application.ctp @@ -1,3 +1,20 @@ -Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$id,'full_base' => true)); -?> +Sehr geehrter !

+ +Sie haben eine Bewerbung erhalten

+Sehen Sie diese unter folgendem Link ein:
+Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$id,'full_base' => true));?> +Bei Fragen wenden Sie sich gerne an unser Team:
+service@dream-job.eu

+Jetzt noch mehr Funktionen!
+ +Mit unserem dreamJOB Premium-Account
+hier mehr infos

+ +Mit freundlichen Grüßen
+Ihr dreamJOB Team
+





+Ausgezeichnete Leistungen, bester Service:
+Herzlich willkommen bei der DAK-Gesundheit.
+

+AGBs
+Impressum \ No newline at end of file diff --git a/app/View/Emails/html/job_application_msg.ctp b/app/View/Emails/html/job_application_msg.ctp deleted file mode 100644 index 1e46afe..0000000 --- a/app/View/Emails/html/job_application_msg.ctp +++ /dev/null @@ -1,3 +0,0 @@ -Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages','full_base' => true)); -?> diff --git a/app/View/Emails/html/job_application_msg_company.ctp b/app/View/Emails/html/job_application_msg_company.ctp new file mode 100644 index 0000000..9afc5b6 --- /dev/null +++ b/app/View/Emails/html/job_application_msg_company.ctp @@ -0,0 +1,18 @@ +Sehr geehrter !

+Sie haben eine Nachricht von einem Bewerber erhalten

+Sehe diese unter folgendem Link ein:
+Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages','full_base' => true));?> +

+Bei Fragen wenden Sie sich gerne an unser Team:
+service@dream-job.eu

+Jetzt noch mehr Funktionen!
+Mit unserem dreamJOB Premium-Account
+hier mehr infos

+Mit freundlichen Grüßen
+Ihr dreamJOB Team
+





+Ausgezeichnete Leistungen, bester Service:
+Herzlich willkommen bei der DAK-Gesundheit.
+

+AGBs
+Impressum
\ No newline at end of file diff --git a/app/View/Emails/html/job_application_msg_worker.ctp b/app/View/Emails/html/job_application_msg_worker.ctp new file mode 100644 index 0000000..486db41 --- /dev/null +++ b/app/View/Emails/html/job_application_msg_worker.ctp @@ -0,0 +1,16 @@ +Hallo

+Du hast eine Nachricht von einem Unternehmen erhalten.

+Sehe diese unter folgendem Link ein:
+Html->link(__('dreamjob.message.send'),array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages','full_base' => true));?> +

+Bei Fragen wenden Sie sich gerne an unser Team:
+service@dream-job.eu

+ +Mit freundlichen Grüßen
+Ihr dreamJOB Team
+





+Ausgezeichnete Leistungen, bester Service:
+Herzlich willkommen bei der DAK-Gesundheit.
+

+AGBs
+Impressum \ No newline at end of file diff --git a/app/View/Emails/html/registration.ctp b/app/View/Emails/html/registration_company.ctp similarity index 100% rename from app/View/Emails/html/registration.ctp rename to app/View/Emails/html/registration_company.ctp diff --git a/app/View/Emails/html/registration_worker.ctp b/app/View/Emails/html/registration_worker.ctp new file mode 100644 index 0000000..fefa2fd --- /dev/null +++ b/app/View/Emails/html/registration_worker.ctp @@ -0,0 +1,6 @@ + +Html->url(array('controller' => 'registration', 'action' => 'active','code'=>$key, + '?'=>array('mail'=>$data['User']['mail']),'full_base' => true) ); + echo $this->Html->link($url, $url); +?> diff --git a/app/View/Emails/text/job_application.ctp b/app/View/Emails/text/job_application.ctp index ea3a82c..9e9e2d2 100644 --- a/app/View/Emails/text/job_application.ctp +++ b/app/View/Emails/text/job_application.ctp @@ -1,3 +1,29 @@ -Html->url(array('controller'=>'job','action'=>'applicationGet','id'=>$id), true); -?> +Sehr geehrter !

+ +Sie haben eine Bewerbung erhalten. + +Sehen Sie diese unter folgendem Link ein: +Html->url(array('controller'=>'job','action'=>'applicationGet','id'=>$id), true);?> + +--- +Bei Fragen wenden Sie sich gerne an unser Team: +service@dream-job.eu + +Jetzt noch mehr Funktionen! +Mit unserem dreamJOB Premium-Account +https://dream-job.eu/premiumAccount + +Mit freundlichen Grüßen +Ihr dreamJOB Team + + + + + + + +Ausgezeichnete Leistungen, bester Service: +Herzlich willkommen bei der DAK-Gesundheit. + +https://dream-job.eu/agb +https://dream-job.eu/impressum \ No newline at end of file diff --git a/app/View/Emails/text/job_application_msg.ctp b/app/View/Emails/text/job_application_msg.ctp deleted file mode 100644 index 2cc1df1..0000000 --- a/app/View/Emails/text/job_application_msg.ctp +++ /dev/null @@ -1,3 +0,0 @@ -Html->url(array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages'),true); -?> diff --git a/app/View/Emails/text/job_application_msg_company.ctp b/app/View/Emails/text/job_application_msg_company.ctp new file mode 100644 index 0000000..fabea87 --- /dev/null +++ b/app/View/Emails/text/job_application_msg_company.ctp @@ -0,0 +1,29 @@ +Sehr geehrter ! + +Sie haben eine Nachricht von einem Bewerber erhalten + +Sehe diese unter folgendem Link ein: +Html->url(array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages'),true);?> + +--- +Bei Fragen wenden Sie sich gerne an unser Team: +service@dream-job.eu + +Jetzt noch mehr Funktionen! +Mit unserem dreamJOB Premium-Account +https://dream-job.eu/premiumAccount + +Mit freundlichen Grüßen +Ihr dreamJOB Team + + + + + + + +Ausgezeichnete Leistungen, bester Service: +Herzlich willkommen bei der DAK-Gesundheit. + +https://dream-job.eu/agb +https://dream-job.eu/impressum \ No newline at end of file diff --git a/app/View/Emails/text/job_application_msg_worker.ctp b/app/View/Emails/text/job_application_msg_worker.ctp new file mode 100644 index 0000000..bad7ca2 --- /dev/null +++ b/app/View/Emails/text/job_application_msg_worker.ctp @@ -0,0 +1,22 @@ +Hallo +Du hast eine Nachricht von einem Unternehmen erhalten +Sehe diese unter folgendem Link ein: +Html->url(array('controller'=>'job','action'=>'applicationGet','id'=>$id,'ages'=>'ages'),true);?> + + +Bei Fragen wenden Sie sich gerne an unser Team: +service@dream-job.eu + +Mit freundlichen Grüßen +Ihr dreamJOB Team + + + + + + +Ausgezeichnete Leistungen, bester Service: +Herzlich willkommen bei der DAK-Gesundheit. + +https://dream-job.eu/agb +https://dream-job.eu/impressum \ No newline at end of file diff --git a/app/View/Emails/text/registration.ctp b/app/View/Emails/text/registration_company.ctp similarity index 100% rename from app/View/Emails/text/registration.ctp rename to app/View/Emails/text/registration_company.ctp diff --git a/app/View/Emails/text/registration_worker.ctp b/app/View/Emails/text/registration_worker.ctp new file mode 100644 index 0000000..66b9ea8 --- /dev/null +++ b/app/View/Emails/text/registration_worker.ctp @@ -0,0 +1,4 @@ +Html->url(array('controller'=>'registration','action'=>'active','code'=>$key, + '?'=>array('mail'=>$data['User']['mail'])),true); +?> diff --git a/app/View/Layouts/Emails/html/default.ctp b/app/View/Layouts/Emails/html/default.ctp index 205fa41..50be9ca 100755 --- a/app/View/Layouts/Emails/html/default.ctp +++ b/app/View/Layouts/Emails/html/default.ctp @@ -1,27 +1,14 @@ - - - - <?php echo $title_for_layout; ?> - - - fetch('content'); ?> - + + + + +
+ fetch('content'); ?> +
+ diff --git a/app/webroot/mail/dak.jpg b/app/webroot/mail/dak.jpg new file mode 100644 index 0000000..272eafd Binary files /dev/null and b/app/webroot/mail/dak.jpg differ