commit 8252a821b4c370a79f73ce2994f2ea479512d30f
parent 865acdcfaa3421db3250fa1ba4d8ca38623c4a8e
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 26 Oct 2024 17:47:57 +0200
feat: show similar posts via tags in show mode
Diffstat:
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/config/i18n.php b/config/i18n.php
@@ -13,6 +13,7 @@ if ($lang == "en") {
$GLOBALS["i18n_edit"] = "Edit note";
$GLOBALS["i18n_new"] = "New note";
$GLOBALS["i18n_list"] = "All";
+ $GLOBALS["i18n_related"] = "Related Notes";
$GLOBALS["i18n_login"] = "Login";
$GLOBALS["i18n_user"] = "Username";
$GLOBALS["i18n_pass"] = "Password";
@@ -33,6 +34,7 @@ if ($lang == "de") {
$GLOBALS["i18n_delete"] = "Löschen";
$GLOBALS["i18n_new"] = "Neue Notiz";
$GLOBALS["i18n_list"] = "Alle";
+ $GLOBALS["i18n_related"] = "Ähnliche Notizen";
$GLOBALS["i18n_login"] = "Login";
$GLOBALS["i18n_logout"] = "Logout";
$GLOBALS["i18n_user"] = "Name der:die Nutzer:in";
diff --git a/lib/show.php b/lib/show.php
@@ -44,6 +44,7 @@ function show_note(
<input type="submit" value="<?php echo $GLOBALS["i18n_save"]; ?>">
</form>
+<!-- delete button -->
<form action="/" method="post" id="delete">
<input
id="category"
@@ -71,6 +72,34 @@ function show_note(
>
</form>
+<!-- related notes -->
+<div class="related">
+
+ <stretch class="inline"><?php echo $GLOBALS["i18n_related"]; ?>:</stretch>
+
+ <!-- current category button -->
+ <form action="/" method="post" class="inline">
+ <input
+ id="category"
+ name="category"
+ type="hidden"
+ value="<?php echo $category; ?>"
+ >
+ <input
+ id="action"
+ name="action"
+ type="hidden"
+ value="list"
+ >
+ <input
+ class="likenavitem"
+ type="submit"
+ value="<?php echo $category; ?>"
+ >
+ </form>
+
+</div>
+
<?php
} // function