Short commit ids in log and history take two (issue-168)
| | |
| | |
|
| | | public static final String ENCODING = "UTF-8";
|
| | |
|
| | | public static final int LEN_SHORTLOG = 80;
|
| | | public static final int LEN_SHORTLOG = 78;
|
| | |
|
| | | public static final int LEN_SHORTLOG_REFS = 60;
|
| | |
|
| | |
| | | <td class="date"><span wicket:id="commitDate">[commit date]</span></td>
|
| | | <td class="icon"><img wicket:id="commitIcon" /></td>
|
| | | <td class="hidden-phone author"><span wicket:id="commitAuthor">[commit author]</span></td>
|
| | | <td class="hidden-phone hidden-tablet"><span wicket:id="commitHash">[commit hash]</span></td>
|
| | | <td class="message"><table class="nestedTable"><tr><td><span style="vertical-align:middle;" wicket:id="commitShortMessage">[commit short message]</span></td><td><div style="text-align:right;" wicket:id="commitRefs">[commit refs]</div></td></tr></table></td>
|
| | | <td class="hidden-phone hidden-tablet"><span class="link" wicket:id="hashLabel">[hash label]</span><span wicket:id="hashLink">[hash link]</span></td>
|
| | | <td class="hidden-phone rightAlign">
|
| | | <span wicket:id="historyLinks">[history links]</span>
|
| | | </td>
|
| | |
| | | <!-- tree links -->
|
| | | <wicket:fragment wicket:id="treeLinks">
|
| | | <span class="link">
|
| | | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a> | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a>
|
| | | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a>
|
| | | </span>
|
| | | </wicket:fragment>
|
| | |
|
| | | <!-- blob links -->
|
| | | <wicket:fragment wicket:id="blobLinks">
|
| | | <span class="link">
|
| | | <a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a> | <a wicket:id="difftocurrent"><wicket:message key="gb.difftocurrent"></wicket:message></a>
|
| | | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a> | <a wicket:id="difftocurrent"><wicket:message key="gb.difftocurrent"></wicket:message></a>
|
| | | </span>
|
| | | </wicket:fragment>
|
| | |
|
| | |
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | | import com.gitblit.wicket.pages.CommitDiffPage;
|
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.HistoryPage;
|
| | | import com.gitblit.wicket.pages.GitSearchPage;
|
| | | import com.gitblit.wicket.pages.HistoryPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | | public class HistoryPanel extends BasePanel {
|
| | |
| | | setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
|
| | | item.add(authorLink);
|
| | |
|
| | | // commit hash link
|
| | | LinkPanel commitHash = new LinkPanel("commitHash", null, entry.getName().substring(0, hashLen),
|
| | | CommitPage.class, WicketUtils.newObjectParameter(
|
| | | repositoryName, entry.getName()));
|
| | | WicketUtils.setCssClass(commitHash, "sha1");
|
| | | WicketUtils.setHtmlTooltip(commitHash, entry.getName());
|
| | | item.add(commitHash);
|
| | | |
| | | // merge icon
|
| | | if (entry.getParentCount() > 1) {
|
| | | item.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));
|
| | |
| | | item.add(new RefsPanel("commitRefs", repositoryName, entry, allRefs));
|
| | |
|
| | | if (isTree) {
|
| | | // tree
|
| | | item.add(new Label("hashLabel", getString("gb.tree") + "@"));
|
| | | LinkPanel commitHash = new LinkPanel("hashLink", null, entry.getName().substring(0, hashLen),
|
| | | TreePage.class, WicketUtils.newObjectParameter(
|
| | | repositoryName, entry.getName()));
|
| | | WicketUtils.setCssClass(commitHash, "sha1");
|
| | | WicketUtils.setHtmlTooltip(commitHash, entry.getName()); |
| | | item.add(commitHash);
|
| | | |
| | | Fragment links = new Fragment("historyLinks", "treeLinks", this);
|
| | | links.add(new BookmarkablePageLink<Void>("tree", TreePage.class, WicketUtils
|
| | | .newObjectParameter(repositoryName, entry.getName())));
|
| | | links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
|
| | | WicketUtils.newObjectParameter(repositoryName, entry.getName())));
|
| | | item.add(links);
|
| | | } else {
|
| | | } else { |
| | | // commit
|
| | | item.add(new Label("hashLabel", getString("gb.blob") + "@"));
|
| | | LinkPanel commitHash = new LinkPanel("hashLink", null, entry.getName().substring(0, hashLen),
|
| | | BlobPage.class, WicketUtils.newPathParameter(
|
| | | repositoryName, entry.getName(), path));
|
| | | WicketUtils.setCssClass(commitHash, "sha1");
|
| | | WicketUtils.setHtmlTooltip(commitHash, entry.getName());
|
| | | item.add(commitHash);
|
| | | |
| | | Fragment links = new Fragment("historyLinks", "blobLinks", this);
|
| | | links.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils
|
| | | .newPathParameter(repositoryName, entry.getName(), path)));
|
| | | links.add(new BookmarkablePageLink<Void>("commitdiff", CommitDiffPage.class,
|
| | | WicketUtils.newObjectParameter(repositoryName, entry.getName())));
|
| | | links.add(new BookmarkablePageLink<Void>("difftocurrent", BlobDiffPage.class,
|
| | |
| | | <tr wicket:id="commit">
|
| | | <td class="date" style="width:6em;"><span wicket:id="commitDate">[commit date]</span></td>
|
| | | <td class="hidden-phone author"><span wicket:id="commitAuthor">[commit author]</span></td>
|
| | | <td class="hidden-phone hidden-tablet"><span wicket:id="commitHash">[commit hash]</span></td>
|
| | | <td class="hidden-phone icon"><img wicket:id="commitIcon" /></td>
|
| | | <td class="message"><table class="nestedTable"><tr><td><span style="vertical-align:middle;" wicket:id="commitShortMessage">[commit short message]</span></td><td><div style="text-align:right;" wicket:id="commitRefs">[commit refs]</div></td></tr></table></td>
|
| | | <td class="hidden-phone hidden-tablet"><span wicket:id="hashLink">[hash link]</span></td>
|
| | | <td class="hidden-phone hidden-tablet rightAlign">
|
| | | <span class="link">
|
| | | <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>
|
| | | <a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>
|
| | | </span>
|
| | | </td>
|
| | | </tr>
|
| | |
| | | setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
|
| | | item.add(authorLink);
|
| | |
|
| | | // commit hash link
|
| | | LinkPanel commitHash = new LinkPanel("commitHash", null, entry.getName().substring(0, hashLen),
|
| | | CommitPage.class, WicketUtils.newObjectParameter(
|
| | | repositoryName, entry.getName()));
|
| | | WicketUtils.setCssClass(commitHash, "sha1");
|
| | | WicketUtils.setHtmlTooltip(commitHash, entry.getName());
|
| | | item.add(commitHash);
|
| | |
|
| | | // merge icon
|
| | | if (entry.getParentCount() > 1) {
|
| | | item.add(WicketUtils.newImage("commitIcon", "commit_merge_16x16.png"));
|
| | |
| | |
|
| | | item.add(new RefsPanel("commitRefs", repositoryName, entry, allRefs));
|
| | |
|
| | | item.add(new BookmarkablePageLink<Void>("view", CommitPage.class, WicketUtils
|
| | | .newObjectParameter(repositoryName, entry.getName())));
|
| | | // commit hash link
|
| | | LinkPanel commitHash = new LinkPanel("hashLink", null, entry.getName().substring(0, hashLen),
|
| | | CommitPage.class, WicketUtils.newObjectParameter(
|
| | | repositoryName, entry.getName()));
|
| | | WicketUtils.setCssClass(commitHash, "sha1");
|
| | | WicketUtils.setHtmlTooltip(commitHash, entry.getName());
|
| | | item.add(commitHash);
|
| | | |
| | | item.add(new BookmarkablePageLink<Void>("diff", CommitDiffPage.class, WicketUtils
|
| | | .newObjectParameter(repositoryName, entry.getName())).setEnabled(entry
|
| | | .getParentCount() > 0));
|