commit 7efa3ce

default  ·  2024-02-05 18:50:56 +0000 UTC
parent 4e35b4b
Added a navigation footer (i.e., an optional "More..." link) to the notification page.
1 files changed,  +13, -0
M html.c
M html.c
+13, -0
 1@@ -2272,6 +2272,19 @@ xs_str *html_notifications(snac *user, int skip, int show)
 2                 xs_html_attr("class", "snac-header"),
 3                 xs_html_text(L("None"))));
 4 
 5+    /* add the navigation footer */
 6+    xs *next_p = notify_list(user, skip + show, 1);
 7+    if (xs_list_len(next_p)) {
 8+        xs *url = xs_fmt("%s/notifications?skip=%d&show=%d",
 9+            user->actor, skip + show, show);
10+
11+        xs_html_add(body,
12+            xs_html_tag("p",
13+                xs_html_tag("a",
14+                    xs_html_attr("href", url),
15+                    xs_html_text(L("More...")))));
16+    }
17+
18     xs_html_add(body,
19         html_footer());
20