summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 09:04:23 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 10:10:48 -0400
commit235ad956fa84cad4fac1b2e69a0c9e4f50376ea3 (patch)
tree0477012362aa8ffed17b3098d1ce97164820045f /src/main/java
parent73d8e161834f768bc772e38a7ebf1a140962c685 (diff)
downloadgitblit-235ad956fa84cad4fac1b2e69a0c9e4f50376ea3.tar.gz
gitblit-235ad956fa84cad4fac1b2e69a0c9e4f50376ea3.zip
Revise date label creation for optional css class
Change-Id: Ia244aedb37067c138343a9094bf489a367a4464d
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/gitblit/wicket/WicketUtils.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/wicket/WicketUtils.java b/src/main/java/com/gitblit/wicket/WicketUtils.java
index 1cf465e1..48bcbcc9 100644
--- a/src/main/java/com/gitblit/wicket/WicketUtils.java
+++ b/src/main/java/com/gitblit/wicket/WicketUtils.java
@@ -507,6 +507,10 @@ public class WicketUtils {
}
public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils) {
+ return createDateLabel(wicketId, date, timeZone, timeUtils, true);
+ }
+
+ public static Label createDateLabel(String wicketId, Date date, TimeZone timeZone, TimeUtils timeUtils, boolean setCss) {
String format = GitBlit.getString(Keys.web.datestampShortFormat, "MM/dd/yy");
DateFormat df = new SimpleDateFormat(format);
if (timeZone == null) {
@@ -530,7 +534,9 @@ public class WicketUtils {
title = tmp;
}
Label label = new Label(wicketId, dateString);
- WicketUtils.setCssClass(label, timeUtils.timeAgoCss(date));
+ if (setCss) {
+ WicketUtils.setCssClass(label, timeUtils.timeAgoCss(date));
+ }
if (!StringUtils.isEmpty(title)) {
WicketUtils.setHtmlTooltip(label, title);
}