]> gitweb.ps.run Git - ps-cgit/blobdiff - ui-shared.c
ui-shared: show full date in tooltip if longer ago than max_relative
[ps-cgit] / ui-shared.c
index bbb277afec66f6465ceb08bab6472f96f441324e..36fcb212296dd9f0800103a6d035862c2d09fb11 100644 (file)
@@ -644,7 +644,11 @@ void cgit_print_age(time_t t, time_t max_relative, const char *format)
                secs = 0;
 
        if (secs > max_relative && max_relative >= 0) {
                secs = 0;
 
        if (secs > max_relative && max_relative >= 0) {
+               html("<span title='");
+               html_attr(fmt_date(t, FMT_LONGDATE, ctx.cfg.local_time));
+               html("'>");
                cgit_print_date(t, format, ctx.cfg.local_time);
                cgit_print_date(t, format, ctx.cfg.local_time);
+               html("</span>");
                return;
        }
 
                return;
        }