Alan Lam 8 лет назад
Родитель
Сommit
526b2a2f62
2 измененных файлов с 36 добавлено и 34 удалено
  1. 13 13
      controllers/account.php
  2. 23 21
      views/account.php

+ 13 - 13
controllers/account.php

@@ -4,38 +4,38 @@ $page_title = "Account";
 
 Core::addBreadcrumb("/account", $page_title);
 
-$buttons = [];
+$links = [];
 
 if(Core::$user->level >= User::LEVEL_ADMIN) {
-	$buttons["/account/customers"] = "Customers";
-	$buttons["/account/users"] = (Core::$user->level == User::LEVEL_SUPERADMIN ? "Users" : "Testers");
+	$links["/account/customers"] = "Customers";
+	$links["/account/users"] = (Core::$user->level == User::LEVEL_SUPERADMIN ? "Users" : "Testers");
 }
 
 if(Core::$user->level >= User::LEVEL_CUSTOMER) {
-	$buttons["/account/projects"] = "Projects";
-	$buttons["/account/locations"] = "Locations";
-	$buttons["/account/templates"] = "Templates";
+	$links["/account/projects"] = "Projects";
+	$links["/account/locations"] = "Locations";
+	$links["/account/templates"] = "Templates";
 }
 
 if(Core::$user->level >= User::LEVEL_TESTER) {
-	$buttons["/account/tests"] = "Tests";
+	$links["/account/tests"] = "Tests";
 }
 
 if(Core::$user->level == User::LEVEL_TESTER) {
-	$buttons["/account/addresses"] = "Addresses";
-	$buttons["/account/tests-completed"] = "Tests (Completed)";
+	$links["/account/addresses"] = "Addresses";
+	$links["/account/tests-completed"] = "Tests (Completed)";
 }
 
 if(Core::$user->level == User::LEVEL_REGISTERED) {
-	$buttons["/account/submit-id"] = "Submit ID";
+	$links["/account/submit-id"] = "Submit ID";
 }
 
-$buttons["/account/settings"] = "Settings";
+$links["/account/settings"] = "Settings";
 
-asort($buttons);
+asort($links);
 
 View::includeOnce("header", compact("page_title"));
-View::include("account", compact("buttons"));
+View::include("account", compact("links"));
 View::includeOnce("footer");
 
 ?>

+ 23 - 21
views/account.php

@@ -28,29 +28,31 @@
 	}
 	?>
 
-	<h3>Select Page</h3>
-
 	<div class="row">
-	<?php
-	foreach($buttons as $path => $text) {
-		?>
-		<div class="col-sm-6 col-md-4 col-lg-3 mb-3">
-			<a class="btn btn-block btn-outline-primary btn-lg" href="<?=htmlspecialchars($path)?>"><?=htmlspecialchars($text)?></a>
+		<div class="col-lg-4">
+			<h3>Main Menu</h3>
+			<div class="list-group">
+			<?php
+			foreach($links as $path => $text) {
+				?>
+				<a class="list-group-item list-group-item-action" href="<?=htmlspecialchars($path)?>">
+					<?=htmlspecialchars($text)?>
+				</a>
+				<?php
+			}
+			?>
+			</div>
+		</div>
+		<div class="col-lg">
+			<h3>Useful Documents</h3>
+
+			<ul>
+				<li><a href="/files/id_response.pdf">ID Response for Testers</a></li>
+				<li><a href="/files/testing_methodology.pdf">Age Verification Testing Methodology</a></li>
+				<li><a href="/files/machine_categories.pdf">Machine Categories</a></li>
+				<li><a href="/files/testing_procedure.pdf">Testing Procedure</a></li>
+			</ul>
 		</div>
-		<?php
-	}
-	?>
 	</div>
 
-	<hr />
-
-	<h3>Useful Documents</h3>
-
-	<ul>
-		<li><a href="/files/id_response.pdf">ID Response for Testers</a></li>
-		<li><a href="/files/testing_methodology.pdf">Age Verification Testing Methodology</a></li>
-		<li><a href="/files/machine_categories.pdf">Machine Categories</a></li>
-		<li><a href="/files/testing_procedure.pdf">Testing Procedure</a></li>
-	</ul>
-
 </div>