From a14438dc7824228be2638357a9c6f30b615ac73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Tue, 22 Apr 2014 20:50:09 +0200 Subject: [PATCH] pdf --- app/Config/routes.php | 2 ++ app/Model/DreamjobJobApplication.php | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/app/Config/routes.php b/app/Config/routes.php index f7acbf6..8dfcb68 100755 --- a/app/Config/routes.php +++ b/app/Config/routes.php @@ -58,6 +58,8 @@ Router::connect('/application', array('controller' => 'job', 'action' => 'applicationList')); Router::connect('/application/:id', array('controller' => 'job', 'action' => 'applicationGet'),array("id" => "[0-9]+")); + 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]+")); Router::connect('/application/:id/page/:page', array('controller' => 'job', 'action' => 'applicationGet'),array("id" => "[0-9]+","page" => "[0-9]+")); Router::connect('/application/:id/curriculum:vitea', array('controller' => 'job', 'action' => 'applicationGet'), array("id" => "[0-9]+",'vitea' => '(?i:vitea)')); Router::connect('/application/:id/mess:ages', array('controller' => 'job', 'action' => 'applicationGet'), array("id" => "[0-9]+",'ages' => '(?i:ages)')); diff --git a/app/Model/DreamjobJobApplication.php b/app/Model/DreamjobJobApplication.php index a19b6bb..11c794c 100644 --- a/app/Model/DreamjobJobApplication.php +++ b/app/Model/DreamjobJobApplication.php @@ -222,6 +222,18 @@ class DreamjobJobApplication extends AppModel { 'conditions' => array('DreamjobJobOpening.graducation_id = DreamjobListGraducation.id'), 'limit' => 1 ), + 'DreamjobListCity' => array( + 'className' => 'DreamjobListCity', + 'foreignKey' => false, + 'conditions' => array('DreamjobJobOpening.city_id = DreamjobListCity.id'), + 'limit' => 1 + ), + 'DreamjobListBranch' => array( + 'className' => 'DreamjobListBranch', + 'foreignKey' => false, + 'conditions' => array('DreamjobJobOpening.branch_id = DreamjobListBranch.id'), + 'limit' => 1 + ) ); public $hasAndBelongsToMany = array(