summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-02-05 19:50:56 +0100
committerdefault <nobody@localhost>2024-02-05 19:50:56 +0100
commit7efa3ce519b0a4dd769e3be5afce3d4bfda39bfa (patch)
tree24e2c6770492422db1f791af675bff1de18a6159 /html.c
parent4e35b4b865512b0616f1b9dd437ad12cf2953848 (diff)
Added a navigation footer (i.e., an optional "More..." link) to the notification page.
Diffstat (limited to 'html.c')
-rw-r--r--html.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/html.c b/html.c
index 0508784..8cc0394 100644
--- a/html.c
+++ b/html.c
@@ -2272,6 +2272,19 @@ xs_str *html_notifications(snac *user, int skip, int show)
xs_html_attr("class", "snac-header"),
xs_html_text(L("None"))));
+ /* add the navigation footer */
+ xs *next_p = notify_list(user, skip + show, 1);
+ if (xs_list_len(next_p)) {
+ xs *url = xs_fmt("%s/notifications?skip=%d&show=%d",
+ user->actor, skip + show, show);
+
+ xs_html_add(body,
+ xs_html_tag("p",
+ xs_html_tag("a",
+ xs_html_attr("href", url),
+ xs_html_text(L("More...")))));
+ }
+
xs_html_add(body,
html_footer());