]> source.dussan.org Git - gitblit.git/commitdiff
Display fork indicator in Manager
authorJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:39:52 +0000 (17:39 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:39:52 +0000 (17:39 -0400)
build.xml
src/com/gitblit/client/IndicatorsRenderer.java

index 6ad0e46d31896c33c8d5538d1c3b268e7de597bd..7231341725f203d5b14e4c77c4ab26d5fd0c1a80 100644 (file)
--- a/build.xml
+++ b/build.xml
                        <resource file="${basedir}/resources/search-icon.png" />\r
                        <resource file="${basedir}/resources/commit_changes_16x16.png" />\r
                        <resource file="${basedir}/resources/commit_merge_16x16.png" />\r
+                       <resource file="${basedir}/resources/commit_divide_16x16.png" />\r
                        <resource file="${basedir}/resources/blank.png" />\r
                        <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp.properties" />\r
                        <resource file="${basedir}/src/com/gitblit/wicket/GitBlitWebApp_ja.properties" />\r
index 3622db7aa64deea45c5f13c26d94238ccb1d67fa..59ce6dd1675296598089455b2cd5963d038a711c 100644 (file)
@@ -53,6 +53,8 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser
        private final ImageIcon frozenIcon;\r
 \r
        private final ImageIcon federatedIcon;\r
+       \r
+       private final ImageIcon forkIcon;\r
 \r
        public IndicatorsRenderer() {\r
                super(new FlowLayout(FlowLayout.RIGHT, 1, 0));\r
@@ -64,6 +66,7 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser
                doxIcon = new ImageIcon(getClass().getResource("/book_16x16.png"));\r
                frozenIcon = new ImageIcon(getClass().getResource("/cold_16x16.png"));\r
                federatedIcon = new ImageIcon(getClass().getResource("/federated_16x16.png"));\r
+               forkIcon = new ImageIcon(getClass().getResource("/commit_divide_16x16.png"));\r
        }\r
 \r
        @Override\r
@@ -77,6 +80,11 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser
                if (value instanceof RepositoryModel) {\r
                        StringBuilder tooltip = new StringBuilder();\r
                        RepositoryModel model = (RepositoryModel) value;\r
+                       if (model.isFork()) {\r
+                               JLabel icon = new JLabel(forkIcon);\r
+                               tooltip.append(Translation.get("gb.isFork")).append("<br/>");\r
+                               add(icon);\r
+                       }\r
                        if (model.useTickets) {\r
                                JLabel icon = new JLabel(tixIcon);\r
                                tooltip.append(Translation.get("gb.tickets")).append("<br/>");\r