/lenasys/trunk

To get this branch, use:
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  -->
8
        <?php
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 -->
21
        <div id="bannerContent">
22
        
23
            <!-- This div contains the content that is needed on the banner for the CMS page.
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>&nbsp;-&nbsp;
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
                <a href="#" title="Open example menu"><div id="bannerCodeviewerMenuButton" class="icomoon">%</div></a>
49
                <a href="#" title="Go to previous example"><div id="bannerLeftArrowButton" class="icomoon">&amp;</div></a>
50
                <a href="#" title="Go to next example"><div id="bannerRightArrowButton" class="icomoon">'</div></a>
51
                <a href="#" title="Play the example"><div id="bannerPlayButton" class="icomoon">-</div></a>
52
                <div id="bannerHeaderExample">Menu with images using divs</div>
53
                <a href="#" title=""><div id="bannerExtraButton" class="icomoon">+</div></a>
54
            </div>
55
            
56
        </div><!-- End of bannerContent -->
57
        
58
        <!-- Determines how the userMenuButton should look and function depending on if the user is logged in or not  -->
59
        <?php
60
			//$userName
61
			$title = '';
62
			$text = ''; 
63
			
64
			if($userName == '') {
65
				$title = 'Click to login';
66
				$text = 'Login';
67
			}
68
			else if($userName != '') {
69
				$title = 'Open settings menu';
70
				$text = $userName;
71
			}
72
			
73
			echo '<div id="bannerUserMenuButton" title="'.$title.'">'.$text.'</div>';
67.1.6 by a11emmjo
Replaced bannermenu/topmenu/header... on login-page.
74
		?>
67.1.2 by a11emmjo
Changed from html to php and with that added some functions to the bannermenu.
75
        
76
    </div><!-- End of bannerWrapper -->
77
    
78
    <!-- This div contains the dropdownmenus -->
79
    <div id="dropdownMenuWrapper">
80
    
81
        <!-- This div contains the dropdownmenu for the codeviewer menu button -->
82
        <div id="dropdownCodeviewerMenu">
83
            <div class="drowdownMenuHeader">Choose example</div>
84
            <a href="#"><div class="dropdownMenuButton">Menu with images using divs</div></a>
85
            <a href="#"><div class="dropdownMenuButton">Dropdown menu</div></a>
86
            <a href="#"><div class="dropdownMenuButton">Expand and contract data</div></a>             
87
        </div>
88
        
89
        <!-- This div contains the dropdownmenu for user menu button -->
90
        <div id="dropdownUserMenu">
91
            <div class="drowdownMenuHeader">Settings</div>
92
            <a href="#"><div class="dropdownMenuButton">Courses<span id="dropdownMenuButtonArrow">&nbsp;</span></div></a>
93
            <div id="dropdownMenuCourseBlock">
94
                <ul>
95
					<?php
85.2.1 by a11emmjo
Combined bannermenu with startview to get correct start-page.
96
						//$courses
97
						
98
						foreach($courses as $course) {
99
							echo '<li><a href="#">'
100
							.$course->name.' - '.$course->courseID;
101
							echo '</a></li>';
102
						}
103
					?>
104
                    <li class="dropdownMenuCourseBlockActiveCourse"><a href="#">Webprogramming - DA330G</a></li>
105
                </ul>
67.1.2 by a11emmjo
Changed from html to php and with that added some functions to the bannermenu.
106
                <hr>
107
                <p><a href="#">Manage Courses</a></p>
85.2.1 by a11emmjo
Combined bannermenu with startview to get correct start-page.
108
            </div>
67.1.2 by a11emmjo
Changed from html to php and with that added some functions to the bannermenu.
109
            <a href="#"><div class="dropdownMenuButton">Add Instructor</div></a>
110
            <a href="#"><div class="dropdownMenuButton">Change Password</div></a>
111
            <a href="#"><div class="dropdownMenuButton">Logout</div></a>
112
        </div>
113
        
114
    </div><!-- End of dropdownMenuWrapper -->
115
    
116
</div><!-- End of bannerBody -->
117