]> source.dussan.org Git - gitblit.git/commitdiff
Added merge icon. Added commit legend with counts. Improved header.
authorJames Moger <james.moger@gitblit.com>
Fri, 22 Apr 2011 00:50:59 +0000 (20:50 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 22 Apr 2011 00:50:59 +0000 (20:50 -0400)
26 files changed:
src/com/gitblit/utils/GitBlitDiffFormatter.java
src/com/gitblit/utils/JGitUtils.java
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/pages/CommitDiffPage.html
src/com/gitblit/wicket/pages/CommitDiffPage.java
src/com/gitblit/wicket/pages/CommitPage.html
src/com/gitblit/wicket/pages/CommitPage.java
src/com/gitblit/wicket/pages/TicketPage.html
src/com/gitblit/wicket/pages/TicketsPage.html
src/com/gitblit/wicket/panels/BranchesPanel.html
src/com/gitblit/wicket/panels/CommitLegendPanel.html [new file with mode: 0644]
src/com/gitblit/wicket/panels/CommitLegendPanel.java [new file with mode: 0644]
src/com/gitblit/wicket/panels/HistoryPanel.html
src/com/gitblit/wicket/panels/HistoryPanel.java
src/com/gitblit/wicket/panels/LogPanel.html
src/com/gitblit/wicket/panels/LogPanel.java
src/com/gitblit/wicket/panels/SearchPanel.html
src/com/gitblit/wicket/panels/SearchPanel.java
src/com/gitblit/wicket/panels/TagsPanel.html
src/com/gitblit/wicket/resources/background.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/commit_branch_16x16.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/commit_divide_16x16.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/commit_join_16x16.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/commit_merge_16x16.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/commit_up_16x16.png [new file with mode: 0644]
src/com/gitblit/wicket/resources/gitblit.css

index 54cb6c2970bed2f9494862e222c1b6c5bf9fecf4..b8dceb4714bb63320e042120baa21e8ca011c054 100644 (file)
@@ -97,6 +97,10 @@ public class GitBlitDiffFormatter extends GitWebDiffFormatter {
                                // skip index lines\r
                        } else if (line.startsWith("new file")) {\r
                                // skip new file lines\r
+                       } else if (line.startsWith("\\ No newline")) {\r
+                               // skip no new line\r
+                       } else if (line.startsWith("---") || line.startsWith("+++")) {\r
+                               // skip --- +++ lines\r
                        } else if (line.startsWith("diff")) {\r
                                if (line.indexOf(oldnull) > -1) {\r
                                        // a is null, use b\r
@@ -115,8 +119,6 @@ public class GitBlitDiffFormatter extends GitWebDiffFormatter {
                                sb.append("<div class=\"diff\">");      \r
                                sb.append("<table><tbody>");\r
                                inFile = true;\r
-                       } else if (line.startsWith("---") || line.startsWith("+++")) {\r
-                               // skip --- +++ lines\r
                        } else {\r
                                sb.append(line).append('\n');\r
                        }\r
index 5118425efb8f2acefd1b65e999e715fe4550d21c..cd3e6efef987d53791aaef69bda170b6b24796d0 100644 (file)
@@ -15,6 +15,7 @@ import java.util.HashMap;
 import java.util.List;\r
 import java.util.Map;\r
 import java.util.Set;\r
+import java.util.concurrent.atomic.AtomicInteger;\r
 \r
 import org.eclipse.jgit.diff.DiffEntry;\r
 import org.eclipse.jgit.diff.DiffFormatter;\r
@@ -326,6 +327,17 @@ public class JGitUtils {
                return list;\r
        }\r
 \r
+       public static Map<ChangeType, AtomicInteger> getChangedPathsStats(List<PathChangeModel> paths) {\r
+               Map<ChangeType, AtomicInteger> stats = new HashMap<ChangeType, AtomicInteger>();\r
+               for (PathChangeModel path : paths) {\r
+                       if (!stats.containsKey(path.changeType)) {\r
+                               stats.put(path.changeType, new AtomicInteger(0));\r
+                       }\r
+                       stats.get(path.changeType).incrementAndGet();\r
+               }\r
+               return stats;\r
+       }\r
+\r
        public static enum DiffOutputType {\r
                PLAIN, GITWEB, GITBLIT;\r
 \r
index a2e51d112b6da40cf0939c00d1fd25c31daa809c..cb8953aebd5f20f91c0c35f37a9a88095620004d 100644 (file)
@@ -56,4 +56,10 @@ gb.modification = modification
 gb.deletion = deletion\r
 gb.rename = rename\r
 gb.stats = stats\r
-gb.markdown = markdown
\ No newline at end of file
+gb.markdown = markdown\r
+gb.changedFiles = changed files \r
+gb.filesAdded = {0} files added\r
+gb.filesModified = {0} files modified\r
+gb.filesDeleted = {0} files deleted\r
+gb.filesCopied = {0} files copied\r
+gb.filesRenamed = {0} files renamed
\ No newline at end of file
index a3a480b5da3c6e06f0790b60e9be88a46d7989e6..cc7404ad4724d9a492a9aa09a933508fd342faf4 100644 (file)
        <div class="page_nav2">\r
                <wicket:message key="gb.parent"></wicket:message>: <span wicket:id="parentLink">[parent link]</span> | <a wicket:id="patchLink"><wicket:message key="gb.patch"></wicket:message></a> | <a wicket:id="commitLink"><wicket:message key="gb.commit"></wicket:message></a>\r
        </div>  \r
+\r
+       <!-- commit legend -->\r
+       <div style="text-align:right;" wicket:id="commitLegend"></div>\r
        \r
        <!-- shortlog header -->\r
        <div class="header" wicket:id="shortlog">[shortlog header]</div>\r
 \r
        <!-- changed paths -->\r
-       <table style="margin-top:10px;border-top:1px solid #bbb;" class="pretty">\r
+       <table class="pretty">\r
                <tr wicket:id="changedPath">\r
-                       <td><span wicket:id="changeType">[change type]</span></td>              \r
+                       <td class="changeType"><span wicket:id="changeType">[change type]</span></td>           \r
                        <td class="path"><span wicket:id="pathName">[commit path]</span></td>                   \r
-                       <td>\r
+                       <td class="rightAlign">\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
                                </span>\r
index c6f1f7d31de4df5df9e5644c26170c6999c94ff5..0d4867ab3740735b9336e0aeb69e47a368634a1f 100644 (file)
@@ -20,6 +20,7 @@ import com.gitblit.wicket.LinkPanel;
 import com.gitblit.wicket.RepositoryPage;\r
 import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.models.PathModel.PathChangeModel;\r
+import com.gitblit.wicket.panels.CommitLegendPanel;\r
 \r
 public class CommitDiffPage extends RepositoryPage {\r
 \r
@@ -51,6 +52,7 @@ public class CommitDiffPage extends RepositoryPage {
 \r
                // changed paths list\r
                List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, commit);\r
+               add(new CommitLegendPanel("commitLegend", paths));\r
                ListDataProvider<PathChangeModel> pathsDp = new ListDataProvider<PathChangeModel>(paths);\r
                DataView<PathChangeModel> pathsView = new DataView<PathChangeModel>("changedPath", pathsDp) {\r
                        private static final long serialVersionUID = 1L;\r
index 87547fca80e2d77a5c564787004ad98755f33576..2e1f47c4d3200700fca1cef6e049cc376bfe3a4f 100644 (file)
        \r
        <!-- full message -->\r
        <div class="commit_message" wicket:id="fullMessage">[commit message]</div>\r
+\r
+       <!--  commit legend -->\r
+       <div style="text-align:right;" wicket:id="commitLegend"></div>\r
+       \r
+       <!-- header -->\r
+       <div class="header"><wicket:message key="gb.changedFiles">[changed files]</wicket:message></div>\r
        \r
        <!-- changed paths -->\r
-       <table style="border-top:1px solid #bbb;" class="pretty">\r
+       <table class="pretty">\r
                <tr wicket:id="changedPath">\r
-                       <td><span wicket:id="changeType">[change type]</span></td>\r
+                       <td class="changeType"><span wicket:id="changeType">[change type]</span></td>\r
                        <td class="path"><span wicket:id="pathName">[commit path]</span></td>                   \r
-                       <td>\r
+                       <td class="rightAlign">\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
                                </span>\r
index 04065233c97561b0478cd39265bc15090ee2e1bb..cae500f6e64c5906ae60a57ea3634962725d4652 100644 (file)
@@ -19,6 +19,7 @@ import com.gitblit.wicket.LinkPanel;
 import com.gitblit.wicket.RepositoryPage;\r
 import com.gitblit.wicket.WicketUtils;\r
 import com.gitblit.wicket.models.PathModel.PathChangeModel;\r
+import com.gitblit.wicket.panels.CommitLegendPanel;\r
 \r
 public class CommitPage extends RepositoryPage {\r
 \r
@@ -54,7 +55,7 @@ public class CommitPage extends RepositoryPage {
                add(WicketUtils.createTimestampLabel("commitAuthorDate", c.getAuthorIdent().getWhen(), getTimeZone()));\r
 \r
                // committer\r
-               add(createPersonPanel("commitCommitter", c.getCommitterIdent(), SearchType.COMMITTER));         \r
+               add(createPersonPanel("commitCommitter", c.getCommitterIdent(), SearchType.COMMITTER));\r
                add(WicketUtils.createTimestampLabel("commitCommitterDate", c.getCommitterIdent().getWhen(), getTimeZone()));\r
 \r
                add(new Label("commitId", c.getName()));\r
@@ -78,7 +79,8 @@ public class CommitPage extends RepositoryPage {
                addFullText("fullMessage", c.getFullMessage(), true);\r
 \r
                // changed paths list\r
-               List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, c);\r
+               List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, c); \r
+               add(new CommitLegendPanel("commitLegend", paths));\r
                ListDataProvider<PathChangeModel> pathsDp = new ListDataProvider<PathChangeModel>(paths);\r
                DataView<PathChangeModel> pathsView = new DataView<PathChangeModel>("changedPath", pathsDp) {\r
                        private static final long serialVersionUID = 1L;\r
@@ -107,7 +109,7 @@ public class CommitPage extends RepositoryPage {
                };\r
                add(pathsView);\r
        }\r
-       \r
+\r
        @Override\r
        protected String getPageName() {\r
                return getString("gb.commit");\r
index 56e298040016ed8d639b8cccbeff820f76b56be3..b61f7f95c208200d5ac8c1b499efbbd37367b567 100644 (file)
@@ -26,7 +26,7 @@
        <div class="header"><wicket:message key="gb.ticketComments">comments</wicket:message></div>\r
        \r
        <!-- comments -->\r
-       <table style="width:100%;" class="comments">\r
+       <table class="comments">\r
                <tbody>\r
                        <tr valign="top" wicket:id="comment">\r
                        <td><span class="author" wicket:id="commentAuthor">[comment author]</span><br/>\r
index eb74b12508b1338b59290c7817632aa25a849dbb..0c865f33c81ed65f479910adf3f986d556978dd2 100644 (file)
@@ -14,7 +14,7 @@
        <div style="margin-top:5px;" class="header" wicket:id="header">[header]</div>\r
        \r
        <!-- tickets -->        \r
-       <table style="width:100%" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="ticket">\r
                        <td style="padding:0; margin:0;"><div wicket:id="ticketState">[ticket state]</div></td>\r
index 76c3e09f23a43ac487a4d8de3d941952f9654b61..497003a5763ecc6eb3f0532d2cc523507f863d97 100644 (file)
@@ -10,7 +10,7 @@
        <!-- header -->\r
        <div class="header" wicket:id="branches">[branches header]</div>        \r
        \r
-       <table style="width:100%;" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="branch">\r
                        <td class="date"><span wicket:id="branchDate">[branch date]</span></td>\r
diff --git a/src/com/gitblit/wicket/panels/CommitLegendPanel.html b/src/com/gitblit/wicket/panels/CommitLegendPanel.html
new file mode 100644 (file)
index 0000000..7106362
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml"  \r
+      xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd"  \r
+      xml:lang="en"  \r
+      lang="en"> \r
+\r
+<wicket:panel>\r
+       <div class="commitLegend" wicket:id="legend">\r
+               <span wicket:id="changeType">[change type]</span>\r
+               <span wicket:id="description">[description]</span>\r
+       </div>  \r
+</wicket:panel>\r
+</html>
\ No newline at end of file
diff --git a/src/com/gitblit/wicket/panels/CommitLegendPanel.java b/src/com/gitblit/wicket/panels/CommitLegendPanel.java
new file mode 100644 (file)
index 0000000..9833d64
--- /dev/null
@@ -0,0 +1,61 @@
+package com.gitblit.wicket.panels;\r
+\r
+import java.text.MessageFormat;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Map;\r
+import java.util.concurrent.atomic.AtomicInteger;\r
+\r
+import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.panel.Panel;\r
+import org.apache.wicket.markup.repeater.Item;\r
+import org.apache.wicket.markup.repeater.data.DataView;\r
+import org.apache.wicket.markup.repeater.data.ListDataProvider;\r
+import org.eclipse.jgit.diff.DiffEntry.ChangeType;\r
+\r
+import com.gitblit.utils.JGitUtils;\r
+import com.gitblit.wicket.WicketUtils;\r
+import com.gitblit.wicket.models.PathModel.PathChangeModel;\r
+\r
+public class CommitLegendPanel extends Panel {\r
+\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       public CommitLegendPanel(String id, List<PathChangeModel> paths) {\r
+               super(id);\r
+               final Map<ChangeType, AtomicInteger> stats = JGitUtils.getChangedPathsStats(paths);             \r
+               ListDataProvider<ChangeType> legendDp = new ListDataProvider<ChangeType>(new ArrayList<ChangeType>(stats.keySet()));\r
+               DataView<ChangeType> legendsView = new DataView<ChangeType>("legend", legendDp) {\r
+                       private static final long serialVersionUID = 1L;\r
+\r
+                       public void populateItem(final Item<ChangeType> item) {\r
+                               ChangeType entry = item.getModelObject();\r
+\r
+                               Label changeType = new Label("changeType", "");\r
+                               WicketUtils.setChangeTypeCssClass(changeType, entry);\r
+                               item.add(changeType);\r
+                               int count = stats.get(entry).intValue();\r
+                               String description  = "";\r
+                               switch(entry) {\r
+                               case ADD:\r
+                                       description = MessageFormat.format(getString("gb.filesAdded"), count);\r
+                                       break;\r
+                               case MODIFY:\r
+                                       description = MessageFormat.format(getString("gb.filesModified"), count);\r
+                                       break;\r
+                               case DELETE:\r
+                                       description = MessageFormat.format(getString("gb.filesDeleted"), count);\r
+                                       break;\r
+                               case COPY:\r
+                                       description = MessageFormat.format(getString("gb.filesCopied"), count);\r
+                                       break;\r
+                               case RENAME:\r
+                                       description = MessageFormat.format(getString("gb.filesRenamed"), count);\r
+                                       break;\r
+                               }                               \r
+                               item.add(new Label("description", description));\r
+                       }\r
+               };\r
+               add(legendsView);\r
+       }\r
+}
\ No newline at end of file
index ad0ff2f8ab389fbc855add577561ba2f6532e36d..1ed1b58395827b56eb7553261a587a05954113e9 100644 (file)
        <!-- breadcrumbs -->\r
        <div wicket:id="breadcrumbs">[breadcrumbs]</div>\r
                \r
-       <table style="width:100%" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="commit">\r
                        <td class="date"><span wicket:id="commitDate">[commit date]</span></td>\r
+                       <td><img wicket:id="commitIcon" /></td>\r
                        <td class="author"><span wicket:id="commitAuthor">[commit author]</span></td>\r
-                       <td><span wicket:id="commitShortMessage">[commit short message]</span></td>\r
-                       <td class="rightAlign"><span wicket:id="commitRefs">[commit refs]</span></td>                   \r
+                       <td><div class="references" wicket:id="commitRefs">[commit refs]</div><span wicket:id="commitShortMessage">[commit short message]</span></td>\r
                        <td class="rightAlign">\r
                                <span wicket:id="historyLinks">[history links]</span>\r
                                </td>\r
index e68fc1abf0acf385b30b4cf70f2ccb93f64ee485..da2699898976bcded93c7bbda5415e801aa6a7d3 100644 (file)
@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;\r
 \r
 import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.image.ContextImage;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
 import org.apache.wicket.markup.html.panel.Fragment;\r
 import org.apache.wicket.markup.repeater.Item;\r
@@ -104,6 +105,13 @@ public class HistoryPanel extends BasePanel {
                                setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);\r
                                item.add(authorLink);\r
                                \r
+                               // merge icon\r
+                               if (entry.getParentCount() > 1) {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/commit_merge_16x16.png"));\r
+                               } else {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/blank.png"));\r
+                               }\r
+\r
                                String shortMessage = entry.getShortMessage();\r
                                String trimmedMessage = StringUtils.trimShortLog(shortMessage);\r
                                LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName()));\r
index 838b28c48008e8b0f33f373cff433e9d14ae4ff8..1a6f6f43da41fc9e68d13915adbc41283ab27182 100644 (file)
        <!-- header --> \r
        <div class="header" wicket:id="header">[log header]</div>\r
                \r
-       <table style="width:100%" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="commit">\r
                        <td class="date"><span wicket:id="commitDate">[commit date]</span></td>\r
                        <td class="author"><span wicket:id="commitAuthor">[commit author]</span></td>\r
-                       <td><span wicket:id="commitShortMessage">[commit short message]</span></td>\r
-                       <td class="rightAlign"><span wicket:id="commitRefs">[commit refs]</span></td>                   \r
+                       <td><img wicket:id="commitIcon" /></td>\r
+                       <td><div class="references" wicket:id="commitRefs">[commit refs]</div><span wicket:id="commitShortMessage">[commit short message]</span></td>\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
index 04575115762cdc04d6d544dc7cdbda3829ae9732..8895dbcbe6e72da7fd09d19f3899ea8c1e55b199 100644 (file)
@@ -5,6 +5,7 @@ import java.util.List;
 import java.util.Map;\r
 \r
 import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.image.ContextImage;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
 import org.apache.wicket.markup.repeater.Item;\r
 import org.apache.wicket.markup.repeater.data.DataView;\r
@@ -84,6 +85,14 @@ public class LogPanel extends BasePanel {
                                setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);\r
                                item.add(authorLink);\r
 \r
+                               // merge icon\r
+                               if (entry.getParentCount() > 1) {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/commit_merge_16x16.png"));\r
+                               } else {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/blank.png"));\r
+                               }\r
+                               \r
+                               // short message\r
                                String shortMessage = entry.getShortMessage();\r
                                String trimmedMessage = StringUtils.trimShortLog(shortMessage);\r
                                LinkPanel shortlog = new LinkPanel("commitShortMessage", "list subject", trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(repositoryName, entry.getName()));\r
index a99fd7e48842c3c46851673c8b97a8401e11e3c7..f8994b9d00336654bbf7f88de775f10a31c66e80 100644 (file)
        <!-- header --> \r
        <div class="header" wicket:id="header">[search header]</div>\r
 \r
-       <table style="width:100%" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                        <tr wicket:id="commit">\r
                        <td class="date"><span wicket:id="commitDate">[commit date]</span></td>\r
                        <td class="author"><span wicket:id="commitAuthor">[commit author]</span></td>\r
-                       <td><span wicket:id="commitShortMessage">[commit short message]</span></td>\r
-                       <td class="rightAlign"><span wicket:id="commitRefs">[commit refs]</span></td>                   \r
+                       <td><img wicket:id="commitIcon" /></td>\r
+                       <td><div class="references" wicket:id="commitRefs">[commit refs]</div><span wicket:id="commitShortMessage">[commit short message]</span></td>\r
                        <td class="rightAlign">\r
                                <span class="link">\r
                                                <a wicket:id="commit"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="commitdiff"><wicket:message key="gb.commitdiff"></wicket:message></a> | <a wicket:id="tree"><wicket:message key="gb.tree"></wicket:message></a>\r
index 6f4858be8e5accd41fce3e44c7d30d3647fd8000..315d47607f52e2e3cab9c91d92e06950de040e05 100644 (file)
@@ -4,6 +4,7 @@ import java.util.Date;
 import java.util.List;\r
 import java.util.Map;\r
 \r
+import org.apache.wicket.markup.html.image.ContextImage;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
 import org.apache.wicket.markup.repeater.Item;\r
 import org.apache.wicket.markup.repeater.data.DataView;\r
@@ -74,6 +75,13 @@ public class SearchPanel extends BasePanel {
                                setPersonSearchTooltip(authorLink, author, SearchType.AUTHOR);\r
                                item.add(authorLink);\r
 \r
+                               // merge icon\r
+                               if (entry.getParentCount() > 1) {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/commit_merge_16x16.png"));\r
+                               } else {\r
+                                       item.add(new ContextImage("commitIcon", "/com/gitblit/wicket/resources/blank.png"));\r
+                               }\r
+\r
                                String shortMessage = entry.getShortMessage();\r
                                String trimmedMessage = StringUtils.trimShortLog(shortMessage);\r
                                // TODO highlight matches\r
index 278b7e9b3d2869e5772ade4fd5b9fc4efecd849d..09019cf8b18318be30e393808dc1dc982c5d151d 100644 (file)
@@ -9,7 +9,7 @@
 \r
        <!-- tags -->\r
        <div class="header" wicket:id="header">[tags header]</div>      \r
-       <table style="width:100%" class="pretty">\r
+       <table class="pretty">\r
                <tbody>\r
                <tr wicket:id="tag">\r
                        <td class="date"><span wicket:id="tagDate">[tag date]</span></td>\r
diff --git a/src/com/gitblit/wicket/resources/background.png b/src/com/gitblit/wicket/resources/background.png
new file mode 100644 (file)
index 0000000..6f75e43
Binary files /dev/null and b/src/com/gitblit/wicket/resources/background.png differ
diff --git a/src/com/gitblit/wicket/resources/commit_branch_16x16.png b/src/com/gitblit/wicket/resources/commit_branch_16x16.png
new file mode 100644 (file)
index 0000000..d1fe717
Binary files /dev/null and b/src/com/gitblit/wicket/resources/commit_branch_16x16.png differ
diff --git a/src/com/gitblit/wicket/resources/commit_divide_16x16.png b/src/com/gitblit/wicket/resources/commit_divide_16x16.png
new file mode 100644 (file)
index 0000000..e611bd5
Binary files /dev/null and b/src/com/gitblit/wicket/resources/commit_divide_16x16.png differ
diff --git a/src/com/gitblit/wicket/resources/commit_join_16x16.png b/src/com/gitblit/wicket/resources/commit_join_16x16.png
new file mode 100644 (file)
index 0000000..51e7de9
Binary files /dev/null and b/src/com/gitblit/wicket/resources/commit_join_16x16.png differ
diff --git a/src/com/gitblit/wicket/resources/commit_merge_16x16.png b/src/com/gitblit/wicket/resources/commit_merge_16x16.png
new file mode 100644 (file)
index 0000000..5a066e5
Binary files /dev/null and b/src/com/gitblit/wicket/resources/commit_merge_16x16.png differ
diff --git a/src/com/gitblit/wicket/resources/commit_up_16x16.png b/src/com/gitblit/wicket/resources/commit_up_16x16.png
new file mode 100644 (file)
index 0000000..30d005f
Binary files /dev/null and b/src/com/gitblit/wicket/resources/commit_up_16x16.png differ
index eff6f2af14758ff3e9276d117c174f6125651726..fa78cec85d0653f0b8ebce7540eaf71403b08a35 100644 (file)
@@ -20,6 +20,7 @@ body {
     margin-left: auto;\r
     margin-top: none;\r
     padding: 0px;\r
+    background: url(background.png) repeat-x scroll 0 0 #FFFFFF;\r
 }\r
 \r
 pre, code, pre.prettyprint, pre.plainprint {\r
@@ -110,7 +111,7 @@ div.page_header {
        font-weight: bold;\r
        font-size: 150%;\r
        color: #888;\r
-       background-color: #ffffff;\r
+       background: transparent;\r
 }\r
 \r
 div.page_header span { \r
@@ -313,6 +314,7 @@ div.diff table th {
        color: #999;\r
        padding-left: 5px;\r
        padding-right: 5px;\r
+       width: 30px;\r
 }\r
 \r
 div.diff table th.header {\r
@@ -337,6 +339,10 @@ div.diff table td {
        background-color: #fbfbfb;\r
 }\r
 \r
+td.changeType {\r
+       width: 15px;\r
+}\r
+\r
 span.addition, span.modification, span.deletion, span.rename {\r
        border: 1px solid #888;\r
        float: left;\r
@@ -362,6 +368,22 @@ span.rename {
        background-color: #8888ff;\r
 }\r
 \r
+div.commitLegend {\r
+       float: right;\r
+       padding: 0.4em;\r
+       vertical-align:top;\r
+}\r
+\r
+div.commitLegend span {\r
+       font-size: 0.9em;\r
+       vertical-align: top;\r
+}\r
+\r
+div.references {\r
+       float: right;\r
+       text-align: right;\r
+}\r
+\r
 a.list {\r
        text-decoration: none;\r
        color: #000000;\r
@@ -401,6 +423,9 @@ table.pretty, table.repositories, table.comments {
        border-right: 1px solid #bbb;   \r
 }\r
 \r
+table.pretty, table.comments, table.repositories {\r
+       width:100%;\r
+}\r
 table.pretty td {\r
        padding: 2px 4px;\r
 }\r
@@ -410,10 +435,6 @@ table.comments td {
        line-height: 17px;\r
 }\r
 \r
-table.repositories {\r
-       width:100%;     \r
-}\r
-\r
 table.repositories th {\r
        background-color:#D2C3AF;\r
        padding: 4px;\r
@@ -509,13 +530,13 @@ td.rightAlign {
 }\r
 \r
 span .tagRef, span .headRef, span .remoteRef, span .otherRef { \r
-       padding: 0px 4px;\r
+       padding: 0px 3px;\r
        margin-right:2px;\r
        font-family: sans-serif;\r
        font-size: 9px;\r
        font-weight: normal;\r
        border: 1px solid;\r
-       color: black;\r
+       color: black;   \r
 }\r
 \r
 span .tagRef a span, span .headRef a span, span .remoteRef a span, span .otherRef a span {\r
@@ -524,11 +545,11 @@ span .tagRef a span, span .headRef a span, span .remoteRef a span, span .otherRe
 \r
 span .tagRef a, span .headRef a, span .remoteRef a, span .otherRef a {\r
        text-decoration: none;\r
-       color: black;\r
+       color: black !important;\r
 }\r
 \r
 span .tagRef a:hover, span .headRef a:hover, span .remoteRef a:hover, span .otherRef a:hover {\r
-       color: black;\r
+       color: black !important;\r
        text-decoration: underline;\r
 }\r
 \r