From: john at keeping.me.uk (John Keeping)
Subject: [PATCH 3/3] ui-shared: show full date in tooltip if longer ago than max_relative
Date: Thu, 13 Aug 2015 12:24:34 +0100 [thread overview]
Message-ID: <da35b6f4ee413ddc1f111a4525748c649d8eaa1f.1439464935.git.john@keeping.me.uk> (raw)
In-Reply-To: <cover.1439464935.git.john@keeping.me.uk>
Commit caed6cb (ui-shared: show absolute time in tooltip for relative
dates, 2014-12-20) added a toolip when we show a relative time.
However, in some cases we show a short date (that is, the date but not
the time) if an event was sufficiently far in the past and that commit
did not update that case to add the same tooltip.
Signed-off-by: John Keeping <john at keeping.me.uk>
---
ui-shared.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui-shared.c b/ui-shared.c
index 792f3ee..57d7336 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -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) {
+ html("<span title='");
+ html_attr(fmt_date(t, FMT_LONGDATE, ctx.cfg.local_time));
+ html("'>");
cgit_print_date(t, format, ctx.cfg.local_time);
+ html("</span>");
return;
}
--
2.5.0.466.g9af26fa
next prev parent reply other threads:[~2015-08-13 11:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 11:24 [PATCH 0/3] Fix date tooltips in the distant past john
2015-08-13 11:24 ` [PATCH 1/3] ui-shared: extract date formatting to a function john
2015-08-13 11:24 ` [PATCH 2/3] ui-shared: use common function in print_rel_date() john
2015-08-13 11:24 ` john [this message]
2015-08-13 13:40 ` [PATCH 0/3] Fix date tooltips in the distant past Jason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da35b6f4ee413ddc1f111a4525748c649d8eaa1f.1439464935.git.john@keeping.me.uk \
--to=cgit@lists.zx2c4.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).