public inbox for [email protected]
 help / color / mirror / Atom feed
From: Memet Zx <[email protected]>
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: [PATCH 1/2] gwspamd: web: Add direct link for activity log
Date: Thu, 27 Apr 2023 18:30:19 +0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <ZEpTWwWyIbMYVU+/@biznet-home.integral.gnuweeb.org>

Added a direct link from the log section on home to audit_log

Signed-off-by: Memet Zx <[email protected]>
---
 web/views/pages/audit_log.php | 4 ++--
 web/views/pages/home.php      | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/web/views/pages/audit_log.php b/web/views/pages/audit_log.php
index a330d45..b346969 100644
--- a/web/views/pages/audit_log.php
+++ b/web/views/pages/audit_log.php
@@ -42,9 +42,9 @@ $paginator = ob_get_clean();
 	</style>
 	<ol class="activity-feed">
 		<?php foreach ($st->fetchAll() as $row) : ?>
-			<li class="feed-item">
+			<li id="log-<?= e($row["id"]); ?>" class="feed-item">
 				<time class="date" datetime="<?= e($row["created_at"]); ?>"><?= e($row["created_at"]); ?></time>
-				<span class="text"><?= e($row["action"]); ?></span>
+				<span class="text">[<?= e($row["id"]); ?>] <?= e($row["action"]); ?></span>
 				<br>
 				<span class="text">
 					<?= build_extra_data($row["action"], $row["extra"]); ?>
diff --git a/web/views/pages/home.php b/web/views/pages/home.php
index b0d9824..2d0b671 100644
--- a/web/views/pages/home.php
+++ b/web/views/pages/home.php
@@ -129,9 +129,8 @@ ob_start();
                 <table class="table">
                     <?php foreach ($st->fetchAll() as $row) : ?>
                         <tr>
-                            <td><?= e($row["id"]); ?></td>
+                            <td><a href="audit_log.php#log-<?= e($row["id"]); ?>">#<?= e($row["id"]); ?></a></td>
                             <td><?= e($row["action"]); ?></td>
-                            <!-- <td align="left"><?= build_extra_data($row["action"], $row["extra"]); ?></td> -->
                             <td><?= e($row["created_at"]); ?></td>
                         </tr>
                     <?php endforeach; ?>
-- 
2.34.1


  reply	other threads:[~2023-04-27 11:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-27 10:47 [PATCH gwspamd 1/2] gwspamd: web: Add direct link for activity log Memet Zx
2023-04-27 10:47 ` [PATCH gwspamd 2/2] gwspamd: web: Add *.patch and *.diff to .gitignore Memet Zx
2023-04-27 10:50 ` [PATCH gwspamd 1/2] gwspamd: web: Add direct link for activity log Ammar Faizi
2023-04-27 11:30   ` Memet Zx [this message]
2023-04-27 11:33     ` [PATCH " Ammar Faizi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox