James Moger
2012-11-27 73f1adb2e84b8b9cd4045bcdd7d9afa72d3875b5
Added short commit id column to log and history tables (issue-168)
5 files modified
21 ■■■■■ changed files
docs/04_releases.mkd 1 ●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/panels/HistoryPanel.html 1 ●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/panels/HistoryPanel.java 9 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/panels/LogPanel.html 1 ●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/panels/LogPanel.java 9 ●●●●● patch | view | raw | blame | history
docs/04_releases.mkd
@@ -70,6 +70,7 @@
#### changes
- Added short commit id column to log and history tables (issue 168)
- Teams can now specify the *admin*, *create*, and *fork* roles to simplify user administration
- Use https Gravatar urls to avoid browser complaints
- Added frm to default pretty print extensions (issue 156)
src/com/gitblit/wicket/panels/HistoryPanel.html
@@ -19,6 +19,7 @@
                 <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 rightAlign">
                     <span wicket:id="historyLinks">[history links]</span>
src/com/gitblit/wicket/panels/HistoryPanel.java
@@ -118,6 +118,7 @@
        // breadcrumbs
        add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, path, objectId));
        final int hashLen = GitBlit.getInteger(Keys.web.shortCommitIdLength, 6);
        ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
        DataView<RevCommit> logView = new DataView<RevCommit>("commit", dp) {
            private static final long serialVersionUID = 1L;
@@ -138,6 +139,14 @@
                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"));
src/com/gitblit/wicket/panels/LogPanel.html
@@ -14,6 +14,7 @@
               <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 rightAlign">
src/com/gitblit/wicket/panels/LogPanel.java
@@ -82,6 +82,7 @@
                    WicketUtils.newRepositoryParameter(repositoryName)));
        }
        final int hashLen = GitBlit.getInteger(Keys.web.shortCommitIdLength, 6);
        ListDataProvider<RevCommit> dp = new ListDataProvider<RevCommit>(commits);
        DataView<RevCommit> logView = new DataView<RevCommit>("commit", dp) {
            private static final long serialVersionUID = 1L;
@@ -100,6 +101,14 @@
                                objectId, author, Constants.SearchType.AUTHOR));
                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) {