summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-02-05 19:50:56 +0100
committerGravatar default2024-02-05 19:50:56 +0100
commit7efa3ce519b0a4dd769e3be5afce3d4bfda39bfa (patch)
tree24e2c6770492422db1f791af675bff1de18a6159
parentAdded paging to notify_list(), and use it in the notifications page. (diff)
downloadsnac2-7efa3ce519b0a4dd769e3be5afce3d4bfda39bfa.tar.gz
snac2-7efa3ce519b0a4dd769e3be5afce3d4bfda39bfa.tar.xz
snac2-7efa3ce519b0a4dd769e3be5afce3d4bfda39bfa.zip
Added a navigation footer (i.e., an optional "More..." link) to the notification page.
-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)
2272 xs_html_attr("class", "snac-header"), 2272 xs_html_attr("class", "snac-header"),
2273 xs_html_text(L("None")))); 2273 xs_html_text(L("None"))));
2274 2274
2275 /* add the navigation footer */
2276 xs *next_p = notify_list(user, skip + show, 1);
2277 if (xs_list_len(next_p)) {
2278 xs *url = xs_fmt("%s/notifications?skip=%d&show=%d",
2279 user->actor, skip + show, show);
2280
2281 xs_html_add(body,
2282 xs_html_tag("p",
2283 xs_html_tag("a",
2284 xs_html_attr("href", url),
2285 xs_html_text(L("More...")))));
2286 }
2287
2275 xs_html_add(body, 2288 xs_html_add(body,
2276 html_footer()); 2289 html_footer());
2277 2290