Add ps-3 to table columns that don't have a checkbox and made sure all table listings conform

This commit is contained in:
johnnyq
2026-08-29 19:45:28 -04:00
parent 20b406c5b0
commit d98b8bc427
34 changed files with 840 additions and 764 deletions

View File

@@ -40,7 +40,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=account_name&order=<?= $disp ?>">
Name <?php if ($sort == 'account_name') { echo $order_icon; } ?>
</a>
@@ -80,7 +80,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#"
data-modal-url="modals/account/account_edit.php?id=<?= $account_id ?>">
<?= $account_name ?>

View File

@@ -33,8 +33,8 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<div class="card card-dark">
<div class="card-header py-2">
<div class="card">
<div class="card-header bg-dark py-2">
<h3 class="card-title mt-2">
<i class="fas fa-fw fa-bell me-2"></i><?php if($dismissed_filter) { echo "Dismissed "; } ?>Notifications
</h3>
@@ -46,12 +46,13 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<?php } ?>
</div>
</div>
<div class="card-body">
<form class="mb-4" autocomplete="off">
<div class="card-header py-3">
<form autocomplete="off">
<?php if ($dismissed_filter) { ?>
<input type="hidden" name="dismissed" value="">
<?php } ?>
<div class="row">
<div class="row g-2 align-items-end">
<div class="col-sm-4">
<div class="input-group">
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search <?php if($dismissed_filter) { echo "Dismissed "; } ?>Notifications">
@@ -81,76 +82,77 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
</div>
</div>
</form>
<div class="table-responsive-sm">
<table class="table table-hover mb-0">
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_timestamp&order=<?= $disp ?>">
Timestamp <?php if ($sort == 'notification_timestamp') { echo $order_icon; } ?>
</a>
</th>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_type&order=<?= $disp ?>">
Type <?php if ($sort == 'notification_type') { echo $order_icon; } ?>
</a>
</th>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification&order=<?= $disp ?>">
Notification <?php if ($sort == 'notification') { echo $order_icon; } ?>
</a>
</th>
<?php if($dismissed_filter) { ?>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_dismissed_at&order=<?= $disp ?>">
Dismissed At <?php if ($sort == 'notification_dismissed_at') { echo $order_icon; } ?>
</a>
</th>
<?php } ?>
<?php if(!$dismissed_filter) { ?>
<th class="text-center p-0">
<?php if (mysqli_num_rows($sql) > 0) { ?>
<a href="post.php?dismiss_all_notifications&csrf_token=<?= $_SESSION["csrf_token"] ?>"
class="btn btn-sm btn-dark mb-2" title="Dismiss All">
<i class="fas fa-fw fa-check-double"></i>
</a>
<?php } ?>
</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_assoc($sql)) {
$notification_id = intval($row['notification_id']);
$notification_timestamp = escapeHtml($row['notification_timestamp']);
$notification_type = escapeHtml($row['notification_type']);
$notification = escapeHtml($row['notification']);
$notification_dismissed_at = escapeHtml($row['notification_dismissed_at']);
$client_name = escapeHtml($row['client_name']);
$client_id = intval($row['client_id']);
?>
<tr>
<td class="font-monospace"><?= $notification_timestamp ?></td>
<td><?= $notification_type ?></td>
<td><?= $notification ?></td>
<?php if($dismissed_filter) { ?>
<td class="font-monospace"><?= $notification_dismissed_at ?></td>
<?php } ?>
<?php if(!$dismissed_filter) { ?>
<td class="text-center"><a class="btn btn-secondary btn-sm" href="post.php?dismiss_notification=<?= $notification_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" title="Dismiss"><i class="fas fa-check"></i></a></td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php require_once "../includes/filter_footer.php"; ?>
</div>
<div class="table-responsive-sm">
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_timestamp&order=<?= $disp ?>">
Timestamp <?php if ($sort == 'notification_timestamp') { echo $order_icon; } ?>
</a>
</th>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_type&order=<?= $disp ?>">
Type <?php if ($sort == 'notification_type') { echo $order_icon; } ?>
</a>
</th>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification&order=<?= $disp ?>">
Notification <?php if ($sort == 'notification') { echo $order_icon; } ?>
</a>
</th>
<?php if($dismissed_filter) { ?>
<th>
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=notification_dismissed_at&order=<?= $disp ?>">
Dismissed At <?php if ($sort == 'notification_dismissed_at') { echo $order_icon; } ?>
</a>
</th>
<?php } ?>
<?php if(!$dismissed_filter) { ?>
<th class="text-center p-0">
<?php if (mysqli_num_rows($sql) > 0) { ?>
<a href="post.php?dismiss_all_notifications&csrf_token=<?= $_SESSION["csrf_token"] ?>"
class="btn btn-sm btn-dark mb-2" title="Dismiss All">
<i class="fas fa-fw fa-check-double"></i>
</a>
<?php } ?>
</th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_assoc($sql)) {
$notification_id = intval($row['notification_id']);
$notification_timestamp = escapeHtml($row['notification_timestamp']);
$notification_type = escapeHtml($row['notification_type']);
$notification = escapeHtml($row['notification']);
$notification_dismissed_at = escapeHtml($row['notification_dismissed_at']);
$client_name = escapeHtml($row['client_name']);
$client_id = intval($row['client_id']);
?>
<tr>
<td class="font-monospace ps-3"><?= $notification_timestamp ?></td>
<td><?= $notification_type ?></td>
<td><?= $notification ?></td>
<?php if($dismissed_filter) { ?>
<td class="font-monospace"><?= $notification_dismissed_at ?></td>
<?php } ?>
<?php if(!$dismissed_filter) { ?>
<td class="text-center"><a class="btn btn-secondary btn-sm" href="post.php?dismiss_notification=<?= $notification_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>" title="Dismiss"><i class="fas fa-check"></i></a></td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<?php require_once "../includes/filter_footer.php"; ?>
</div>
<?php

View File

@@ -110,7 +110,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-hover table-borderless mb-0">
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=project_number&order=<?= $disp ?>">
Number <?php if ($sort == 'project_number') { echo $order_icon; } ?>
</a>
@@ -215,7 +215,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td>
<td class="ps-3">
<a class="text-dark" href="project.php?<?= $client_url ?>project_id=<?= $project_id ?>">
<?= "$project_prefix$project_number" ?>
</a>

View File

@@ -95,7 +95,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=quote_number&order=<?= $disp ?>">
Number <?php if ($sort == 'quote_number') { echo $order_icon; } ?>
</a>
@@ -187,7 +187,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td class="text-bold">
<td class="text-bold ps-3">
<a href="quote.php?client_id=<?= $client_id ?>&quote_id=<?= $quote_id ?>">
<?= "$quote_prefix$quote_number" ?>
</a>

View File

@@ -72,7 +72,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=recurring_expense_next_date&order=<?= $disp ?>">
Next Date <?php if ($sort == 'recurring_expense_next_date') { echo $order_icon; } ?>
</a>
@@ -164,7 +164,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#"
data-modal-size = "lg"
data-modal-url = "modals/recurring_expense/recurring_expense_edit.php?id=<?= $recurring_expense_id ?>">

View File

@@ -115,7 +115,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=recurring_invoice_number&order=<?= $disp ?>">
Number <?php if ($sort == 'recurring_invoice_number') { echo $order_icon; } ?>
</a>
@@ -208,7 +208,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td class="text-bold">
<td class="text-bold ps-3">
<a href="recurring_invoice.php?client_id=<?= $client_id ?>&recurring_invoice_id=<?= $recurring_invoice_id ?>">
<?= "$recurring_invoice_prefix$recurring_invoice_number" ?>
</a>

View File

@@ -114,7 +114,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="<?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=service_name&order=<?= $disp ?>">
Name <?php if ($sort == 'service_name') { echo $order_icon; } ?>
</a>
@@ -165,7 +165,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<tr>
<!-- Name/Category/Updated/Importance from DB -->
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#"
data-modal-size="xl"
data-modal-url="modals/service/service.php?id=<?= $service_id ?>">

View File

@@ -182,7 +182,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th>
<th class="ps-3">
<a class="text-secondary" href="?<?= $url_query_strings_sort ?>&sort=software_name&order=<?= $disp ?>">
Software <?php if ($sort == 'software_name') { echo $order_icon; } ?>
</a>
@@ -296,7 +296,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr class="<?= $tr_class ?>">
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#" data-modal-url="modals/software/software_edit.php?id=<?= $software_id ?>">
<div class="d-flex">
<i class="fa fa-fw fa-2x fa-cube me-3"></i>

View File

@@ -415,7 +415,7 @@ if ($account_filter) {
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=transaction_date&order=<?= $disp ?>">
Date <?php if ($sort == 'transaction_date') { echo $order_icon; } ?>
</a>
@@ -506,7 +506,7 @@ if ($account_filter) {
?>
<tr>
<td>
<td class="ps-3">
<?php if ($transaction_type == 'Payment') { ?>
<a class="text-bold" href="invoice.php?invoice_id=<?= $transaction_invoice_id ?>">
<?= $transaction_date ?>

View File

@@ -122,7 +122,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=transfer_date&order=<?= $disp ?>">
Date <?php if ($sort == 'transfer_date') { echo $order_icon; } ?>
</a>
@@ -202,7 +202,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#"
data-modal-url = "modals/transfer/transfer_edit.php?id=<?= $transfer_id ?>">
<?= $transfer_date ?>

View File

@@ -89,7 +89,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<table class="table table-striped table-borderless table-hover mb-0">
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?>">
<tr>
<th>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=trip_date&order=<?= $disp ?>">
Date <?php if ($sort == 'trip_date') { echo $order_icon; } ?>
</a>
@@ -164,7 +164,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
?>
<tr>
<td>
<td class="ps-3">
<a class="text-dark ajax-modal" href="#"
data-modal-url="modals/trip/trip_edit.php?<?= $client_url ?>&id=<?= $trip_id ?>">
<?= $trip_date ?>