All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 736fed17 authored by Leigh B Stoller's avatar Leigh B Stoller

Change Docs button to a dropdown menu on the Portals that have wikis

defined in portal_defs/portal_maintsite. This closes issue #449.
parent cc3ffb0b
<?php <?php
# #
# Copyright (c) 2006-2017 University of Utah and the Flux Group. # Copyright (c) 2006-2018 University of Utah and the Flux Group.
# #
# {{{EMULAB-LICENSE # {{{EMULAB-LICENSE
# #
...@@ -50,6 +50,7 @@ $WITHPUBLISHING = 0; ...@@ -50,6 +50,7 @@ $WITHPUBLISHING = 0;
# Other Portal globals. # Other Portal globals.
# #
$PORTAL_MANUAL = "http://docs.emulab.net"; $PORTAL_MANUAL = "http://docs.emulab.net";
$PORTAL_WIKI = "https://gitlab.flux.utah.edu/emulab/emulab-devel/wikis/home";
$PORTAL_HELPFORUM = "emulab-users"; $PORTAL_HELPFORUM = "emulab-users";
$PORTAL_PASSWORD_HELP = "Emulab Username or Email"; $PORTAL_PASSWORD_HELP = "Emulab Username or Email";
$PORTAL_NSFNUMBER = "1513121"; $PORTAL_NSFNUMBER = "1513121";
......
...@@ -54,6 +54,7 @@ if ($_SERVER["SERVER_NAME"] == "www.aptlab.net") { ...@@ -54,6 +54,7 @@ if ($_SERVER["SERVER_NAME"] == "www.aptlab.net") {
$APTBASE .= "/" . $matches[1]; $APTBASE .= "/" . $matches[1];
} }
$PORTAL_MANUAL = "http://docs.aptlab.net"; $PORTAL_MANUAL = "http://docs.aptlab.net";
$PORTAL_WIKI = null;
$PORTAL_HELPFORUM = "apt-users"; $PORTAL_HELPFORUM = "apt-users";
$PORTAL_PASSWORD_HELP = "Aptlab.net or Emulab.net Username"; $PORTAL_PASSWORD_HELP = "Aptlab.net or Emulab.net Username";
$PORTAL_NSFNUMBER = "1338155"; $PORTAL_NSFNUMBER = "1338155";
...@@ -86,6 +87,7 @@ elseif ($_SERVER["SERVER_NAME"] == "www.cloudlab.us") { ...@@ -86,6 +87,7 @@ elseif ($_SERVER["SERVER_NAME"] == "www.cloudlab.us") {
$APTBASE .= "/" . $matches[1]; $APTBASE .= "/" . $matches[1];
} }
$PORTAL_MANUAL = "http://docs.cloudlab.us"; $PORTAL_MANUAL = "http://docs.cloudlab.us";
$PORTAL_WIKI = null;
$PORTAL_HELPFORUM = "cloudlab-users"; $PORTAL_HELPFORUM = "cloudlab-users";
$PORTAL_PASSWORD_HELP= "CloudLab.us or Emulab.net Username"; $PORTAL_PASSWORD_HELP= "CloudLab.us or Emulab.net Username";
$PORTAL_NSFNUMBER = "1419199"; $PORTAL_NSFNUMBER = "1419199";
...@@ -117,6 +119,7 @@ elseif ($ISALTDOMAIN && $_SERVER["SERVER_NAME"] == "www.phantomnet.org") { ...@@ -117,6 +119,7 @@ elseif ($ISALTDOMAIN && $_SERVER["SERVER_NAME"] == "www.phantomnet.org") {
$APTBASE .= "/" . $matches[1]; $APTBASE .= "/" . $matches[1];
} }
$PORTAL_MANUAL = "http://docs.phantomnet.org"; $PORTAL_MANUAL = "http://docs.phantomnet.org";
$PORTAL_WIKI = "https://wiki.phantomnet.org/wiki/phantomnet";
$PORTAL_HELPFORUM = "phantomnet-users"; $PORTAL_HELPFORUM = "phantomnet-users";
$PORTAL_PASSWORD_HELP = "PhantomNet.org or Emulab.net Username"; $PORTAL_PASSWORD_HELP = "PhantomNet.org or Emulab.net Username";
$PORTAL_NSFNUMBER = "1305384"; $PORTAL_NSFNUMBER = "1305384";
...@@ -149,6 +152,7 @@ elseif ($_SERVER["SERVER_NAME"] == "www.powderwireless.net") { ...@@ -149,6 +152,7 @@ elseif ($_SERVER["SERVER_NAME"] == "www.powderwireless.net") {
$APTBASE .= "/" . $matches[1]; $APTBASE .= "/" . $matches[1];
} }
$PORTAL_MANUAL = "http://docs.powderwireless.net"; $PORTAL_MANUAL = "http://docs.powderwireless.net";
$PORTAL_WIKI = null;
$PORTAL_HELPFORUM = "powder-users"; $PORTAL_HELPFORUM = "powder-users";
$PORTAL_PASSWORD_HELP = "powderwireless.net or emulab.net Username"; $PORTAL_PASSWORD_HELP = "powderwireless.net or emulab.net Username";
$PORTAL_NSFNUMBER = false; $PORTAL_NSFNUMBER = false;
......
...@@ -389,6 +389,7 @@ function SPITNAV($hiddenxs, $navbar_status, $navbar_right, $login_uid) ...@@ -389,6 +389,7 @@ function SPITNAV($hiddenxs, $navbar_status, $navbar_right, $login_uid)
{ {
global $PORTAL_MANUAL, $APTLOGO, $login_status, $login_user, $TBMAINSITE; global $PORTAL_MANUAL, $APTLOGO, $login_status, $login_user, $TBMAINSITE;
global $THISHOMEBASE, $ISEMULAB, $ISPNET, $ISPOWDER, $TBBASE; global $THISHOMEBASE, $ISEMULAB, $ISPNET, $ISPOWDER, $TBBASE;
global $PORTAL_WIKI;
$hiddenxs = ""; $hiddenxs = "";
echo " echo "
...@@ -511,11 +512,26 @@ if (!$login_user->portal()) { ...@@ -511,11 +512,26 @@ if (!$login_user->portal()) {
echo "</ul>"; echo "</ul>";
echo " <ul class='nav navbar-nav navbar-right apt-right'> echo " <ul class='nav navbar-nav navbar-right apt-right'>
$navbar_status $navbar_status
$navbar_right $navbar_right\n";
<li class='apt-left'>
<a class='btn btn-quickvm-home navbar-btn' href='$PORTAL_MANUAL' target='_blank'>Docs</a> if ($PORTAL_WIKI) {
</li> echo "<li id='quickvm_actions_menu'
"; class='dropdown apt-left apt-nav-item'>
<a href='#'
class='dropdown-toggle btn btn-quickvm-home navbar-btn'
data-toggle='dropdown'>Docs <b class='caret'></b></a>
<ul class='dropdown-menu'>
<li><a href='$PORTAL_MANUAL' target='_blank'>Manual</a></li>
<li><a href='$PORTAL_WIKI' target='_blank'>Wiki</a></li>
</ul>
</li>\n";
}
else {
echo "<li class='apt-left'>
<a class='btn btn-quickvm-home navbar-btn'
href='$PORTAL_MANUAL' target='_blank'>Docs</a>
</li>\n";
}
if ($login_user) { if ($login_user) {
echo " echo "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment