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 |
|
|
19 |
<?php |
|
20 |
//$filetree[];
|
|
21 |
||
22 |
foreach ($filetree as $category => $subCategories) { |
|
23 |
echo '<div id="'.$category.'"> |
|
24 |
<div name="'.$category.'" class="categoryName">' |
|
25 |
.$category. |
|
26 |
'</div>'; |
|
27 |
||
28 |
foreach ($subCategories as $subCategory => $subCategoryContents) { |
|
29 |
echo '<div name="'.$subCategory.'" class="subCategoryName">' |
|
30 |
.$subCategory. |
|
31 |
'</div>'; |
|
32 |
||
33 |
foreach ($subCategoryContents['examples'] as $example) { |
|
34 |
echo '<div name="'.$example.'" class="exampleName">' |
|
35 |
.$example. |
|
36 |
'</div>'; |
|
37 |
}
|
|
38 |
||
39 |
foreach ($subCategoryContents['quizzes'] as $quiz) { |
|
40 |
echo '<div name="'.$quiz.'" class="quizName">' |
|
41 |
.$quiz. |
|
42 |
'</div>'; |
|
43 |
}
|
|
44 |
}
|
|
45 |
echo '</div><!-- end of category div -->'; |
|
46 |
}
|
|
47 |
?>
|
|
48 |
|
|
49 |
<!-- Loops down below makes it possible to load values from a source --> |
|
50 |
<?php |
|
51 |
/*$counter=1;
|
|
52 |
foreach ($titles as $category => $categoryArray){
|
|
53 |
$categoryData = explode(',', $category);
|
|
54 |
$counter++;
|
|
55 |
if($counter % 2){ // Lös detta på bättre sätt
|
|
56 |
echo '<div id="'.$category.'" class="banner row">
|
|
57 |
<h1 class="categoryName" name="'.$category.'">
|
|
58 |
<p class="categoryIcon expanded" onclick="categoryExpand("'.$category.'");">?</p>'.$category.'
|
|
59 |
</h1>
|
|
60 |
<div class="categoryMoveUp" onclick="categoryMoveUp("'.$category.'");">&</div>
|
|
61 |
<div class="categoryMoveDown" onclick="categoryMoveDown("'.$category.'");">&</div>';
|
|
62 |
foreach ($categoryArray as $subCategory => $subCatArray){
|
|
63 |
|
|
64 |
if(!is_numeric($subCategory)){
|
|
65 |
echo '<div class="categoryBorder"></div>
|
|
66 |
<div id='.$subCategory.'>
|
|
67 |
<h3 class="subCategoryName row">
|
|
68 |
<p class="categoryIcon expanded" onclick="categoryExpand("'.$subCategory.'")">?</p>'.$subCategory.'
|
|
69 |
</h3>';
|
|
70 |
if(count($subCatArray)>0){
|
|
71 |
foreach ($subCatArray as $example){
|
|
72 |
echo '<div class="categoryBorder"></div>
|
|
73 |
<div class="exampleBorder"></div>
|
|
74 |
<a href="#" class="exampleName row">
|
|
75 |
<div class="exampleIcon"></div>
|
|
76 |
'.$example.'
|
|
77 |
</a>';
|
|
78 |
}
|
|
79 |
}
|
|
80 |
echo '</div>';
|
|
81 |
}
|
|
82 |
}
|
|
83 |
echo '</div>';
|
|
84 |
}
|
|
85 |
|
|
86 |
}*/
|
|
87 |
?>
|
|
88 |
</div><!-- end of cmsContentBody div --> |
|
89 |
</div>
|
|
90 |
||
91 |