content added; look modifications; side box content
[living-lab-site.git] / application / controllers / catalog.php
index 7dee3e9..087275d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * Class Catalog controlls video hierarchy and searching
+ * Class Catalog controls video hierarchy and searching
  *
  * @category   Controller
  * @author             Călin-Andrei Burloiu
@@ -45,8 +45,11 @@ class Catalog extends CI_Controller {
                                                        'css' => array(
                                                                'catalog.css', 
                                                                'jquery-ui.css'
-                                                               ),
-                                                       //'js' => array(),
+                                                       ),
+                                                       'js' => array(
+                                                               'jquery.js',
+                                                               'jquery-ui.js'
+                                                       ),
                                                        //'metas' => array('description'=>'','keywords'=>'')
                                                        );
                $this->load->library('html_head_params', $params);
@@ -55,9 +58,11 @@ class Catalog extends CI_Controller {
                // ** LOADING VIEWS
                // **
                $this->load->view('html_begin', $this->html_head_params);
-               $this->load->view('header', array('selected_menu' => 'Home'));
+               $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');
@@ -65,11 +70,28 @@ 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);
+               
+               // **
+               // ** LOADING VIEWS
+               // **
+               $this->load->view('html_begin', $this->html_head_params);
+               $this->load->view('header', array('selected_menu' => 'home'));
                
-               $str = '800x600';
+               $this->load->view('echo', array('output'=>'Test Page', 'clear'=>TRUE));
                
-               echo substr($str, strpos($str, 'x') + 1);
+               $this->load->view('footer');
+               $this->load->view('html_end');
        }
        
        public function category($category_id, $offset = 0)
@@ -105,8 +127,14 @@ 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);
@@ -117,7 +145,10 @@ class Catalog extends CI_Controller {
                $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'] = '<h1>Side Box</h1><p>TODO: Put side box content here</p>';
+               $this->load->view('main', $main_params);
                
                $this->load->view('footer');
                $this->load->view('html_end');