Răsfoiți Sursa

Improve styling of customer page

Alan Lam 3 ani în urmă
părinte
comite
e179cb4290
1 a modificat fișierele cu 70 adăugiri și 63 ștergeri
  1. 70 63
      views/customer.php

+ 70 - 63
views/customer.php

@@ -12,9 +12,9 @@ $locations = $customer->getLocations();
 
 ?>
 
-<div class="row mb-3">
+<div class="row mb-3 align-items-center">
 	<div class="col">
-		<h3><?=htmlspecialchars($customer->name)?></h3>
+		<h3 class="mb-0"><?=htmlspecialchars($customer->name)?></h3>
 	</div>
 	<div class="col-auto">
 		<a class="btn btn-primary" href="<?=htmlspecialchars($customer->getUrl())?>/update">
@@ -24,9 +24,9 @@ $locations = $customer->getLocations();
 	</div>
 </div>
 
-<div class="row mb-3">
+<div class="row mb-3 align-items-center">
 	<div class="col">
-		<h4><?=htmlspecialchars(__("Locations"))?></h4>
+		<h4 class="mb-0"><?=htmlspecialchars(__("Locations"))?></h4>
 	</div>
 	<div class="col-auto">
 		<a class="btn btn-success" href="/locations/add?customer_id=<?=$customer->id?>">
@@ -36,72 +36,79 @@ $locations = $customer->getLocations();
 	</div>
 </div>
 
-<?php
-if(empty($locations)) {
-	?>
-	<div class="alert alert-info mb-3">
-		<i class="fa fa-fw fa-info-circle"></i>
-		<?=htmlspecialchars(__("No locations to display."))?>
-	</div>
+<section class="mb-4">
 	<?php
-}
-else {
-	?>
-	<div class="mb-3" id="map" style="height: 480px;" data-customer-id="<?=$customer->id?>">
+	if(empty($locations)) {
+		?>
+		<div class="alert alert-info mb-3">
+			<i class="fa fa-fw fa-info-circle"></i>
+			<?=htmlspecialchars(__("No locations to display."))?>
+		</div>
+		<?php
+	}
+	else {
+		?>
+		<div class="mb-3 rounded" id="map" style="height: 480px;" data-customer-id="<?=$customer->id?>">
 
-	</div>
-	<?php
-	View::include("locations_table", compact("locations"));
-}
-?>
+		</div>
+		<?php
+		View::include("locations_table", compact("locations"));
+	}
+	?>
+</section>
 
-<div class="row mb-3">
-	<div class="col">
-		<h4><?=htmlspecialchars(__("Leads"))?></h4>
+<section class="mb-4">
+	<div class="row mb-3 align-items-center">
+		<div class="col">
+			<h4 class="mb-0"><?=htmlspecialchars(__("Leads"))?></h4>
+		</div>
+		<div class="col-auto">
+			<button class="btn btn-success" type="button" data-bs-toggle="modal" data-bs-target="#new-sale-modal">
+				<i class="fa fa-fw fa-plus"></i>
+				<?=htmlspecialchars(__("Add Lead"))?>
+			</button>
+		</div>
 	</div>
-	<div class="col-auto">
-		<button class="btn btn-success" type="button" data-bs-toggle="modal" data-bs-target="#new-sale-modal">
-			<i class="fa fa-fw fa-plus"></i>
-			<?=htmlspecialchars(__("Add Lead"))?>
-		</button>
-	</div>
-</div>
 
-<?php
-if(empty($sales)) {
-	?>
-	<div class="alert alert-info mb-3">
-		<i class="fa fa-fw fa-info-circle"></i>
-		<?=htmlspecialchars(__("No leads to display."))?>
-	</div>
 	<?php
-}
-else {
-	View::include("sales_table", compact("sales"));
-}
-?>
+	if(empty($sales)) {
+		?>
+		<div class="alert alert-info mb-3">
+			<i class="fa fa-fw fa-info-circle"></i>
+			<?=htmlspecialchars(__("No leads to display."))?>
+		</div>
+		<?php
+	}
+	else {
+		View::include("sales_table", compact("sales"));
+	}
+	?>
+</section>
 
-<div class="row mb-3">
-	<div class="col">
-		<h4><?=htmlspecialchars(__("Tickets"))?></h4>
+<section class="mb-4">
+	<div class="row mb-3 align-items-center">
+		<div class="col">
+			<h4 class="mb-0"><?=htmlspecialchars(__("Tickets"))?></h4>
+		</div>
+		<div class="col-auto">
+			<button class="btn btn-success" type="button" data-bs-toggle="modal" data-bs-target="#ticket-modal">
+				<i class="fa fa-fw fa-plus"></i>
+				<?=htmlspecialchars(__("Add Ticket"))?>
+			</button>
+		</div>
 	</div>
-	<div class="col-auto">
-		<button class="btn btn-success" type="button" data-bs-toggle="modal" data-bs-target="#ticket-modal">
-			<i class="fa fa-fw fa-plus"></i>
-			<?=htmlspecialchars(__("Add Ticket"))?>
-		</button>
-	</div>
-</div>
 
-<?php
-if(empty($tickets)) {
-	?>
-	<div class="alert alert-info mb-3">
-		<i class="fa fa-fw fa-info-circle"></i>
-		<?=htmlspecialchars(__("No tickets to display."))?>
-	</div>
 	<?php
-}
-else {
-	View::include("tickets_table", compact("tickets"));
-}
+	if(empty($tickets)) {
+		?>
+		<div class="alert alert-info mb-3">
+			<i class="fa fa-fw fa-info-circle"></i>
+			<?=htmlspecialchars(__("No tickets to display."))?>
+		</div>
+		<?php
+	}
+	else {
+		View::include("tickets_table", compact("tickets"));
+	}
+	?>
+</section>