Explorar o código

Hide To-Do header if no alerts need to be shown.

Alan Lam %!s(int64=8) %!d(string=hai) anos
pai
achega
50b0b28db7
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      views/account.php

+ 3 - 3
views/account.php

@@ -46,7 +46,9 @@
 		<div class="col-lg mb-3 mb-lg-0">
 
 			<?php
-			if(Core::$user->level >= User::LEVEL_ADMIN) {
+			$has_to_do = !empty($users_pending_verification) || !empty($tests_pending_verification);
+
+			if($has_to_do && Core::$user->level >= User::LEVEL_ADMIN) {
 				?>
 				<h3>To-Do</h3>
 
@@ -73,8 +75,6 @@
 					</div>
 					<?php
 				}
-				?>
-				<?php
 			}
 			?>