# HG changeset patch # User Kim Alvefur # Date 1415518737 -3600 # Node ID 2e51f70cd7ea7093ab125c7af36c3be4146e28c3 # Parent 8059b7cdaf17c9754c40af8af0492b275e648a24 mod_http_muc_log: Make pretty diff -r 8059b7cdaf17 -r 2e51f70cd7ea mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Sun Nov 09 08:37:43 2014 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Sun Nov 09 08:38:57 2014 +0100 @@ -29,7 +29,7 @@ module:depends"http"; local function template(data) - local _doc = [[ + --[[ DOC Like util.template, but deals with plain text Returns a closure that is called with a table of values {name} is substituted for values["name"] and is XML escaped @@ -51,38 +51,66 @@ end end -local base = template[[ +-- TODO Move templates into files +local base = template(template[[ + + {title} + +

{title}

+
+{header!} +
+
+
{body!} -]] +
+
+ + + +]] { prosody_version = prosody.version }); local dates_template = template(base{ title = "Logs for room {room}"; - body = [[ - + header = [[ -