/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/bannermenu.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-05-29 11:07:14 UTC
  • mfrom: (124.1.1 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130529110714-4iioizgqujt45riz
Merged Wikströms changes:

Added display of statistics in the sidepane

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<!-- bannermenu.php -->
 
3
<div id="bannerBody">
 
4
 
 
5
    <!-- This div contains the bannermenu and centers it on the page -->
 
6
    <div id="bannerWrapper">
 
7
    
 
8
                <!-- Determines how the LenaSYSButton should look and function depending on if the user is logged in or not  -->
 
9
        <?php
 
10
                        //$userName
 
11
                        $url = base_url();
 
12
                        
 
13
                        //If user is logged in
 
14
                        if($userName != '') {
 
15
                                $url = base_url().'cms';
 
16
                        }
 
17
                        
 
18
                        echo '<a href="'.$url.'" title="Home"><div id="bannerLogoButton"></div></a>';
 
19
                ?>
 
20
        
 
21
                <!-- This div contains all the content between the LenaSYS button and the user button -->
 
22
        <div id="bannerContent">
 
23
                        
 
24
            <!-- This div contains the content that is needed on the banner for the CMS page.
 
25
            The name is only used to set it hidden or shown. -->
 
26
            <div id="bannerContentCMS">
 
27
                
 
28
                <!-- Determines if the header should contain active course info depending on if the user is logged in or not -->
 
29
                <?php
 
30
                                        //$userName
 
31
                                        //$activeCourse
 
32
                                        $header = '';
 
33
                                                                                        
 
34
                                        //If user is logged in
 
35
                                        if($userName != '') {
 
36
                                                $header = '<span id="bannerHeaderCMSCourseName">'.
 
37
                                                $activeCourse['courseName'].'&nbsp;</span><span id="bannerHeaderCMSCourseCode">-&nbsp;'.
 
38
                                                $activeCourse['courseID'].'</span>';
 
39
                                        }
 
40
                                        
 
41
                                        echo '<div id="bannerHeaderCMS">'.$header.'</div>';
 
42
                                ?>
 
43
                
 
44
            </div>
 
45
            
 
46
            <!-- This div contains the content that is needed on the banner for the example page.
 
47
            The name is only used to set it hidden or shown. -->
 
48
            <div id="bannerContentExample">
 
49
                        
 
50
                                <!-- This div contains the dropdownmenu for the codeviewer menu button -->
 
51
                                <div id="dropdownCodeviewerMenu">
 
52
                                        <div class="drowdownMenuHeader">Choose example</div>
 
53
                                        <a href="#"><div class="dropdownMenuButton">Menu with images using divs</div></a>
 
54
                                        <a href="#"><div class="dropdownMenuButton">Dropdown menu</div></a>
 
55
                                        <a href="#"><div class="dropdownMenuButton">Expand and contract data</div></a>             
 
56
                                </div>
 
57
                        
 
58
                <a href="#" title="Open example menu"><div id="bannerCodeviewerMenuButton" class="icomoon">%</div></a>
 
59
                <a href="#" title="Go to previous example"><div id="bannerLeftArrowButton" class="icomoon">&amp;</div></a>
 
60
                <a href="#" title="Go to next example"><div id="bannerRightArrowButton" class="icomoon">'</div></a>
 
61
                <a href="#" title="Play the example"><div id="bannerPlayButton" class="icomoon">-</div></a>
 
62
                <div id="bannerHeaderExample">Menu with images using divs</div>
 
63
                <a href="#" title=""><div id="bannerExtraButton" class="icomoon">+</div></a>
 
64
            </div>
 
65
            
 
66
        </div><!-- End of bannerContent -->
 
67
        
 
68
        <!-- Determines how the userMenuButton should look and function depending on if the user is logged in or not  -->
 
69
        <?php
 
70
                        //$userName
 
71
                        $title = '';
 
72
                        $text = ''; 
 
73
                        
 
74
                        if($userName == '') {
 
75
                                $title = 'Click to login';
 
76
                                $text = 'Login';
 
77
                        }
 
78
                        else if($userName != '') {
 
79
                                $title = 'Open settings menu';
 
80
                                $text = $userName;
 
81
                        }
 
82
                        
 
83
                        echo '<div id="bannerUserMenuButton" title="'.$title.'">'.$text.'</div>';
 
84
                ?>
 
85
                
 
86
        <!-- This div contains the dropdownmenu for user menu button -->
 
87
        <div id="dropdownUserMenu">
 
88
            <div class="drowdownMenuHeader">Settings</div>
 
89
                                <div id="dropdownMenuExpandCourses" class="dropdownMenuButton">
 
90
                                        Courses<span id="dropdownMenuButtonArrow">&nbsp;</span>
 
91
                                </div>
 
92
            <div id="dropdownMenuCourseBlock">
 
93
                <ul>
 
94
                                        <?php
 
95
                                                //$courses
 
96
                                                //$activeCourse
 
97
                                                
 
98
                                                foreach($courses as $course) {
 
99
                                                        if($course->courseID == $activeCourse['courseID']) {
 
100
                                                                echo '<li class="dropdownMenuCourseBlockActiveCourse">'
 
101
                                                                .$course->name.' - '.$course->courseID;
 
102
                                                                echo '</li>';
 
103
                                                        }
 
104
                                                        else {
 
105
                                                                echo '<li>'
 
106
                                                                .$course->name.' - '.$course->courseID;
 
107
                                                                echo '</li>';
 
108
                                                        }
 
109
                                                }
 
110
                                        ?>
 
111
                </ul>
 
112
                <hr>
 
113
                <p>Manage Courses</p>
 
114
            </div>
 
115
            <div class="dropdownMenuButton" id="dropdownMenuAddInstructor">Add Instructor</div>
 
116
            <div class="dropdownMenuButton" id="dropdownMenuChangePassword">Change Password</div>
 
117
            <div class="dropdownMenuButton" id="dropdownMenuLogout">Logout</div>
 
118
        </div>
 
119
                
 
120
                <!-- This div contains the all the popups needed for this view -->
 
121
                <div id="popup"></div>
 
122
                
 
123
    </div><!-- End of bannerWrapper -->
 
124
    
 
125
</div><!-- End of bannerBody -->
 
 
b'\\ No newline at end of file'