/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/views/examplesBody.php

  • Committer: b11johgu
  • Date: 2013-05-14 12:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 65.
  • Revision ID: b11johgu@student.his.se-20130514123038-rthxj3f34o32gpxy
ExamplesController:
- Added expand/collapse arrows for categories/subcategories.
- Added category positioning (incomplete).

more general changes made.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
<!-- examplesBody.php -->
 
3
        <div id="exampleBodyMenu">
 
4
                <h1 class="temph1">Courseview</h1>
 
5
                 <!-- Only displayed when teacher -->
 
6
                <a class="btn positionUnder">Add category</a>
 
7
                <a class="btn cp">Add student</a>
 
8
                <a class="btn cp">View students</a>
 
9
        </div>
 
10
 
3
11
        <div id="bodyContainer">
4
 
                <div class="pinkBanner">
5
 
                        <h1 name="Quizzes">Quizzes</h1>
6
 
                </div>
 
12
 
 
13
                <!-- Loops down below makes it possible to load values from a source -->
 
14
                <?php
 
15
                $counter=1;
 
16
                foreach ($titles as $category => $categoryArray){
 
17
                $categoryData = explode(',', $category);
 
18
                        $counter++;
 
19
                        if($counter % 2){ // Lös detta på bättre sätt
 
20
                echo    '<div id="'.$category.'" class="banner row">
 
21
                                <h1 class="categoryName" name="'.$category.'">
 
22
                                        <p class="categoryIcon expanded" onclick="categoryExpand(&quot;'.$category.'&quot;);">?</p>'.$category.'
 
23
                                </h1>
 
24
                                <div class="categoryMoveUp" onclick="categoryMoveUp(&quot;'.$category.'&quot;);">&</div>
 
25
                                <div class="categoryMoveDown" onclick="categoryMoveDown(&quot;'.$category.'&quot;);">&</div>';
 
26
                                foreach ($categoryArray as $subCategory => $subCatArray){
 
27
                                
 
28
                                        if(!is_numeric($subCategory)){
 
29
                                                echo '<div class="categoryBorder"></div>
 
30
                                                <div id='.$subCategory.'>
 
31
                                                        <h3 class="subCategoryName row">
 
32
                                                                <p class="categoryIcon expanded" onclick="categoryExpand(&quot;'.$subCategory.'&quot;)">?</p>'.$subCategory.'
 
33
                                                        </h3>';
 
34
                                                        if(count($subCatArray)>0){
 
35
                                                                foreach ($subCatArray as $example){
 
36
                                                        echo    '<div class="categoryBorder"></div>
 
37
                                                                        <div class="exampleBorder"></div>
 
38
                                                                        <a href="#" class="exampleName row">
 
39
                                                                                <div class="exampleIcon"></div>
 
40
                                                                                '.$example.'
 
41
                                                                        </a>';
 
42
                                                                }
 
43
                                                        }
 
44
                                                echo '</div>';
 
45
                                        }
 
46
                                }               
 
47
                        echo '</div>';
 
48
                }
7
49
                
8
 
                <!-- Loops down below makes it possible to load values from a source -->
9
 
        <?php foreach ($titles as $category => $categoryArray):?>
10
 
                <div class="blueBanner">
11
 
                        <h1 name="<?php echo $category;?>"><?php echo $category;?></h1>
12
 
                </div>
13
 
                <?php foreach ($categoryArray as $subCategory => $subCatArray):?>
14
 
                        <h3><?php echo $subCategory;?></h3>
15
 
                        <?php 
16
 
                        if(count($subCatArray)>0){
17
 
                        foreach ($subCatArray as $example):?>
18
 
                                <p><a href="#"><?php echo $example;?></a></p>
19
 
                        <?php endforeach;}?>    
20
 
                <?php endforeach;?>     
21
 
        <?php endforeach;?>     
 
50
                }
 
51
                ?>
22
52
        </div>
23
53
 
24
54
        </div>