/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: Simon Bergöö
  • Date: 2013-05-15 12:41:14 UTC
  • mfrom: (66 lenasys_b)
  • mto: This revision was merged to the branch mainline in revision 67.
  • Revision ID: a11simbe@student.his.se-20130515124114-d9fctkf2rkqq6xg6
Merged from trunk, statred working on the popups model.

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');
 
20
        
18
21
                $this->load->model('codeviewer/Codeviewer_model');
19
22
 
20
23
                $editorHTML = $this->Codeviewer_model->getCode($cid, $category, $subcategory, $example);
21
 
 
22
 
                $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
 
24
        
 
25
                $this->load->model('user');
 
26
                $userInfo = array(
 
27
                        'userType' => $this->user->getUserType(),
 
28
                        'userName' => $this->user->getUserName()
 
29
                );
 
30
                
 
31
                
 
32
                // $doc = $this->Codeviewer_model->getDoc($cid, $category, $subcategory, $example);
23
33
 
24
34
                // This loads the view. It's stored in application/views/codeviewer/codeviewer.php
25
35
                // Do note that application/views should not be in the first argument of view()
26
36
                // The second argument is data to be shown in the view. "editors" => "test" would
27
37
                // generate an $editors variable in the view containing "test"
28
 
                $this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML, "documentation" => $doc));
 
38
                $this->load->view('header', $userInfo);
 
39
                $this->load->view('headTag', $headData);
 
40
                $this->load->view('codeviewer/codeviewer', array("editors" => $editorHTML));
29
41
        }
30
 
}
 
 
b'\\ No newline at end of file'
 
42
}