Added: vcl/trunk/web/themes/dropdownmenus/css/theme.css URL: http://svn.apache.org/viewvc/vcl/trunk/web/themes/dropdownmenus/css/theme.css?rev=1756421&view=auto ============================================================================== --- vcl/trunk/web/themes/dropdownmenus/css/theme.css (added) +++ vcl/trunk/web/themes/dropdownmenus/css/theme.css Mon Aug 15 20:17:37 2016 @@ -0,0 +1,499 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +@charset "utf-8"; +body { + font-size: 14px; + font-family: Tahoma, Geneva, sans-serif; +} +h2 { + font-size: 2.1em; +} +h3 { + font-size: 1.8em; +} +h4 { + font-size: 1.5em; +} +/* CSS Document */ +@media (max-width: 768px) { + #topmenu li { + padding-left: 0; + margin-left: 0; + } +} +@media (max-width: 767px) { + #topmenu ul.dropdown-menu li a { + color: #777777 !important; + } + #topmenu li { + padding-left: 2.2em; + margin-left: 1em; + } +} +@media (min-width: 768px) { + #topmenu { + white-space: nowrap; + } +} +#expauthul li { + list-style-type: disc; +} +#loggedinidbox { + float: right; + text-transform: none; + padding: 6px; + line-height: 1em; + color: white; + background-color: black; + font-weight: bold; +} +@media (max-width: 767px) { + #rightmenubox { + display: none; + } + #logoutlink1 { + display: none; + } + .localeform { + display: none; + } +} +@media (min-width: 768px) { + #rightmenubox { + float: right; + text-align: right; + padding-top: 15px; + font-size: 0.9em; + line-height: 1em; + color: #ed1c24; + white-space: nowrap; + } + #logoutlink1 { + padding-left:10px; + } + #logoutlink1 a { + color: #000; + } + #logoutlink2 { + display: none; + } + #mobilelanguagemenu { + display: none; + } +} +#loginbox { + margin-left: auto; + margin-right: auto; + width: 28em; +} +#loginlayout { + width: auto; +} +#loginlayout tbody tr:hover th, +#loginlayout tbody tr th, +#loginlayout tbody tr:hover td, +#loginlayout tbody tr td, +#addeditdlg tbody tr:hover td, +#addeditdlg tbody tr td, +#confdelrescontent tbody tr:hover td, +#confdelrescontent tbody tr td, +#groupdlg tbody tr:hover td, +#groupdlg tbody tr td, +#addUserPane tbody tr:hover td, +#addUserPane tbody tr td, +#addUserGroupPane tbody tr:hover td, +#addUserGroupPane tbody tr td, +#addResourceGroupPane tbody tr:hover td, +#addResourceGroupPane tbody tr td, +#addNodePane tbody tr:hover td, +#addNodePane tbody tr td, +#deleteDialog tbody tr:hover td, +#deleteDialog tbody tr td, +#renameDialog tbody tr:hover td, +#renameDialog tbody tr td { + background-color: transparent; + border-top: none; + padding: 0.2em; +} +#groupbyresourcediv table.dojoxGridRowTable tbody tr:hover td { + background-color: transparent; +} +#groupbyresourcediv div.dojoxGridRowSelected table.dojoxGridRowTable tbody tr td { + background-color: black; + color: white; +} +#addeditdlg tbody tr td.dijitButtonNode { + border: 1px solid #c0c0c0; +} +#confdelrescontent tbody tr:hover th, +#confdelrescontent tbody tr th { + background-color: transparent; + border-top: none; + padding: 0.2em; + text-align: right; +} +#userlookupdata table tbody tr th, +#userlookupresdata table tbody tr th, +#vmprofile div.dijitTitlePaneContentInner table tbody tr th, +#vmprofiledata table tbody tr th { + text-align: right; +} +#revisiontable { + border-top:1px solid; +} +#content, +.dijitDialog, +.dijitPopup, +.dijitToolTip { + font-size: 0.75em; + line-height: 1.2; +} +#content { + padding-left: 0.3em; + padding-right: 0.3em; +} +#content table, +.dijitPopup table, +.dijitDialog table, +.dijitToolTip table { + margin:0; + padding:0; + border-spacing:0; + border-collapse:collapse; + vertical-align:top; + border: none; + width: auto; +} +div.dijitMenuPopup table tbody tr.dijitMenuItemFocused td { + background-color: #3559ac; +} +#usergroupcontainer, +#resourcegroupcontainer, +#gridcontainer, +#extrafiltersdiv, +.dijitPopup { + box-sizing: content-box; + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; +} +#usergroupcontainer table, +#resourcegroupcontainer table, +#gridcontainer table, +#extrafiltersdiv table, +#viewtimesDialog table { + width: 0; +} +#content table#groupmembershiptbl { + border-top: 1px solid; +} +#content table tbody tr th, +#content table tbody tr td, +#messagestext table tbody tr th, +#messagestext table tbody tr td, +#editDialog table tbody tr th, +#editDialog table tbody tr td, +#confirmDialog table tbody tr th, +#confirmDialog table tbody tr td, +#viewtimesDialog table tbody tr th, +#viewtimesDialog table tbody tr td, +#acceptDialog table tbody tr th, +#acceptDialog table tbody tr td, +#rejectDialog table tbody tr th, +#rejectDialog table tbody tr td { + border-top: none; + background-color: transparent; + padding: 0.2em; +} +#content tbody tr td.dijitButtonNode { + border: 1px solid #c0c0c0; +} +#resStatusPane td, +#messages th, +#messages td { + line-height: 1.1; +} +#messagestext table tbody tr th, +#editDialog table tbody tr th, +#confirmDialog table tbody tr th, +#acceptDialog table tbody tr th, +#rejectDialog table tbody tr th { + text-align: right; +} +#content fieldset, +#addeditdlg fieldset { + border: 1px solid #808080; + padding: 0.3em; +} +#content fieldset form p, +#addeditdlg fieldset form p { + margin-bottom: 0.1em; +} +#content small, +.dijitDialog small { + font-size: 85%; +} +#content input[type="radio"], +#content input[type="checkbox"] { + margin-top: 0; + margin-right: 0.6em; + margin-bottom: 0; + margin-left: 0.6em; +} +#content label { + margin-bottom: 0; +} +#deployprofileslist fieldset legend, +#uipreffieldsets fieldset legend, +#addeditdlg fieldset legend, +#groupprivhelpcell fieldset legend { + width: auto; + font-size: 1.2em; + margin-bottom: 0; + padding: 0.3em; + margin-left: 0.6em; + border: none; +} +#widget_deployimage .dijitReset { + line-height: 1.4; +} +.dijitReset { + line-height: 1.4 !important; +} +#newResDlgContent { + line-height: 1; +} +.dijitDialog ul { + margin-top: 0.8em; + line-height: 1.3; +} +.dijitDialog ul li:before { + content: none; +} +.dijitPopup { + font-size: 0.75em; +} +#usersDiv table tbody tr:hover, +#usersDiv table tbody tr th, +#usersDiv table tbody tr td, +#usergroupsDiv table tbody tr:hover, +#usergroupsDiv table tbody tr th, +#usergroupsDiv table tbody tr td, +#resourcesDiv table tbody tr:hover, +#resourcesDiv table tbody tr th, +#resourcesDiv table tbody tr td, +#addUserPane table tbody tr:hover, +#addUserPane table tbody tr th, +#addUserPane table tbody tr td, +#addUserGroupPane table tbody tr:hover, +#addUserGroupPane table tbody tr th, +#addUserGroupPane table tbody tr td, +#addResourceGroupPane table tbody tr:hover, +#addResourceGroupPane table tbody tr th, +#addResourceGroupPane table tbody tr td { + border: 1px solid black; +} +#addUserPane table.noborder tbody tr:hover, +#addUserPane table.noborder tbody tr th, +#addUserPane table.noborder tbody tr td, +#addUserGroupPane table.noborder tbody tr:hover, +#addUserGroupPane table.noborder tbody tr th, +#addUserGroupPane table.noborder tbody tr td, +#addResourceGroupPane table.noborder tbody tr:hover, +#addResourceGroupPane table.noborder tbody tr th, +#addResourceGroupPane table.noborder tbody tr td { + border: none; +} +#usersDiv th.privBlock, +#usersDiv td.privBlock, +#usergroupsDiv th.privBlock, +#usergroupsDiv td.privBlock, +#resourcesDiv th.privBlock, +#resourcesDiv td.privBlock, +#addUserPane th.privBlock, +#addUserPane td.privBlock, +#addUserPane td.privBlock:hover, +#addUserGroupPane th.privBlock, +#addUserGroupPane td.privBlock, +#addUserGroupPane td.privBlock:hover, +#addResourceGroupPane th.privBlock, +#addResourceGroupPane td.privBlock, +#addResourceGroupPane td.privBlock:hover { + background-color: gray !important; +} +#usersDiv th.privCascade, +#usersDiv td.privCascade, +#usergroupsDiv th.privCascade, +#usergroupsDiv td.privCascade, +#resourcesDiv th.privCascade, +#resourcesDiv td.privCascade, +#addUserPane th.privCascade, +#addUserPane td.privCascade, +#addUserPane td.privCascade:hover, +#addUserGroupPane th.privCascade, +#addUserGroupPane td.privCascade, +#addUserGroupPane td.privCascade:hover, +#addResourceGroupPane th.privCascade, +#addResourceGroupPane td.privCascade, +#addResourceGroupPane td.privCascade:hover { + background-color: #008000 !important; +} +#content div.dashwidget h3 { + background-color: #ed1c24; +} +a:hover, a:active { + text-decoration: underline; +} +a:visited { + color: #990000; +} +#row1 { + background-color:#ffffff; +} +img.header-logo { + float: left; + padding-right: 1em; + vertical-align: middle; +} +h1.site-title { + line-height: 1em; + font-size: 1.7em; + padding-top: 15px; + margin: 0; +} +#reslisttable td, #imgreslisttable td, #longreslisttable td { + padding-left: 8px; + padding-right: 8px; +} +#layouttable form { + margin: 0 0 0 0; +} +#content { + margin-left: 8px; +} +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; +} +.configwidget h3 { + background-color: #ed1c24 !important; + font-size: 1.6em; + padding: 2px; +} +.configwidget { + font-size: 1.1em; +} +#computerdlgcontent label { + width: 16em; +} +#computerdlgcontent .labeledform { + margin-left: 16.5em; +} +#advancedoptions label { + width: 21em; +} +#advancedoptions .labeledform { + margin-left: 21.5em; +} +#mgmtnodedlgcontent label { + width: 24.5em; +} +#mgmtnodedlgcontent .labeledform { + margin-left: 25em; +} +#newreslabelfields label { + width: 12em; +} +#newreslabelfields .labeledform { + margin-left: 12.5em; +} +#length { + vertical-align: middle; +} +#content #ttlayout tbody tr td { + padding: 0; +} +/* header */ +#siteheader div.container { + padding-top: 10px; +} +#site-navigation { + background-color: #fff; + border-top: none; + border-left: none; + border-right: none; + border-bottom: 1px solid #ccc; + width: 100%; + top: 0; + position: relative; + z-index: 100; +} +#site-navigation div.container { + padding-left: 8px; + padding-right: 8px; +} +#navbar-collapse-main { + padding-left: 0; + padding-right: 0; +} +#topmenu > li > a { + color: #000; + font-size: 0.9em; + font-weight: bold; +} +#topmenu > li.active > a { + color: #fff; +} +.container-fluid { + padding-left: 0; + padding-right: 0; +} +.dropdown-menu { + background-color: #ed1c24; +} +.dropdown-menu > li > a { + color: #fff; +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + background-color: #000; +} +.navbar-default .navbar-nav > .active > a, +.navbar-default .navbar-nav > .active > a:hover { + background-color: #ed1c24; +} +.localeform { + display: inline; + color: #000; +} +/* footer */ +footer { + margin-top: 15px; + background-color: #ed1c24; +} +footer .row { + margin: 0; + padding: 15px; + text-align: right; +} +footer a, +footer a:visited { + color: #ffffff; +} +.site-info { + color: #000; +}
Added: vcl/trunk/web/themes/dropdownmenus/images/feather_tiny.png URL: http://svn.apache.org/viewvc/vcl/trunk/web/themes/dropdownmenus/images/feather_tiny.png?rev=1756421&view=auto ============================================================================== Binary file - no diff available. Propchange: vcl/trunk/web/themes/dropdownmenus/images/feather_tiny.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: vcl/trunk/web/themes/dropdownmenus/images/vcllogo.png URL: http://svn.apache.org/viewvc/vcl/trunk/web/themes/dropdownmenus/images/vcllogo.png?rev=1756421&view=auto ============================================================================== Binary file - no diff available. Propchange: vcl/trunk/web/themes/dropdownmenus/images/vcllogo.png ------------------------------------------------------------------------------ svn:mime-type = image/png Added: vcl/trunk/web/themes/dropdownmenus/js/topnav.js URL: http://svn.apache.org/viewvc/vcl/trunk/web/themes/dropdownmenus/js/topnav.js?rev=1756421&view=auto ============================================================================== --- vcl/trunk/web/themes/dropdownmenus/js/topnav.js (added) +++ vcl/trunk/web/themes/dropdownmenus/js/topnav.js Mon Aug 15 20:17:37 2016 @@ -0,0 +1,38 @@ +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +function handleTopNav(e) { + var resptest = document.getElementById('rightmenubox'); + if(getComputedStyle(resptest, null).display == 'none') { + document.getElementById('site-navigation').style.position = 'relative'; + return; + } + var test = document.getElementById('above-site-navigation'); + var nav = document.getElementById('site-navigation'); + var box = test.getBoundingClientRect(); + var pos = nav.style.position; + var btop = box.y; + if(typeof(btop) === 'undefined' && typeof(box.top) !== 'undefined') + btop = box.top; + if(btop < 0) { + nav.style.position = 'fixed'; + } + else { + nav.style.position = 'relative'; + } +} + +window.addEventListener('scroll', handleTopNav, 0); Added: vcl/trunk/web/themes/dropdownmenus/page.php URL: http://svn.apache.org/viewvc/vcl/trunk/web/themes/dropdownmenus/page.php?rev=1756421&view=auto ============================================================================== --- vcl/trunk/web/themes/dropdownmenus/page.php (added) +++ vcl/trunk/web/themes/dropdownmenus/page.php Mon Aug 15 20:17:37 2016 @@ -0,0 +1,244 @@ +<?php +/* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed with +* this work for additional information regarding copyright ownership. +* The ASF licenses this file to You under the Apache License, Version 2.0 +* (the "License"); you may not use this file except in compliance with +* the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +//////////////////////////////////////////////////////////////////////////////// +/// +/// \fn getHeader($refresh) +/// +/// \param $refresh - bool for adding code to refresh page +/// +/// \return string of html to go before the main content +/// +/// \brief builds the html that goes before the main content +/// +//////////////////////////////////////////////////////////////////////////////// +function getHeader($refresh) { + global $user, $mode, $authed, $viewmode, $locale, $VCLversion; + $v = $VCLversion; + + $rt = "<!DOCTYPE html>\n"; + $rt .= "<html lang=\"en-US\">\n"; + $rt .= "<head>\n"; + $usenls = 0; + $usenlsstr = "false"; + if(! preg_match('/^en/', $locale)) { + $usenls = 1; + $usenlsstr = "true"; + } + $rt .= "<link rel=\"shortcut icon\" href=\"images/favicon.ico\" type=\"image/x-icon\" />\n"; + $rt .= "<link href=\"css/vcl.css\" rel=\"stylesheet\" type=\"text/css\" />\n"; + + $rt .= "<meta charset=\"UTF-8\">\n"; + $rt .= "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"; + $rt .= "<title>" . i('VCL: The Virtual Computing Lab') . "</title>\n"; + $rt .= "<meta name='robots' content='noindex,follow' />\n"; + + $rt .= "<link href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u\" crossorigin=\"anonymous\" media=\"all\" />\n"; + + $rt .= "<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js\" integrity=\"sha512-jGsMH83oKe9asCpkOVkBnUrDDTp8wl+adkB2D+//JtlxO4SrLoJdhbOysIFQJloQFD+C4Fl1rMsQZF76JjV0eQ==\" crossorigin=\"anonymous\"></script>\n"; + + $rt .= "<link href=\"themes/dropdownmenus/css/theme.css\" rel=\"stylesheet\" type=\"text/css\" />\n"; + $rt .= "<script src=\"themes/dropdownmenus/js/topnav.js\" type=\"text/javascript\"></script>\n"; + $rt .= "<script src=\"js/code.js?v=$v\" type=\"text/javascript\"></script>\n"; + if($usenls) + $rt .= "<script type=\"text/javascript\" src=\"js/nls/$locale/messages.js?v=$v\"></script>\n"; + $rt .= "<script type=\"text/javascript\">\n"; + $rt .= "var cookiedomain = '" . COOKIEDOMAIN . "';\n"; + $rt .= "usenls = $usenlsstr;\n"; + $rt .= "</script>\n"; + $rt .= getDojoHTML($refresh); + if($refresh) + $rt .= "<noscript><meta http-equiv=refresh content=20></noscript>\n"; + $extracss = getExtraCSS(); + foreach($extracss as $file) + $rt .= "<link rel=stylesheet type=\"text/css\" href=\"css/$file\">\n"; + + $rt .= "</head>\n"; + $rt .= "<body class=\"dropdownmenus\">\n"; + $rt .= "<div id=\"wrapperdiv\" class=\"container-fluid\">\n"; + $rt .= "<header id=\"siteheader\" role=\"banner\">\n"; + if($authed) { + $rt .= " <div id=\"loggedinidbox\">\n"; + $rt .= " {$user['unityid']}@{$user['affiliation']}\n"; + $rt .= " </div>\n"; + } + $rt .= " <div class=\"container\">\n"; + $rt .= " <img src=\"themes/dropdownmenus/images/vcllogo.png\" class=\"header-logo\" />\n"; + $rt .= " <h1 class=\"site-title\">\n"; + $rt .= " <span>" . i('Virtual Computing Lab') . "</span><br />\n"; + $rt .= " </h1>\n"; + $rt .= " </div><!-- .container -->\n"; + $rt .= " <div class=\"container-fluid\">\n"; + $rt .= " <div id=\"above-site-navigation\"></div>\n"; + $rt .= " <nav id=\"site-navigation\" class=\"navbar navbar-default\" role=\"navigation\">\n"; + $rt .= " <a class=\"skip-link screen-reader-text\" href=\"#content\">" . i('Skip to content') . "</a>\n"; + $rt .= " <div class=\"container\">\n"; + $rt .= " <div class=\"navbar-header\">\n"; + $rt .= " <button id=\"navmenubtn\" type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\"#navbar-collapse-main\">\n"; + $rt .= " <span class=\"sr-only\">" . i('Toggle navigation') . "</span>\n"; + $rt .= " <span class=\"icon-bar\"></span>\n"; + $rt .= " <span class=\"icon-bar\"></span>\n"; + $rt .= " <span class=\"icon-bar\"></span>\n"; + $rt .= " </button>\n"; + $rt .= " </div><!-- .navbar-header -->\n"; + $rt .= " <div class=\"navbar-collapse collapse\" id=\"navbar-collapse-main\">\n"; + $rt .= " <div id=\"rightmenubox\">\n"; + if($mode != 'inmaintenance') + $rt .= getSelectLanguagePulldown(); + if($authed) { + $rt .= " <span id=\"logoutlink1\"><a href=\"" . BASEURL . SCRIPT . "?mode=logout\">" . i('Log out') . "</a></span>\n"; + } + $rt .= " </div>\n"; # rightmenubox + $rt .= " <ul id=\"topmenu\" class=\"nav navbar-nav\">\n"; + + if($authed) { + $menu = getNavMenuData(); + uasort($menu, 'sortMenuList'); + + if($menu['reservations']['selected']) + $rt .= " <li class=\"active\"><a href=\"{$menu['reservations']['url']}\">{$menu['reservations']['title']}</a></li>\n"; + else + $rt .= " <li><a href=\"{$menu['reservations']['url']}\">{$menu['reservations']['title']}</a></li>\n"; + $rt .= " <li><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" data-target=\"#\">" . i('Manage') . "<b class=\"caret\"></b></a>\n"; + $rt .= " <ul class=\"dropdown-menu\">\n"; + foreach($menu as $page => $item) { + if(in_array($page, array('dashboard', 'statistics', 'reservations', 'home', 'authentication', 'codeDocumentation'))) + continue; + $selected = ''; + if($item['selected']) + $selected = ' class="active"'; + $rt .= " <li$selected><a href=\"{$item['url']}\">{$item['title']}</a></li>\n"; + } + $rt .= " </ul>\n"; + $rt .= " </li>\n"; + $rt .= " <li><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" data-target=\"#\">" . i('Reporting') . "<b class=\"caret\"></b></a>\n"; + $rt .= " <ul class=\"dropdown-menu\">\n"; + $selected = ''; + if($menu['dashboard']['selected']) + $selected = ' class="active"'; + $rt .= " <li$selected><a href=\"{$menu['dashboard']['url']}\">{$menu['dashboard']['title']}</a></li>\n"; + $selected = ''; + if($menu['statistics']['selected']) + $selected = ' class="active"'; + $rt .= " <li$selected><a href=\"{$menu['statistics']['url']}\">{$menu['statistics']['title']}</a></li>\n"; + $rt .= " </ul>\n"; + $rt .= " </li>\n"; + $rt .= " <li><a href=\"{$menu['codeDocumentation']['url']}\">{$menu['codeDocumentation']['title']}</a></li>\n"; + } + # example help menu + /*$rt .= " <li><a href=\"#\" data-toggle=\"dropdown\">" . i(Help & Documentation) . "<b class=\"caret\"></b></a>\n"; + $rt .= "<ul class=\"dropdown-menu\">\n"; + $rt .= " <li><a href=\"https://example.edu/\">" . i('Help Item 1') . "</a></li>\n"; + $rt .= " <li><a href=\"https://example.edu\">" . i('Help Item 2') . "</a></li>\n"; + $rt .= "</ul>\n"; + $rt .= "</li>\n";*/ + + if($mode != 'inmaintenance') { + $rt .= " <li id=\"mobilelanguagemenu\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" data-target=\"#\">" . i('Language') . "<b class=\"caret\"></b></a>\n"; + $rt .= " <ul class=\"dropdown-menu\">\n"; + $menu = getSelectLanguagePulldown(); + $menu = str_replace("\n", '', $menu); + $tmp = preg_match_all('|(<option[^>]+>[^<]+</option>)|', $menu, $matches); + foreach($matches[0] as $item) { + preg_match('|<option value="([^"]+)"( selected)?>([^<]+)</option>|', $item, $parts); + if($parts[2] == ' selected') + $rt .= " <li class=\"active\"><a href=\"" . BASEURL . SCRIPT . "?continuation={$parts[1]}\">{$parts[3]}</a></li>\n"; + else + $rt .= " <li><a href=\"" . BASEURL . SCRIPT . "?continuation={$parts[1]}\">{$parts[3]}</a></li>\n"; + } + $rt .= " </ul>\n"; + } + + if(! $authed && $mode != 'selectauth' && $mode != 'submitLogin') + $rt .= " <li><a href=\"" . BASEURL . SCRIPT . "?mode=selectauth\">" . i('Log in') . "</a></li>\n"; + elseif($authed) + $rt .= " <li id=\"logoutlink2\"><a href=\"" . BASEURL . SCRIPT . "?mode=logout\">" . i('Log out') . "</a></li>\n"; + $rt .= " </ul>\n"; + $rt .= " </div><!-- /.navbar-collapse -->\n"; + $rt .= " </div><!-- .container -->\n"; + $rt .= " </nav><!-- #site-navigation -->\n"; + $rt .= " </div><!-- .container-fluid -->\n"; + $rt .= " </header><!-- #siteheader -->\n"; + $rt .= " <main id=\"main\" role=\"main\">\n"; + $rt .= "<div id=\"content\">\n"; + return $rt; +} + +//////////////////////////////////////////////////////////////////////////////// +/// +/// \fn sortMenuList($menu) +/// +/// \param $a - first item +/// \param $b - second item +/// +/// \return -1 if $a['title'] < $b['title'], 0 if $a['title'] == $b['title'], +/// 1 if $a['title'] > $b['title'] +/// +/// \brief +/// +//////////////////////////////////////////////////////////////////////////////// +function sortMenuList($a, $b) { + return strcmp($a['title'], $b['title']); +} + +//////////////////////////////////////////////////////////////////////////////// +/// +/// \fn getFooter() +/// +/// \return string of html to go after the main content +/// +/// \brief builds the html that goes after the main content +/// +//////////////////////////////////////////////////////////////////////////////// +function getFooter() { + global $totalQueries, $queryTimes, $debug, $totalQueryTime, $startload, $mode; + + $rt = ""; + $rt .= "</div><!-- #content -->\n"; + $rt .= " </main><!-- #main -->\n"; + $rt .= " <div class=\"container-fluid\">\n"; + $rt .= " <footer role=\"contentinfo\">\n"; + $rt .= " <div class=\"row\">\n"; + $rt .= " <div class=\"site-info\">\n"; + $rt .= " Copyright © " . date('Y') . " · "; + $rt .= "<img src=\"themes/dropdownmenus/images/feather_tiny.png\">"; + $rt .= "<a href=\"http://vcl.apache.org\">Apache Software Foundation</a>"; + # footer links + #$rt .= " · <a href=\"http://example.edu/\">Some link</a>\n"; + $rt .= " </div><!-- .site-info -->\n"; + $rt .= " </div><!-- .row -->\n"; + $rt .= " </footer>\n"; + $rt .= " </div><!-- .container-fluid -->\n"; + # below footer - useful for entity name and address, etc + #$rt .= " <div class=\"sub-footer\">\n"; + #$rt .= " <div class=\"container\">\n"; + #$rt .= " <h4><a href=\"http://www.example.edu/\"><strong>My University</strong></a></h4>\n"; + #$rt .= " <address>\n"; + #$rt .= " <span><strong>Title</strong></span>\n"; + #$rt .= " <span>Address</span>\n"; + #$rt .= " <span>Phone#</span>\n"; + #$rt .= " </address>\n"; + #$rt .= " </div><!-- .container -->\n"; + #$rt .= " </div><!-- .sub-footer -->\n"; + $rt .= "</div><!-- #wrapperdiv -->\n"; + $rt .= "<script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script>\n"; + $rt .= "</body>\n"; + $rt .= "</html>\n"; + return $rt; +} +?>
