dreamjob/app/Config/routes.php

106 lines
6.7 KiB
PHP
Executable File

<?php
/**
* Routes configuration
*
* In this file, you set up routes to your controllers and their actions.
* Routes are very important mechanism that allows you to freely connect
* different URLs to chosen controllers and their actions (functions).
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package app.Config
* @since CakePHP(tm) v 0.2.9
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
/**
* Here, we are connecting '/' (base path) to controller called 'Pages',
* its action called 'display', and we pass a param to select the view file
* to use (in this case, /app/View/Pages/home.ctp)...
*/
Router::connect('/', array('controller' => 'home', 'action' => 'home'));
Router::connect('/login', array('controller' => 'home', 'action' => 'login'));
Router::connect('/logout', array('controller' => 'home', 'action' => 'logout'));
Router::connect('/impressum', array('controller' => 'home', 'action' => 'impressum'));
Router::connect('/agb', array('controller' => 'home', 'action' => 'agb'));
Router::connect('/contact', array('controller' => 'home', 'action' => 'contact'));
Router::connect('/registration', array('controller' => 'registration', 'action' => 'main'));
Router::connect('/registration/user', array('controller' => 'registration', 'action' => 'worker'));
Router::connect('/registration/company', array('controller' => 'registration', 'action' => 'company'));
Router::connect('/registration/active/:code', array('controller' => 'registration', 'action' => 'active'),array("code" => ".+"));
Router::connect('/profil', array('controller' => 'user', 'action' => 'profil'));
Router::connect('/profil/page/:page', array('controller' => 'user', 'action' => 'profil'),array("page" => "[0-9]+"));
Router::connect('/profil/edit', array('controller' => 'user', 'action' => 'profil_edit'));
Router::connect('/settings', array('controller' => 'user', 'action' => 'settings_account'));
Router::connect('/settings/pages', array('controller' => 'user', 'action' => 'settings_pageInh'));
Router::connect('/settings/pages/:page', array('controller' => 'user', 'action' => 'settings_pageInh'),array("page" => "[0-9]+"));
Router::connect('/settings/isearch', array('controller' => 'user', 'action' => 'settings_isearch'));
Router::connect('/settings/delete', array('controller' => 'user', 'action' => 'profil_delete'));
Router::connect('/settings/img', array('controller' => 'user', 'action' => 'avatar_upload'));
Router::connect('/user/:id', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+"));
Router::connect('/user/:id/page/:page', array('controller' => 'user', 'action' => 'profil'),array("id" => "[0-9]+","page" => "[0-9]+"));
Router::connect('/opening', array('controller' => 'job', 'action' => 'openingList'));
Router::connect('/opening/add', array('controller' => 'job', 'action' => 'openingAdd'));
Router::connect('/opening/edit/:id', array('controller' => 'job', 'action' => 'openingEdit'),array("id" => "[0-9]+"));
Router::connect('/opening/:id', array('controller' => 'job', 'action' => 'openingGet'),array("id" => "[0-9]+"));
Router::connect('/opening/:id/:favorite', array('controller' => 'job', 'action' => 'openingGet'), array("id" => "[0-9]+",'favorite' => '(?i:favorite)'));
Router::connect('/opening/:id/application', array('controller' => 'job', 'action' => 'applicationByOpening'),array("id" => "[0-9]+"));
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/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)'));
Router::connect('/application/:id/arc:hiv', array('controller' => 'job', 'action' => 'applicationGet'), array("id" => "[0-9]+",'hiv' => '(?i:hiv)'));
Router::connect('/applicate/:id', array('controller' => 'job', 'action' => 'applicationSend'),array("id" => "[0-9]+"));
Router::connect('/favorite', array('controller' => 'job', 'action' => 'favorite'));
//Router::connect('/search', array('controller' => 'search', 'action' => 'listopening'));
Router::connect('/search', array('controller' => 'search', 'action' => 'opening'));
Router::connect('/search/company', array('controller' => 'search', 'action' => 'company'));
Router::connect('/search/worker', array('controller' => 'search', 'action' => 'worker'));
Router::connect('/search/auto', array('controller' => 'search', 'action' => 'auto'));
Router::connect('/search/education', array('controller' => 'search', 'action' => 'education'));
Router::connect('/search/academy', array('controller' => 'search', 'action' => 'academy'));
Router::connect('/search/internship', array('controller' => 'search', 'action' => 'internship'));
Router::connect('/test/', array('controller' => 'user', 'action' => 'test'));
Router::parseExtensions('pdf');
Router::connect('/application/:id.pdf', array('controller' => 'pdf', 'action' => 'applicationGetPdf'),array("id" => "[0-9]+"));
Router::connect('/profil.pdf', array('controller' => 'pdf', 'action' => 'profilGetPdf'));
Router::parseExtensions('json');
Router::connect('/profil/save/cv', array('controller' => 'user', 'action' => 'saveCvJson'));
Router::connect('/settings/pages/delete', array('controller' => 'user', 'action' => 'savePageDeleteJson'));
Router::connect('/settings/pages/order', array('controller' => 'user', 'action' => 'savePageOrder'));
/**
* ...and connect the rest of 'Pages' controller's URLs.
*/
//Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
/**
* Load all plugin routes. See the CakePlugin documentation on
* how to customize the loading of plugin routes.
*/
// CakePlugin::routes();
/**
* Load the CakePHP default routes. Only remove this if you do not want to use
* the built-in default routes.
*/
// require CAKE . 'Config' . DS . 'routes.php';