Iframe Button

This commit is contained in:
Martin Müller 2015-02-28 01:58:24 +01:00
parent 104152d159
commit 2d6e06b55d
6 changed files with 90 additions and 11 deletions

View File

@ -98,6 +98,14 @@
Router::connect('/search/academy', array('controller' => 'search', 'action' => 'academy')); Router::connect('/search/academy', array('controller' => 'search', 'action' => 'academy'));
Router::connect('/search/internship', array('controller' => 'search', 'action' => 'internship')); Router::connect('/search/internship', array('controller' => 'search', 'action' => 'internship'));
/*****
* Extern
*
*/
Router::connect('/extern/button/company/:id', array('controller' => 'extern', 'action' => 'button_company'),array("id" => "[0-9]+"));
Router::connect('/extern/button/opening/extern', array('controller' => 'extern', 'action' => 'button_opening_extern'),array("id" => "[0-9]+"));
Router::connect('/extern/button/opening/:id', array('controller' => 'extern', 'action' => 'button_opening'),array("id" => "[0-9]+"));
Router::parseExtensions('pdf'); Router::parseExtensions('pdf');
Router::connect('/application/:id.pdf', array('controller' => 'pdf', 'action' => 'applicationGetPdf'),array("id" => "[0-9]+")); Router::connect('/application/:id.pdf', array('controller' => 'pdf', 'action' => 'applicationGetPdf'),array("id" => "[0-9]+"));

View File

@ -0,0 +1,42 @@
<?php
App::uses('AppController', 'Controller');
class ExternController extends AppController {
public $uses = array('DreamjobJobOpening','DreamjobCompany');
public $components = array('MiconwareSession');
public function button_company() {
$this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this);
if(!empty($this->request->params['id'])){
$this->set("company",$this->DreamjobCompany->find('first',array('conditions' => array('AppUser.id' => $this->request->params['id']))));
}
$this->layout = 'extern_mini';
$this->render('/Extern/button_company');
}
public function button_opening() {
$this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this);
if(!empty($this->request->params['id'])){
$con = $this->MiconwareSession->getOpeningCondition();
$con['DreamjobJobOpening.id'] = $this->request->params['id'];
$this->set("opening",$this->DreamjobJobOpening->find('first', array('conditions' => $con)));
}
$this->layout = 'extern_mini';
$this->render('/Extern/button_opening');
}
public function button_opening_extern() {
$this->MiconwareSession->init($this);
$this->MiconwareSession->initWeb($this);/*
$this->request->data['DreamjobUser']['mail'] = $this->request->query('mail');
$this->request->data['AppUser']['nickname'] = $this->request->query('company');
$this->request->data['DreamjobUser']['street'] = $this->request->query('street');
$this->request->data['DreamjobUser']['postcode'] = $this->request->query('postcode');
$this->request->data['DreamjobListCity']['name'] = $this->request->query('city');*/
$this->set("content",array());
$this->layout = 'extern_mini';
$this->render('/Extern/button_opening_extern');
}
}

1
app/View/Extern/button_company.ctp vendored Normal file
View File

@ -0,0 +1 @@
<?=$this->Html->link($company['AppUser']['nickname'],array('controller'=>'user', 'action'=>'profil', 'id'=> $company['AppUser']['id']),array("class" => "btn btn-primary","target"=>"_blank",'rel'=>'external'));?>

1
app/View/Extern/button_opening.ctp vendored Normal file
View File

@ -0,0 +1 @@
<?=$this->Html->link($opening['DreamjobJobOpening']['title'],array('controller'=>'job', 'action'=>'openingGet', 'id'=> $opening['DreamjobJobOpening']['id']),array("class" => "btn btn-primary","target"=>"_blank",'rel'=>'external'));?>

View File

@ -0,0 +1 @@
<?=$this->Html->link(__('dreamjob.application.extern'),array('controller'=>'job', 'action'=>'applicationSendExt', '?'=> $content),array("class" => "btn btn-primary","target"=>"_blank",'rel'=>'external'));?>

View File

@ -0,0 +1,26 @@
<?php
/*
* Default-Template
*/
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
<head>
<title><?=((isset($title))?$title:$title_for_layout);?> - <?=__('dreamjob');?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" type="text/css" href="/css/dreamjob.css" type="text/css" media="screen" />
<?php
echo $this->Html->charset();
echo $this->Html->css(array('bootstrap.min','bootstrap-wysihtml5','wysiwyg-color','select2','select2-bootstrap'));
echo $this->Html->meta('icon', $this->Html->url('/favicon.ico'));
?>
</head>
<body>
<!-- alert -->
<?=$this->Session->flash(); ?>
<!-- /alert -->
<!-- container -->
<?=$this->fetch('content'); ?>
<!-- /container -->
</body>
</html>