This commit is contained in:
Martin Müller 2014-04-23 10:34:50 +02:00
parent a692fc02c6
commit 68cf225057
2 changed files with 9 additions and 4 deletions

View File

@ -4,7 +4,7 @@ App::uses('AppController', 'Controller');
class PdfController extends AppController { class PdfController extends AppController {
public $uses = array('DreamjobJobApplication','DreamjobCvEntry'); public $uses = array('DreamjobJobApplication','DreamjobCvEntry','DreamjobListCvCategory');
public function applicationGetPdf(){ public function applicationGetPdf(){
$this->MiconwareSession->init($this); $this->MiconwareSession->init($this);
@ -25,8 +25,10 @@ class PdfController extends AppController {
$this->render('/Home/error'); $this->render('/Home/error');
}else{ }else{
$this->set('application',$application); $this->set('application',$application);
$cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id']))); //$cv = $this->DreamjobCvEntry->find('all',array('conditions' => array('worker_id'=> $application['DreamjobJobApplication']['worker_id'])));
$this->set("cv",$cv); //$this->set("cv",$cv);
//$cvp0 = $this->DreamjobListCvCategory->find('first',array('conditions' => array('DreamjobListCvCategory.position' => 0)));
//$this->set('cvp0', $cvp0);
$this->layout = 'pdf'; $this->layout = 'pdf';
$this->render('/Pdf/opening'); $this->render('/Pdf/opening');
} }

View File

@ -49,13 +49,16 @@ $tcpdf->SetFont($tcpdf->font);
$tcpdf->writeHTMLCell(0,175,10,95, $application['DreamjobJobApplication']['text'], $dev,0,false,true,'L'); $tcpdf->writeHTMLCell(0,175,10,95, $application['DreamjobJobApplication']['text'], $dev,0,false,true,'L');
//Lebenslauf //Lebenslauf
//Anschreiben $tcpdf->SetAutoPageBreak( true );
$tcpdf->title=__('dreamjob.cv'); $tcpdf->title=__('dreamjob.cv');
$tcpdf->AddPage(); $tcpdf->AddPage();
$tcpdf->SetY(35); $tcpdf->SetY(35);
$tcpdf->SetTextColor(0, 0, 0); $tcpdf->SetTextColor(0, 0, 0);
$tcpdf->SetFont($tcpdf->font); $tcpdf->SetFont($tcpdf->font);
$tcpdf->writeHTMLCell(0,235,10,35, $this->element('user_worker_cv'), $dev,0,false,true,'L');
$tcpdf->SetAutoPageBreak( false );
//Anhang //Anhang
foreach($application['Page'] as $page){ foreach($application['Page'] as $page){