bzr branch
http://gegoxaren.bato24.eu/bzr/lenasys/trunk
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
1 |
<!-- bannermenu.php -->
|
2 |
<div id="bannerBody"> |
|
3 |
||
4 |
<!-- This div contains the bannermenu and centers it on the page --> |
|
5 |
<div id="bannerWrapper"> |
|
6 |
|
|
7 |
<!-- Determines how the LenaSYSButton should look and function depending on if the user is logged in or not --> |
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
8 |
<?php |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
9 |
//$userName
|
10 |
$url = base_url(); |
|
11 |
||
12 |
//If user is logged in
|
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
13 |
if($userName != '') { |
14 |
$url += 'controller/metod'; |
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
15 |
}
|
16 |
||
17 |
echo '<a href="'.$url.'" title="Home"><div id="bannerLogoButton"></div></a>'; |
|
18 |
?>
|
|
19 |
|
|
20 |
<!-- This div contains all the content between the LenaSYS button and the user button --> |
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
21 |
<div id="bannerContent"> |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
22 |
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
23 |
<!-- This div contains the content that is needed on the banner for the CMS page. |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
24 |
The name is only used to set it hidden or shown. -->
|
25 |
<div id="bannerContentCMS"> |
|
26 |
|
|
27 |
<!-- Determines if the header should contain active course info depending on if the user is logged in or not --> |
|
28 |
<?php |
|
29 |
//$userName
|
|
30 |
//$activeCourseName
|
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
31 |
//$activeCourseCode
|
32 |
$header = ''; |
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
33 |
|
34 |
//If user is logged in
|
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
35 |
if($userName != '') { |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
36 |
$header = '<span id="bannerHeaderCMSCourseName">'.$activeCourseName.'</span> - |
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
37 |
<span id="bannerHeaderCMSCourseCode">'.$activeCourseCode.'</span>'; |
38 |
}
|
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
39 |
|
40 |
echo '<div id="bannerHeaderCMS">'.$header.'</div>'; |
|
41 |
?>
|
|
42 |
|
|
43 |
</div> |
|
44 |
|
|
45 |
<!-- This div contains the content that is needed on the banner for the example page. |
|
46 |
The name is only used to set it hidden or shown. -->
|
|
47 |
<div id="bannerContentExample"> |
|
48 |
|
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
49 |
<!-- This div contains the dropdownmenu for the codeviewer menu button --> |
50 |
<div id="dropdownCodeviewerMenu"> |
|
51 |
<div class="drowdownMenuHeader">Choose example</div> |
|
52 |
<a href="#"><div class="dropdownMenuButton">Menu with images using divs</div></a> |
|
53 |
<a href="#"><div class="dropdownMenuButton">Dropdown menu</div></a> |
|
54 |
<a href="#"><div class="dropdownMenuButton">Expand and contract data</div></a> |
|
55 |
</div> |
|
56 |
|
|
57 |
<a href="#" title="Open example menu"><div id="bannerCodeviewerMenuButton" class="icomoon">%</div></a> |
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
58 |
<a href="#" title="Go to previous example"><div id="bannerLeftArrowButton" class="icomoon">&</div></a> |
59 |
<a href="#" title="Go to next example"><div id="bannerRightArrowButton" class="icomoon">'</div></a> |
|
60 |
<a href="#" title="Play the example"><div id="bannerPlayButton" class="icomoon">-</div></a> |
|
61 |
<div id="bannerHeaderExample">Menu with images using divs</div> |
|
62 |
<a href="#" title=""><div id="bannerExtraButton" class="icomoon">+</div></a> |
|
63 |
</div> |
|
64 |
|
|
65 |
</div><!-- End of bannerContent --> |
|
66 |
|
|
67 |
<!-- Determines how the userMenuButton should look and function depending on if the user is logged in or not --> |
|
68 |
<?php |
|
69 |
//$userName
|
|
70 |
$title = ''; |
|
71 |
$text = ''; |
|
72 |
||
73 |
if($userName == '') { |
|
74 |
$title = 'Click to login'; |
|
75 |
$text = 'Login'; |
|
76 |
}
|
|
77 |
else if($userName != '') { |
|
78 |
$title = 'Open settings menu'; |
|
79 |
$text = $userName; |
|
80 |
}
|
|
81 |
||
82 |
echo '<div id="bannerUserMenuButton" title="'.$title.'">'.$text.'</div>'; |
|
|
67.1.6
by a11emmjo
Replaced bannermenu/topmenu/header... on login-page. |
83 |
?>
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
84 |
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
85 |
<!-- This div contains the dropdownmenu for user menu button --> |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
86 |
<div id="dropdownUserMenu"> |
87 |
<div class="drowdownMenuHeader">Settings</div> |
|
88 |
<a href="#"><div class="dropdownMenuButton">Courses<span id="dropdownMenuButtonArrow"> </span></div></a> |
|
89 |
<div id="dropdownMenuCourseBlock"> |
|
90 |
<ul> |
|
91 |
<?php |
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
92 |
//$courses
|
93 |
||
94 |
foreach($courses as $course) { |
|
95 |
echo '<li><a href="#">' |
|
96 |
.$course->name.' - '.$course->courseID; |
|
97 |
echo '</a></li>'; |
|
98 |
}
|
|
99 |
?>
|
|
100 |
<li class="dropdownMenuCourseBlockActiveCourse"><a href="#">Webprogramming - DA330G</a></li> |
|
101 |
</ul> |
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
102 |
<hr> |
103 |
<p><a href="#">Manage Courses</a></p> |
|
|
85.2.1
by a11emmjo
Combined bannermenu with startview to get correct start-page. |
104 |
</div> |
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
105 |
<a href="#"><div class="dropdownMenuButton">Add Instructor</div></a> |
106 |
<a href="#"><div class="dropdownMenuButton">Change Password</div></a> |
|
107 |
<a href="#"><div class="dropdownMenuButton">Logout</div></a> |
|
108 |
</div> |
|
109 |
|
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
110 |
<!-- This div contains the all the popups needed for this view --> |
|
90.1.5
by a11emmjo
Added popup-div to bannermenu. |
111 |
<div id="popup"></div> |
112 |
|
|
113 |
</div><!-- End of bannerWrapper --> |
|
|
90.1.1
by a11emmjo
Fixed the bannermenu so it shouldn't interfer with the content below. |
114 |
|
|
67.1.2
by a11emmjo
Changed from html to php and with that added some functions to the bannermenu. |
115 |
</div><!-- End of bannerBody --> |
116 |