This commit is contained in:
Martin Müller 2014-09-23 15:03:35 +02:00
parent c6fb81c045
commit 0f4f14b56e
8 changed files with 56 additions and 10 deletions

View File

@ -413,13 +413,14 @@ class JobController extends AppController {
$pdf = $view->render('/Pdf/application_ext','pdf');
$Email = new CakeEmail('dreamjobMain');
$Email->from(array('noreply@dream-job.eu'=> $w['AppUser']['first_name'] .' '. $w['AppUser']['last_name']));
$Email->to($this->request->data['DreamjobUser']['mail']);
$Email->replyTo(array($w['User']['mail']));
$Email->bcc(array($w['User']['mail']));
$Email->subject('Bewerbung von '. $w['AppUser']['first_name'] .' '. $w['AppUser']['last_name']);
$Email->template('job_application_ext');
$Email->viewVars(array('w'=>$w));
$Email->attachments(array('filename.pdf'=>array('data' =>$pdf,'mimetype' => 'application/pdf')));
$Email->attachments(array(__('dreamjob.applications.extern.filename.pdf')=>array('data' =>$pdf,'mimetype' => 'application/pdf')));
if ($Email->send()) {
$this->MiconwareSession->setFlash(__('dreamjob.application.send.success'), 'flash', array('alert' => 'success'));

View File

@ -733,6 +733,28 @@ msgstr ""
msgid "dreamjob.application.extern"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.pdf"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.why"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.to.doing"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.title"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.filename.pdf"
msgstr ""
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.to"
msgstr ""

View File

@ -420,7 +420,7 @@ msgstr "Suche"
#: View/Elements/navbar.ctp:9
msgid "dreamjob.service"
msgstr "Google+"
msgstr "Service+"
#: View/Elements/navbar.ctp:11
msgid "dreamjob.logout"
@ -1205,7 +1205,30 @@ msgstr "Bewerbung"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.to"
msgstr "Externe Bewerbung"
msgstr "Externe Bewerbung (new)"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.pdf"
msgstr "Bewerbung"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.why"
msgstr "Bewerbung"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.to.doing"
msgstr "extern bewerben"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.title"
msgstr "Bewerbungs-Mailer"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.extern.filename.pdf"
msgstr "Bewerbung.pdf"
#: View/Job/application_send.ctp:13
msgid "dreamjob.application.receiver"

View File

@ -7,7 +7,7 @@
<li<?php if(isset($MENU_SEARCH)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.search'),array('controller'=>'search','action'=>'opening'));?></li>
<?php endif; ?>
<li<?php if(isset($MENU_SERVICE)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.service'),array('controller'=>'service','action'=>'index'));?></li>
<?php if(!empty($WORKER)): ?>
<?php if(empty($COMPANY)): ?>
<li<?php if(isset($MENU_EXT_APP)){?> class="active"<?php } ?>><?=$this->Html->link(__('dreamjob.application.extern.to'),array('controller'=>'job','action'=>'applicationSendExt'));?></li>
<?php endif; ?>
<?php if(!empty($isLoggedin)){ ?>

View File

@ -6,7 +6,7 @@
<div class="box">
<h3><?=__('dreamjob.my.application');?></h3>
<span style="float: right;">
<?=$this->Html->link('<span class="glyphicon glyphicon-send"></span>&nbsp; '.__('dreamjob.application.extern.to'),array('controller'=>'job','action'=>'applicationSendExt'),array('class'=>'btn btn-default','escape'=>false));?>
<?=$this->Html->link('<span class="glyphicon glyphicon-send"></span>&nbsp; '.__('dreamjob.application.extern.to.doing'),array('controller'=>'job','action'=>'applicationSendExt'),array('class'=>'btn btn-default','escape'=>false));?>
</span>
<div class="openinggroup">

View File

@ -4,7 +4,7 @@
*/
?>
<div class="box">
<h1><?=__('dreamjob.application.extern');?></h1>
<h1><?=__('dreamjob.application.extern.title');?></h1>
<?php echo $this->Form->create('DreamjobJobApplication',$default_Form); ?>
<fieldset>
<legend><?=__("dreamjob.application.receiver");?></legend>

View File

@ -36,7 +36,7 @@ $tcpdf->SetY(185);
//$tcpdf->SetFont($tcpdf->font,'B',$tcpdf->fontsize+4);
//$tcpdf->Cell(0,0, , 0,1,'L');
//$tcpdf->SetFont($tcpdf->font,'',$tcpdf->fontsize);
$tcpdf->writeHTML('<h1>'.__('dreamjob.application.extern').'</h1>');
$tcpdf->writeHTML('<h1>'.__('dreamjob.application.extern.pdf').'</h1>');
$tcpdf->SetY(255);
$tcpdf->Cell(0,0, $application['Mannerofaddress']['name'].' '.$application['AppUserWorker']['first_name'].' '.$application['AppUserWorker']['last_name'], 0,1,'R');
@ -45,7 +45,7 @@ $tcpdf->Cell(0,0, $application['DreamjobUserWorker']['postcode'].' '.$applicatio
//Anschreiben
$tcpdf->SetAutoPageBreak( true, 20);
$tcpdf->title=__('dreamjob.application.why');
$tcpdf->title=__('dreamjob.application.extern.why');
$tcpdf->AddPage();
$tcpdf->SetY(35);
$tcpdf->SetTextColor(0, 0, 0);
@ -108,7 +108,7 @@ foreach($application['Page'] as $page){
//$tcpdf->Output('filename.pdf','I');
// TO Download
echo $tcpdf->Output('filename.pdf','S');
echo $tcpdf->Output(__('dreamjob.applications.extern.filename.pdf'),'S');
//return null;
//ob_start();
?>