From 68cf225057f1622b7694e1fbd4c011bfe5628713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Wed, 23 Apr 2014 10:34:50 +0200 Subject: [PATCH] i18n --- app/Controller/PdfController.php | 8 +++++--- app/View/Pdf/opening.ctp | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Controller/PdfController.php b/app/Controller/PdfController.php index 8dff0e1..9c69545 100644 --- a/app/Controller/PdfController.php +++ b/app/Controller/PdfController.php @@ -4,7 +4,7 @@ App::uses('AppController', 'Controller'); class PdfController extends AppController { - public $uses = array('DreamjobJobApplication','DreamjobCvEntry'); + public $uses = array('DreamjobJobApplication','DreamjobCvEntry','DreamjobListCvCategory'); public function applicationGetPdf(){ $this->MiconwareSession->init($this); @@ -25,8 +25,10 @@ class PdfController extends AppController { $this->render('/Home/error'); }else{ $this->set('application',$application); - $cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); - $this->set("cv",$cv); + //$cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); + //$this->set("cv",$cv); + //$cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0))); + //$this->set('cvp0', $cvp0); $this->layout = 'pdf'; $this->render('/Pdf/opening'); } diff --git a/app/View/Pdf/opening.ctp b/app/View/Pdf/opening.ctp index 947067b..b3962ea 100644 --- a/app/View/Pdf/opening.ctp +++ b/app/View/Pdf/opening.ctp @@ -49,13 +49,16 @@ $tcpdf->SetFont($tcpdf->font); $tcpdf->writeHTMLCell(0,175,10,95, $application['DreamjobJobApplication']['text'], $dev,0,false,true,'L'); //Lebenslauf -//Anschreiben +$tcpdf->SetAutoPageBreak( true ); $tcpdf->title=__('dreamjob.cv'); $tcpdf->AddPage(); $tcpdf->SetY(35); $tcpdf->SetTextColor(0, 0, 0); $tcpdf->SetFont($tcpdf->font); +$tcpdf->writeHTMLCell(0,235,10,35, $this->element('user_worker_cv'), $dev,0,false,true,'L'); + +$tcpdf->SetAutoPageBreak( false ); //Anhang foreach($application['Page'] as $page){