/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to codeigniter/application/controllers/codeviewer.php

  • Committer: Gustav Hartvigsson
  • Date: 2013-05-15 17:20:30 UTC
  • mfrom: (66.1.1 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130515172030-hrqwr1cys2pijajj
Merged changes to the Codeviewer

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        * This shows the codeviewer page
16
16
        */
17
17
        public function show($cid, $category, $subcategory, $example){
18
 
                $headData['list'] = array('headTag', 'header', 'codeviewer');
19
 
                $headData['scripts'] = array('ace/ace');
 
18
                $headTagData['cssFiles'] = array('headTag', 'header', 'codeviewer');
 
19
                $headTagData['jsFiles'] = array('ace/ace', 'header');
20
20
        
21
21
                $this->load->model('codeviewer/Codeviewer_model');
22
22
 
23
23
                $editorHTML = $this->Codeviewer_model->getCode($cid, $category, $subcategory, $example);
24
24
        
25
25
                $this->load->model('user');
 
26
                
26
27
                $userInfo = array(
27
28
                        'userType' => $this->user->getUserType(),
28
29
                        'userName' => $this->user->getUserName()
29
30
                );
30
31
                
 
32
                $this->load->helper('form');
31
33
                
32
34
                // $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
33
35
 
35
37
                // Do note that application/views should not be in the first argument of view()
36
38
                // The second argument is data to be shown in the view. "editors" => "test" would
37
39
                // generate an $editors variable in the view containing "test"
 
40
                $this->load->view('headTag', array('headTagData' => $headTagData));
38
41
                $this->load->view('header', $userInfo);
39
 
                $this->load->view('headTag', $headData);
40
42
                $this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML));
41
43
        }
42
44
}