import java.text.MessageFormat;\r
import java.text.SimpleDateFormat;\r
import java.util.ArrayList;\r
-import java.util.Calendar;\r
import java.util.Date;\r
import java.util.List;\r
import java.util.TimeZone;\r
super(wicketId);\r
hasChanges = digests.size() > 0;\r
\r
- final int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);\r
-\r
- String dateFormat = app().settings().getString(Keys.web.datestampLongFormat, "EEEE, MMMM d, yyyy");\r
- final TimeZone timezone = getTimeZone();\r
- final DateFormat df = new SimpleDateFormat(dateFormat);\r
- df.setTimeZone(timezone);\r
- final Calendar cal = Calendar.getInstance(timezone);\r
-\r
ListDataProvider<DailyLogEntry> dp = new ListDataProvider<DailyLogEntry>(digests);\r
DataView<DailyLogEntry> pushView = new DataView<DailyLogEntry>("change", dp) {\r
private static final long serialVersionUID = 1L;\r
@Override\r
public void populateItem(final Item<DailyLogEntry> logItem) {\r
final DailyLogEntry change = logItem.getModelObject();\r
+\r
+ String dateFormat = app().settings().getString(Keys.web.datestampLongFormat, "EEEE, MMMM d, yyyy");\r
+ TimeZone timezone = getTimeZone();\r
+ DateFormat df = new SimpleDateFormat(dateFormat);\r
+ df.setTimeZone(timezone);\r
+\r
String fullRefName = change.getChangedRefs().get(0);\r
String shortRefName = fullRefName;\r
boolean isTag = false;\r
commitItem.add(shortlog);\r
\r
// commit hash link\r
+ int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);\r
LinkPanel commitHash = new LinkPanel("hashLink", null, commit.getName().substring(0, hashLen),\r
CommitPage.class, WicketUtils.newObjectParameter(\r
change.repository, commit.getName()));\r
}\r
\r
protected void setup(List<RefLogEntry> changes) {\r
- final int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);\r
-\r
- String dateFormat = app().settings().getString(Keys.web.datetimestampLongFormat, "EEEE, MMMM d, yyyy HH:mm Z");\r
- final TimeZone timezone = getTimeZone();\r
- final DateFormat df = new SimpleDateFormat(dateFormat);\r
- df.setTimeZone(timezone);\r
- final Calendar cal = Calendar.getInstance(timezone);\r
\r
ListDataProvider<RefLogEntry> dp = new ListDataProvider<RefLogEntry>(changes);\r
DataView<RefLogEntry> changeView = new DataView<RefLogEntry>("change", dp) {\r
@Override\r
public void populateItem(final Item<RefLogEntry> changeItem) {\r
final RefLogEntry change = changeItem.getModelObject();\r
+\r
+ String dateFormat = app().settings().getString(Keys.web.datetimestampLongFormat, "EEEE, MMMM d, yyyy HH:mm Z");\r
+ TimeZone timezone = getTimeZone();\r
+ DateFormat df = new SimpleDateFormat(dateFormat);\r
+ df.setTimeZone(timezone);\r
+ Calendar cal = Calendar.getInstance(timezone);\r
+\r
String fullRefName = change.getChangedRefs().get(0);\r
String shortRefName = fullRefName;\r
boolean isTag = false;\r
commitItem.add(shortlog);\r
\r
// commit hash link\r
+ int hashLen = app().settings().getInteger(Keys.web.shortCommitIdLength, 6);\r
LinkPanel commitHash = new LinkPanel("hashLink", null, commit.getName().substring(0, hashLen),\r
CommitPage.class, WicketUtils.newObjectParameter(\r
change.repository, commit.getName()));\r