pdf cv schoener

This commit is contained in:
Martin Müller 2014-04-23 19:23:23 +02:00
parent 810201098b
commit aa89a19d47
10 changed files with 89 additions and 11 deletions

View File

@ -18,7 +18,7 @@ if($company['AppUser']['take_systemwide']){
?>
<div class="openingitem">
<h3><?=$company['AppUser']['nickname']." ".$company['DreamjobCompany']['corporateform'];?></h3>
<h3><?=$company['AppUser']['nickname'];?></h3>
<div>
<?php if($avatar){ ?>
<div class="icon">
@ -30,7 +30,7 @@ if($company['AppUser']['take_systemwide']){
}else{
?>
<div class="noicon-title">
<span><?=$company['AppUser']['nickname']." ".$company['DreamjobCompany']['corporateform'];?></span>
<span><?=$company['AppUser']['nickname'];?></span>
</div>
<?php } ?>
<div class="left">

View File

@ -4,6 +4,6 @@
*/
?>
<div class="box-title">
<h3><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></h3>
<h3><?=$opening['AppUser']['nickname'];?></h3>
<h1><?=$opening['DreamjobJobOpening']['title'];?></h1>
</div>

View File

@ -13,7 +13,7 @@
<br/>
<p>
<h4><?=__("dreamjob.company.titleinfo");?></h4>
<?=__("dreamjob.company");?>: <?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?><br/>
<?=__("dreamjob.company");?>: <?=$opening['AppUser']['nickname'];?><br/>
<?=__("dreamjob.headcount");?>: <?=$opening['DreamjobCompany']['headcount'];?><br/>
<?=__("dreamjob.owner");?>: <?=$opening['DreamjobCompany']['owner'];?>
</p>

View File

@ -49,7 +49,7 @@ if($opening['AppUser']['take_systemwide']){
<div>
<?php if($avatar){ ?>
<div class="icon">
<span><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></span>
<span><?=$opening['AppUser']['nickname'];?></span>
<div>
<img src="<?=$url;?>"/>
</div>
@ -58,7 +58,7 @@ if($opening['AppUser']['take_systemwide']){
}else{
?>
<div class="noicon-title">
<span><?=$opening['AppUser']['nickname']." ".$opening['DreamjobCompany']['corporateform'];?></span>
<span><?=$opening['AppUser']['nickname'];?></span>
</div>
<?php } ?>
<div class="left">

View File

@ -44,9 +44,9 @@
<a href="mailto:<?=$profil['User']['mail'];?>">
<?=__('dreamjob.mail.contact');?>
</a>
<?=$this->Html->link(__('dreamjob.application.mappePDF'),array('controller'=>'pdf','action'=>'profilGetPdf'));?>
<?=$this->Html->link('<span class="glyphicon glyphicon-print"></span> '.__('dreamjob.profil.mappePDF'),array('controller'=>'pdf','action'=>'profilGetPdf'),array('class'=>'btn btn-default btn-sm','escape'=>false,'style'=>'bottom:10px;right:15px;position:absolute;','rel'=>'external','target'=>'_blank'));?>
<?php }elseif(isset($application)){ ?>
<?=$this->Html->link(__('dreamjob.application.mappePDF'),array('controller'=>'pdf','action'=>'applicationGetPdf','id'=>$application['DreamjobJobApplication']['id']));?>
<?=$this->Html->link('<span class="glyphicon glyphicon-print"></span> '.__('dreamjob.application.mappePDF'),array('controller'=>'pdf','action'=>'applicationGetPdf','id'=>$application['DreamjobJobApplication']['id']),array('class'=>'btn btn-default btn-sm','escape'=>false,'style'=>'bottom:10px;right:15px;position:absolute;','rel'=>'external','target'=>'_blank'));?>
<?php } ?>
</div>
</div>

View File

@ -82,7 +82,7 @@
<legend>
<span>
<?php if($msgitem['fromcompany']){
echo $application['AppUser']['nickname']." ".$application['DreamjobCompany']['corporateform'];
echo $application['AppUser']['nickname'];
}else{
echo $application['WorkerUser']['first_name']." ".$application['WorkerUser']['last_name'];
} ?>

View File

@ -2,6 +2,8 @@
App::import('Vendor','tcpdf/xtcpdf');
$cvinhalt = $this->element('user_worker_cv',array('toPDF'=>true,'profil'=>array('User'=>$application['WorkerUser']
,'AppUser'=>$application['AppUserWorker'],'DreamjobWorker'=>$application['DreamjobWorker'],'DreamjobListGraducation'=>$application['WorkerGraducation'],'DreamjobListCity'=>$application['DreamjobWorkerListCity'])));
$cvinhalt .= '<style>span{font-style:italic;font-size:10px;}</style>';
ob_end_clean();
@ -42,7 +44,7 @@ $tcpdf->Cell(0,0, $application['Mannerofaddress']['name'].' '.$application['AppU
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['street'], 0,1,'L');
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['postcode'].' '.$application['DreamjobWorkerListCity']['name'], 0,1,'L');
$tcpdf->SetY(60);
$tcpdf->Cell(0,0, $application['AppUser']['nickname'].' '.$application['DreamjobCompany']['corporateform'], 0,1,'L');
$tcpdf->Cell(0,0, $application['AppUser']['nickname'], 0,1,'L');
$tcpdf->Cell(0,0, $application['DreamjobUser']['street'], 0,1,'L');
$tcpdf->Cell(0,0, $application['DreamjobUser']['postcode'].' '.$application['DreamjobListCity']['name'], 0,1,'L');

75
app/View/Pdf/profil.ctp Normal file
View File

@ -0,0 +1,75 @@
<?php
App::import('Vendor','tcpdf/xtcpdf');
$cvinhalt = $this->element('user_worker_cv',array('toPDF'=>true,'profil'=>$WORKER));
$cvinhalt .= '<style>span{font-style:italic;font-size:10px;}</style>';
ob_end_clean();
$dev = 0;
$tcpdf = new XTCPDF();
$tcpdf->SetMargins(25,25,20,25);
$tcpdf->SetAuthor("Miconware");
$tcpdf->SetAutoPageBreak( false );
$tcpdf->mail=$WORKER['User']['mail'];
$tcpdf->AddPage();
// Deckblatt
$tcpdf->SetY(35);
$tcpdf->SetTextColor(0, 0, 0);
$tcpdf->SetFont($tcpdf->font);
$tcpdf->Image(WWW_ROOT.DS.'uploads'.DS.$WORKER['AppUser']['avatar'],0,35,0,140,'','','','',300,'L');
$tcpdf->SetY(180);
$tcpdf->SetFont($tcpdf->font,'B',$tcpdf->fontsize);
$tcpdf->Cell(0,0, __('dreamjob.application.mappe'), 0,1,'L');
$tcpdf->SetFont($tcpdf->font);
$tcpdf->SetY(255);
$tcpdf->Cell(0,0, $WORKER['Mannerofaddress']['name'].' '.$WORKER['AppUser']['first_name'].' '.$WORKER['AppUser']['last_name'], 0,1,'R');
$tcpdf->Cell(0,0, $WORKER['DreamjobUser']['street'], 0,1,'R');
$tcpdf->Cell(0,0, $WORKER['DreamjobUser']['postcode'].' '.$WORKER['DreamjobListCity']['name'], 0,1,'R');
//Lebenslauf
$tcpdf->title=__('dreamjob.cv');
$tcpdf->AddPage();
$tcpdf->SetY(35);
$tcpdf->SetTextColor(0, 0, 0);
$tcpdf->SetFont($tcpdf->font);
//$tcpdf->writeHTML(0,235,10,35, $cvinhalt, $dev,0,false,true,'L');
$tcpdf->writeHTML($cvinhalt);
$tcpdf->SetAutoPageBreak( false );
//Anhang
foreach($WORKER['DreamjobPageInh'] as $page){
$tcpdf->title=$page['title'];
$tcpdf->AddPage();
$tcpdf->SetY(35);
$tcpdf->SetTextColor(0, 0, 0);
$tcpdf->SetFont($tcpdf->font);
$pageType = null;
foreach($pageImage as $pg){
if($page['id'] == $pg['DreamjobPageInh']['id'])
$pageType=$pg;
}
if($pageType==null){
foreach($pageText as $pg){
if($page['id'] == $pg['DreamjobPageInh']['id'])
$pageType=$pg;
}
$tcpdf->writeHTMLCell(0,235,10,35, $pageType['DreamjobPageText']['text'], $dev,0,false,true,'L');
}else{
$tcpdf->Image(WWW_ROOT.DS.'uploads'.DS.$pageType['DreamjobPageImage']['image'],0,35,0,235,'','','','',300,'C');
}
}
// ...
// etc.
// see the TCPDF examples
echo $tcpdf->Output('filename.pdf');
// TO Download
//echo $tcpdf->Output('filename.pdf','D');
?>

View File

@ -52,7 +52,7 @@ if($profil['AppUser']['take_systemwide']){
<?php } ?>
<div class="box">
<h1><?=$profil['AppUser']['nickname']." ".$profil['DreamjobCompany']['corporateform'];?></h1>
<h1><?=$profil['AppUser']['nickname'];?></h1>
<div class="columns">
<?php if(!$avatar){ ?>
<div class="bar">

View File

@ -35,6 +35,7 @@ legend{
padding:18px 24px;
margin-bottom: 20px;
color:black;
position:relative;
}
.form-group{
padding:15px 0;