import org.apache.wicket.PageParameters;\r
import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
\r
+import com.gitblit.utils.StringUtils;\r
import com.gitblit.wicket.WicketUtils;\r
import com.gitblit.wicket.panels.LogPanel;\r
\r
int pageNumber = WicketUtils.getPage(params);\r
int prevPage = Math.max(0, pageNumber - 1);\r
int nextPage = pageNumber + 1;\r
- LogPanel logPanel = new LogPanel("logPanel", repositoryName, objectId, getRepository(), -1,\r
+ String refid = objectId;\r
+ if (StringUtils.isEmpty(refid)) {\r
+ refid = getRepositoryModel().HEAD;\r
+ }\r
+ LogPanel logPanel = new LogPanel("logPanel", repositoryName, refid, getRepository(), -1,\r
pageNumber - 1);\r
boolean hasMore = logPanel.hasMore();\r
add(logPanel);\r
add(new Label("otherUrls", StringUtils.flattenStrings(repositoryUrls, "<br/>"))\r
.setEscapeModelStrings(false));\r
\r
- add(new LogPanel("commitsPanel", repositoryName, null, r, numberCommits, 0));\r
+ add(new LogPanel("commitsPanel", repositoryName, getRepositoryModel().HEAD, r, numberCommits, 0));\r
add(new TagsPanel("tagsPanel", repositoryName, r, numberRefs).hideIfEmpty());\r
add(new BranchesPanel("branchesPanel", getRepositoryModel(), r, numberRefs).hideIfEmpty());\r
\r
if (pageResults) {\r
// shortlog page\r
// show repository summary page link\r
- add(new LinkPanel("header", "title", repositoryName, SummaryPage.class,\r
+ add(new LinkPanel("header", "title", objectId, SummaryPage.class,\r
WicketUtils.newRepositoryParameter(repositoryName)));\r
} else {\r
// summary page\r
// show shortlog page link\r
- add(new LinkPanel("header", "title", new StringResourceModel("gb.log", this, null),\r
- LogPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
+ add(new LinkPanel("header", "title", objectId, LogPage.class,\r
+ WicketUtils.newRepositoryParameter(repositoryName)));\r
}\r
\r
ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);\r