--- a/mod_http_muc_log/mod_http_muc_log.lua Sun Sep 29 18:53:00 2019 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua Mon Sep 30 00:27:25 2019 +0200
@@ -359,6 +359,16 @@
end
end
+ local links = {
+ { href = "./", rel = "up", text = "Calendar" },
+ };
+ if prev_when ~= "" then
+ table.insert(links, { href = prev_when, rel = "prev", text = prev_when});
+ end
+ if next_when ~= "" then
+ table.insert(links, { href = next_when, rel = "next", text = next_when});
+ end
+
response.headers.content_type = "text/html; charset=utf-8";
return render(template, {
title = ("%s - %s"):format(get_room(room):get_name(), date);
@@ -366,11 +376,7 @@
hide_presence = hide_presence(request);
presence_available = presence_logged;
lines = logs;
- links = {
- { href = "./", rel = "up", text = "Calendar" },
- { href = prev_when, rel = "prev", text = prev_when},
- { href = next_when, rel = "next", text = next_when},
- };
+ links = links;
});
end