From 28be8422aeaae1422879a9737e3f9e9b8e72135a Mon Sep 17 00:00:00 2001 From: peterdd Date: Fri, 29 Oct 2021 23:41:34 +0200 Subject: [PATCH] reduce cognitive noise in search result table * There is no need for the edit bug link if it is a anon user. (A later iteration might address the redundant view bug tabs too and unite these views.) * UTC in every result line is not necessary as there is only one offset in database (in fact the datetime field has no offset stored), showing it is always UTC can move to column header. The time itself is probably also not important for this column but lets do it slowly. * Showing just an empty cell in the 'Last Modified' column is much less burden to visual scan the result table than the string 'Not modified'. --- www/search.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/search.php b/www/search.php index 38ad03b7..c1e78bc7 100644 --- a/www/search.php +++ b/www/search.php @@ -156,14 +156,17 @@ // Bug ID echo ' ', $row['id'], ''; - echo '
(edit)', "\n"; + if (is_string($logged_in) && $logged_in === 'developer') { + echo '
(edit)'; + } + echo ''."\n"; // Date - echo ' ', format_date(strtotime($row['ts1'])), "\n"; + echo ' ', format_date(strtotime($row['ts1'], 'Y-m-d H:i')), "\n"; // Last Modified $ts2 = strtotime($row['ts2']); - echo ' ' , ($ts2 ? format_date($ts2) : 'Not modified') , "\n"; + echo ' ' , ($ts2 ? format_date($ts2, 'Y-m-d H:i') : '') , "\n"; // Package if ($package_count !== 1) {