Skip to content

Commit

Permalink
Merge pull request #166 from curtisgibby/patch-1
Browse files Browse the repository at this point in the history
Use pretty server label in HTML page title
  • Loading branch information
pentium10 committed Dec 4, 2019
2 parents d6c2200 + 1a84dd5 commit 8de718a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/tpl/main.php
@@ -1,5 +1,9 @@
<?php
$servers = $console->getServers();
if ($server) {
$serverKey = array_search($server, $servers);
$serverLabel = is_numeric($serverKey) || empty($serverKey) ? $server : $serverKey;
}
?><!DOCTYPE html>
<html>

Expand All @@ -10,7 +14,7 @@

<title>
<?php if ($tube) echo $tube . ' - ' ?>
<?php echo $server ? $server : 'All servers' ?> -
<?php echo $serverLabel ? $serverLabel : 'All servers' ?> -
Beanstalk console
</title>

Expand Down Expand Up @@ -56,10 +60,6 @@
<!-- Server dropdown: current, then All, then remaining -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<?php
$serverKey = array_search($server, $servers);
$serverLabel = is_numeric($serverKey) || empty($serverKey) ? $server : $serverKey;
?>
<?php echo $serverLabel ?> <span class="caret"></span>
</a>
<ul class="dropdown-menu">
Expand Down

0 comments on commit 8de718a

Please sign in to comment.