bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
1 |
<!-- cmsindex.php -->
|
2 |
<div id="cmsContentWrapper" class="cmsContent"> |
|
3 |
<div id="cmsContentHeader"> |
|
4 |
<?php |
|
5 |
//$userType
|
|
6 |
||
7 |
if($userType=='Teacher') { |
|
8 |
echo ' |
|
9 |
<div class="cmsButton right abowHeaderLine">Add Student</div>
|
|
10 |
<div class="cmsButton right abowHeaderLine">View students</div>
|
|
11 |
<div class="cmsButton right belowHeaderLine">Add Category</div>
|
|
12 |
'; |
|
13 |
}
|
|
14 |
?>
|
|
15 |
</div> |
|
16 |
||
17 |
<div id="cmsContentBody"> |
|
18 |
||
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
19 |
<?php |
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
20 |
//$filetree[];
|
21 |
$oddToggle = true; |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
22 |
$line; |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
23 |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
24 |
foreach ($filetree as $category => $subCategories) { |
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
25 |
|
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
26 |
if ($oddToggle) { |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
27 |
$line = 'odd'; |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
28 |
$oddToggle = false; |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
29 |
} else { |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
30 |
$line = 'even'; |
31 |
$oddToggle = true; |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
32 |
}
|
90.1.17
by a11emmjo
Fixed some css on the cmsindex. |
33 |
echo '<div id="'.$category.'"> |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
34 |
<div class="'.$line.'"> |
35 |
<div class="categoryIcon"></div>
|
|
36 |
<div name="'.$category.'" class="categoryName">'.$category.'</div> |
|
37 |
</div>'; |
|
38 |
||
39 |
foreach ($subCategories as $subCategory => $subCategoryContents) { |
|
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
40 |
|
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
41 |
if ($oddToggle) { |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
42 |
$line = 'odd'; |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
43 |
$oddToggle = false; |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
44 |
} else { |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
45 |
$line = 'even'; |
46 |
$oddToggle = true; |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
47 |
}
|
48 |
echo '<div class="'.$line.'"> |
|
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
49 |
<div class="categoryDots"></div>
|
50 |
<div class="subCategoryIcon"></div>
|
|
51 |
<div name="'.$subCategory.'" class="subCategoryName">'.$subCategory.'</div> |
|
52 |
</div>'; |
|
53 |
||
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
54 |
foreach ($subCategoryContents['examples'] as $example) { |
55 |
||
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
56 |
if ($oddToggle) { |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
57 |
$line = 'odd'; |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
58 |
$oddToggle = false; |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
59 |
} else { |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
60 |
$line = 'even'; |
61 |
$oddToggle = true; |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
62 |
}
|
63 |
echo '<div class="'.$line.'"> |
|
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
64 |
<div class="categoryDots"></div>
|
65 |
<div class="subCategoryDots"></div>
|
|
66 |
<div name="'.$example.'" class="exampleName">'.$example.'</div> |
|
67 |
</div>'; |
|
68 |
}
|
|
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
69 |
|
70 |
foreach ($subCategoryContents['quizzes'] as $quiz) { |
|
71 |
||
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
72 |
if ($oddToggle) { |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
73 |
$line = 'odd'; |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
74 |
$oddToggle = false; |
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
75 |
} else { |
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
76 |
$line = 'even'; |
77 |
$oddToggle = true; |
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
78 |
}
|
79 |
echo '<div class="'.$line.'"> |
|
90.1.20
by a11emmjo
Fixed the layout on cms index so the arrows and dots marks expanded objects. |
80 |
<div class="categoryDots"></div>
|
81 |
<div class="subCategoryDots"></div>
|
|
82 |
<div name="'.$quiz.'" class="quizName">'.$quiz.'</div> |
|
83 |
</div>'; |
|
84 |
}
|
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
85 |
}
|
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
86 |
echo '</div><!-- end of category div -->'; |
87 |
}
|
|
88 |
?>
|
|
89 |
|
|
90 |
<!-- Loops down below makes it possible to load values from a source --> |
|
91 |
<?php |
|
92 |
/*$counter=1;
|
|
93 |
foreach ($titles as $category => $categoryArray){
|
|
94 |
$categoryData = explode(',', $category);
|
|
95 |
$counter++;
|
|
96 |
if($counter % 2){ // Lös detta på bättre sätt
|
|
97 |
echo '<div id="'.$category.'" class="banner row">
|
|
98 |
<h1 class="categoryName" name="'.$category.'">
|
|
99 |
<p class="categoryIcon expanded" onclick="categoryExpand("'.$category.'");">?</p>'.$category.'
|
|
100 |
</h1>
|
|
101 |
<div class="categoryMoveUp" onclick="categoryMoveUp("'.$category.'");">&</div>
|
|
102 |
<div class="categoryMoveDown" onclick="categoryMoveDown("'.$category.'");">&</div>';
|
|
103 |
foreach ($categoryArray as $subCategory => $subCatArray){
|
|
104 |
|
|
105 |
if(!is_numeric($subCategory)){
|
|
106 |
echo '<div class="categoryBorder"></div>
|
|
107 |
<div id='.$subCategory.'>
|
|
108 |
<h3 class="subCategoryName row">
|
|
109 |
<p class="categoryIcon expanded" onclick="categoryExpand("'.$subCategory.'")">?</p>'.$subCategory.'
|
|
110 |
</h3>';
|
|
111 |
if(count($subCatArray)>0){
|
|
112 |
foreach ($subCatArray as $example){
|
|
113 |
echo '<div class="categoryBorder"></div>
|
|
114 |
<div class="exampleBorder"></div>
|
|
115 |
<a href="#" class="exampleName row">
|
|
116 |
<div class="exampleIcon"></div>
|
|
117 |
'.$example.'
|
|
118 |
</a>';
|
|
119 |
}
|
|
120 |
}
|
|
121 |
echo '</div>';
|
|
122 |
}
|
|
123 |
}
|
|
90.1.18
by a11emmjo
Fixed even/odd line color on cmsindex. |
124 |
echo '</div>';
|
90.1.13
by a11emmjo
Changed so that cms-controller loads filetree (before known as examplesController, examplesBody, examplesMenu). |
125 |
}
|
126 |
|
|
127 |
}*/
|
|
128 |
?>
|
|
129 |
</div><!-- end of cmsContentBody div --> |
|
130 |
</div>
|
|
131 |
||
132 |