X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;f=application%2Fcontrollers%2Fcatalog.php;h=087275da47fe1a791d079dc11ca84cb4fba674a4;hb=a27f593acea88d14199517dadf23b40dbc56ff2a;hp=fec8d642854418842fbd53dee49b35928d9f0f98;hpb=74d7b5848a42e30e669cc05db22e83396b3cc107;p=living-lab-site.git diff --git a/application/controllers/catalog.php b/application/controllers/catalog.php index fec8d64..087275d 100644 --- a/application/controllers/catalog.php +++ b/application/controllers/catalog.php @@ -1,7 +1,7 @@ load->model('videos_model'); foreach ($this->config->item('categories') as $id => $name) @@ -39,15 +42,27 @@ class Catalog extends CI_Controller { } $params = array( 'title' => $this->config->item('site_name'), - 'css' => array('catalog.css'), - //'js' => array(), + 'css' => array( + 'catalog.css', + 'jquery-ui.css' + ), + 'js' => array( + 'jquery.js', + 'jquery-ui.js' + ), //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); + + // ** + // ** LOADING VIEWS + // ** $this->load->view('html_begin', $this->html_head_params); - $this->load->view('header'); + $this->load->view('header', array('selected_menu' => 'home')); - $this->load->view('catalog/index_view', $data); + $main_params['content'] = $this->load->view('catalog/index_view', $data, TRUE); + $main_params['side'] = $this->load->view('side_default.php', NULL, TRUE); + $this->load->view('main', $main_params); $this->load->view('footer'); $this->load->view('html_end'); @@ -55,15 +70,35 @@ class Catalog extends CI_Controller { public function test($page = 0) { - $this->load->helper('url'); + $params = array( 'title' => 'Test - '. $this->config->item('site_name'), + 'css' => array( + 'jquery-ui.css' + ), + 'js' => array( + 'jquery.js', + 'jquery-ui.js' + ), + //'metas' => array('description'=>'','keywords'=>'') + ); + $this->load->library('html_head_params', $params); - $str = '800x600'; + // ** + // ** LOADING VIEWS + // ** + $this->load->view('html_begin', $this->html_head_params); + $this->load->view('header', array('selected_menu' => 'home')); - echo substr($str, strpos($str, 'x') + 1); + $this->load->view('echo', array('output'=>'Test Page', 'clear'=>TRUE)); + + $this->load->view('footer'); + $this->load->view('html_end'); } public function category($category_id, $offset = 0) { + // ** + // ** LOADING MODEL + // ** // Retrieve videos summary. $this->load->model('videos_model'); $vs_data['videos'] = $this->videos_model->get_videos_summary( @@ -92,15 +127,28 @@ class Catalog extends CI_Controller { $vs_data, TRUE); $params = array( 'title' => $this->config->item('site_name'), - 'css' => array('catalog.css'), - //'js' => array(), + 'css' => array( + 'catalog.css', + 'jquery-ui.css' + ), + 'js' => array( + 'jquery.js', + 'jquery-ui.js' + ), //'metas' => array('description'=>'','keywords'=>'') ); $this->load->library('html_head_params', $params); + + // ** + // ** LOADING VIEWS + // ** $this->load->view('html_begin', $this->html_head_params); $this->load->view('header'); - $this->load->view('catalog/category_view', $data); + $main_params['content'] = $this->load->view('catalog/category_view', $data, TRUE); + // TODO: side + $main_params['side'] = '

Side Box

TODO: Put side box content here

'; + $this->load->view('main', $main_params); $this->load->view('footer'); $this->load->view('html_end');