siteName = Constants.NAME;\r
}\r
add(new Label("siteName", siteName));\r
- add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, new PageParameters("p=" + repositoryName)));\r
+ add(new LinkPanel("repositoryName", null, repositoryName, SummaryPage.class, WicketUtils.newRepositoryParameter(repositoryName)));\r
add(new Label("pageName", pageName));\r
\r
// footer\r
<tr wicket:id="changedPath">\r
<td class="path"><span wicket:id="pathName">[commit path]</span></td> \r
<td>\r
- <div class="link">\r
+ <span class="link">\r
<a wicket:id="patch"><wicket:message key="gb.patch"></wicket:message></a> | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
- </div>\r
+ </span>\r
</td>\r
</tr>\r
</table>\r
<tr><th></th><td><span wicket:id="commitAuthorDate">[author date]</span></td></tr>\r
<tr><th><wicket:message key="gb.committer">committer</wicket:message></th><td><span wicket:id="commitCommitter">[committer]</span></td></tr>\r
<tr><th></th><td><span wicket:id="commitCommitterDate">[commit date]</span></td></tr>\r
- <tr><th><wicket:message key="gb.commit">commit</wicket:message></th><td class="sha1"><span wicket:id="commitId">[commit id]</span></td></tr>\r
- <tr><th><wicket:message key="gb.tree">tree</wicket:message></th><td class="sha1"><span wicket:id="commitTree">[commit tree]</span></td></tr>\r
- <tr><th><wicket:message key="gb.parent">parent</wicket:message></th><td class="sha1"><span wicket:id="commitParents">\r
- <div wicket:id="commitParent">[commit parents]</div></span></td></tr>\r
+ <tr><th><wicket:message key="gb.commit">commit</wicket:message></th><td><span class="sha1" wicket:id="commitId">[commit id]</span></td></tr>\r
+ <tr><th><wicket:message key="gb.tree">tree</wicket:message></th><td><span class="sha1" wicket:id="commitTree">[commit tree]</span></td></tr>\r
+ <tr><th><wicket:message key="gb.parent">parent</wicket:message></th>\r
+ <td>\r
+ <span wicket:id="commitParents">\r
+ <span class="sha1" wicket:id="commitParent">[commit parents]</span>\r
+ <span class="link">\r
+ <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a>\r
+ </span> \r
+ </span>\r
+ </td>\r
+ </tr>\r
</table>\r
\r
<!-- full message -->\r
<tr wicket:id="changedPath">\r
<td class="path"><span wicket:id="pathName">[commit path]</span></td> \r
<td>\r
- <div class="link">\r
+ <span class="link">\r
<a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
- </div>\r
+ </span>\r
</td>\r
</tr>\r
</table>\r
public void populateItem(final Item<String> item) {\r
String entry = item.getModelObject();\r
item.add(new LinkPanel("commitParent", "list", entry, CommitPage.class, newCommitParameter(entry)));\r
+ item.add(new BookmarkablePageLink<Void>("view", CommitPage.class, newCommitParameter(entry)));\r
+ item.add(new BookmarkablePageLink<Void>("diff", CommitDiffPage.class, newCommitParameter(entry)));\r
}\r
};\r
add(parentsView);\r
\r
<!-- commit info -->\r
<table class="plain">\r
- <tr><th><wicket:message key="gb.object">object</wicket:message></th><td><span wicket:id="tagId">[tag id]</span></td></tr>\r
+ <tr><th><wicket:message key="gb.object">object</wicket:message></th><td><span class="sha1" wicket:id="tagId">[tag id]</span></td></tr>\r
<tr><th><wicket:message key="gb.author">author</wicket:message></th><td><span wicket:id="tagAuthor">[tag author]</span></td></tr>\r
<tr><th></th><td><span wicket:id="tagDate">[tag date]</span></td></tr>\r
</table>\r
List<RefModel> tags = JGitUtils.getTags(r, -1);\r
RevCommit c = JGitUtils.getCommit(r, objectId);\r
\r
- String name = c.getName();\r
+ RefModel tagRef = null;\r
+ // determine tag\r
for (RefModel tag:tags) {\r
- if (tag.getName().equals(objectId)) {\r
- name = tag.getDisplayName();\r
+ if (tag.getName().equals(objectId) || tag.getObjectId().getName().equals(objectId)) {\r
+ tagRef = tag;\r
+ break;\r
}\r
}\r
\r
- add(new LinkPanel("commit", "title", name, CommitPage.class, newCommitParameter()));\r
-\r
- add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName())));\r
+ if (tagRef == null) {\r
+ // point to commit\r
+ add(new LinkPanel("commit", "title", c.getShortMessage(), CommitPage.class, newCommitParameter()));\r
+ add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName()))); \r
+ } else {\r
+ // TODO commit or tree or blob?\r
+ add(new LinkPanel("commit", "title", tagRef.getDisplayName(), CommitPage.class, newCommitParameter()));\r
+ add(new LinkPanel("tagId", "list", c.getName(), CommitPage.class, newCommitParameter(c.getName())));\r
+ } \r
+ \r
add(new Label("tagAuthor", JGitUtils.getDisplayName(c.getAuthorIdent())));\r
add(WicketUtils.createTimestampLabel("tagDate", c.getAuthorIdent().getWhen(), getTimeZone()));\r
\r
\r
<!-- ticket info -->\r
<table class="plain">\r
- <tr><th><wicket:message key="gb.ticketId">ticket id</wicket:message></th><td class="sha1"><span wicket:id="ticketId">[ticket id]</span></td></tr>\r
+ <tr><th><wicket:message key="gb.ticketId">ticket id</wicket:message></th><td><span class="sha1" wicket:id="ticketId">[ticket id]</span></td></tr>\r
<tr><th><wicket:message key="gb.ticketAssigned">assigned</wicket:message></th><td><span wicket:id=ticketHandler>[ticket title]</span></td></tr>\r
<tr><th><wicket:message key="gb.ticketOpenDate">open date</wicket:message></th><td><span wicket:id="ticketOpenDate">[ticket open date]</span></td></tr>\r
<tr><th><wicket:message key="gb.ticketState">state</wicket:message></th><td><span wicket:id="ticketState">[ticket state]</span></td></tr>\r
\r
<!-- tree links -->\r
<wicket:fragment wicket:id="treeLinks">\r
- <div class="link">\r
+ <span class="link">\r
<a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
- </div>\r
+ </span>\r
</wicket:fragment>\r
\r
<!-- blob links -->\r
<wicket:fragment wicket:id="blobLinks">\r
- <div class="link">\r
- <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
- </div> \r
+ <span class="link">\r
+ <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
+ </span> \r
</wicket:fragment>\r
\r
</wicket:extend> \r
Fragment links = new Fragment("pathLinks", "blobLinks", this);\r
links.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path)));\r
links.add(new BookmarkablePageLink<Void>("raw", RawPage.class, WicketUtils.newPathParameter(repositoryName, entry.commitId, entry.path)));\r
+ links.add(new BookmarkablePageLink<Void>("blame", BlobPage.class).setEnabled(false));\r
links.add(new BookmarkablePageLink<Void>("history", BlobPage.class).setEnabled(false));\r
item.add(links);\r
}\r
<td><span wicket:id="branchName">[branch name]</span></td>\r
<td><span wicket:id="branchType">[branch type]</span></td>\r
<td class="rightAlign">\r
- <div class="link">\r
+ <span class="link">\r
<a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
- </div> \r
+ </span> \r
</td>\r
</tr>\r
</tbody>\r
<td class="author"><span wicket:id="commitAuthor">[commit author]</span></td>\r
<td><div wicket:id="commitShortMessage">[commit short message]</div></td>\r
<td class="rightAlign"><div wicket:id="commitRefs">[commit refs]</div></td> \r
- <td class="rightAlign"><div class="link">\r
- <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
- </div>\r
+ <td class="rightAlign">\r
+ <span class="link">\r
+ <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
+ </span>\r
</td>\r
</tr>\r
</tbody>\r
<td><b><span wicket:id="tagName">[tag name]</span></b></td>\r
<td><span wicket:id="tagDescription">[tag description]</span></td>\r
<td class="rightAlign">\r
- <div class="link">\r
+ <span class="link">\r
<a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="log"><wicket:message key="gb.log"></wicket:message></a>\r
- </div>\r
+ </span>\r
</td>\r
</tr>\r
</tbody>\r
padding: 0px 0px 15px 5px;\r
}\r
\r
-div.link {\r
- padding: 2px 5px;\r
+span.link, span.link a {\r
font-family: sans-serif;\r
font-size: 11px;\r
}\r
\r
-div.link span {\r
- font-family: inherit;\r
- font-size: inherit;\r
-}\r
-\r
-div.link a {\r
- font-family: inherit;\r
- font-size: inherit;\r
-}\r
-\r
-div.link em, div.link span em {\r
+span.link em, div.link span em {\r
font-style: normal;\r
- font-family: inherit;\r
- font-size: inherit;\r
+ font-family: sans-serif;\r
+ font-size: 11px;\r
}\r
\r
div.page_header {\r
border-right: 1px solid #bbb; \r
}\r
\r
+table.pretty td {\r
+ padding: 2px 4px;\r
+}\r
+\r
table.repositories {\r
width:100%; \r
}\r
font-style: italic; \r
}\r
\r
-td.sha1, td.sha1 span {\r
+span.sha1, span.sha1 a, span.sha1 a span {\r
font-family: monospace;\r
font-size: 13px;\r
}\r