Skip to content

Commit 5a5b211

Browse files
committed
Next pass at bootstrap conversion
1 parent c4eb190 commit 5a5b211

File tree

2 files changed

+32
-43
lines changed

2 files changed

+32
-43
lines changed

src/templates/Server/View.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ else
1919
$server_name = filter_var($server->getName(), FILTER_SANITIZE_FULL_SPECIAL_CHARS);
2020

2121
$title = $server_name;
22-
$description = sprintf('Server Status for %s', $server_name);
22+
$description = sprintf('The server details and status for %s', $server_name);
2323
$url = $server->getURI();
2424
$url_json = sprintf('%s.json', $url);
2525
$url_txt = sprintf('%s.txt', $url);

src/templates/User/Logout.phtml

+31-42
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,34 @@
1-
<?php
2-
1+
<?php /* vim: set colorcolumn= expandtab shiftwidth=2 softtabstop=2 tabstop=4 smarttab: */
32
namespace BNETDocs\Templates\User;
4-
53
use \CarlBennett\MVC\Libraries\Pair;
6-
7-
$title = "Logout";
8-
$description = "Log out of the BNETDocs website";
9-
$this->opengraph->attach(new Pair("url", "/user/logout"));
10-
11-
switch ($this->getContext()->error) {
12-
case "NOT_LOGGED_IN":
13-
$message = "You were not logged in to begin with.";
14-
break;
15-
default:
16-
$message = $this->getContext()->error;
4+
$title = 'Logout';
5+
$description = 'Log out of the BNETDocs website';
6+
$this->opengraph->attach(new Pair('url', '/user/logout'));
7+
$error = $this->getContext()->error;
8+
switch ($error)
9+
{
10+
case 'NOT_LOGGED_IN': $message = 'You were not logged in to begin with.'; break;
11+
default: $message = $error;
1712
}
18-
19-
require("./header.inc.phtml");
20-
?>
21-
<article>
22-
<?php if (is_null($this->getContext()->error)) { ?>
23-
<header>Account Logout</header>
24-
<form method="POST" action="?">
25-
<section>
26-
<p>If you are sure you wish to log out, press the button below.</p>
27-
<p><input type="submit" value="Log Out"/></p>
28-
</section>
29-
</form>
30-
<?php } else if ($this->getContext()->error === false) { ?>
31-
<header class="green">Logged Out</header>
32-
<section class="green">
33-
<p>You have been successfully logged out!</p>
34-
<p>Use the navigation to the left to move to another page.</p>
35-
</section>
36-
<?php } else { ?>
37-
<header class="red">Log out failure</header>
38-
<section class="red">
39-
<p>An error occurred while attempting to log out.</p>
40-
<p><?php echo $message; ?></p>
41-
<p>Use the navigation to the left to move to another page.</p>
42-
</section>
43-
<?php } ?>
44-
</article>
45-
<?php require("./footer.inc.phtml"); ?>
13+
require('./header.inc.phtml'); ?>
14+
<div class="container">
15+
<? if (is_null($error)) { ?>
16+
<h1 class="text-danger"><?=$title?></h1>
17+
<p class="text-danger">If you are sure you wish to log out, press the button below.</p>
18+
<form method="POST" action="?">
19+
<input class="btn btn-danger" type="submit" value="Log Out"/>
20+
</form>
21+
<? } else if ($this->getContext()->error === false) { ?>
22+
<h1 class="text-success">Logged Out</h1>
23+
<div class="alert alert-success">
24+
<p class="mb-0">You have been successfully logged out!</p>
25+
</div>
26+
<? } else { ?>
27+
<h1 class="text-danger">Log out failure</h1>
28+
<div class="alert alert-danger">
29+
<p>An error occurred while attempting to log out.</p>
30+
<p class="mb-0"><?=$message?></p>
31+
</secton>
32+
<? } ?>
33+
</div>
34+
<? require('./footer.inc.phtml'); ?>

0 commit comments

Comments
 (0)