]> source.dussan.org Git - gitblit.git/commitdiff
Implemented support for toggling Repository.allowForks in Manager
authorJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:24:56 +0000 (17:24 -0400)
committerJames Moger <james.moger@gitblit.com>
Wed, 3 Oct 2012 21:24:56 +0000 (17:24 -0400)
src/com/gitblit/client/EditRepositoryDialog.java

index 8ce076ec056f35e50a4438a21816c6249b4e7c71..840281bd77fecba45f10d03188dcbcadf19c7bc2 100644 (file)
@@ -105,6 +105,8 @@ public class EditRepositoryDialog extends JDialog {
        private JRadioButton allowAuthenticated;\r
        \r
        private JRadioButton allowNamed;\r
+       \r
+       private JCheckBox allowForks;\r
 \r
        private JComboBox federationStrategy;\r
 \r
@@ -228,6 +230,8 @@ public class EditRepositoryDialog extends JDialog {
                JPanel authorizationPanel = new JPanel(new GridLayout(0, 1));\r
                authorizationPanel.add(allowAuthenticated);\r
                authorizationPanel.add(allowNamed);\r
+               \r
+               allowForks = new JCheckBox(Translation.get("gb.allowForks"), anRepository.allowForks);\r
 \r
                // federation strategies - remove ORIGIN choice if this repository has\r
                // no origin.\r
@@ -262,17 +266,22 @@ public class EditRepositoryDialog extends JDialog {
                                                skipSizeCalculation));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.skipSummaryMetrics"),\r
                                skipSummaryMetrics));\r
-               fieldsPanel\r
-                               .add(newFieldPanel(Translation.get("gb.isFrozen"), isFrozen));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.mailingLists"),\r
                                mailingListsField));\r
 \r
+               JPanel clonePushPanel = new JPanel(new GridLayout(0, 1));\r
+               clonePushPanel\r
+               .add(newFieldPanel(Translation.get("gb.isFrozen"), isFrozen));\r
+               clonePushPanel\r
+               .add(newFieldPanel(Translation.get("gb.allowForks"), allowForks));\r
+\r
                usersPalette = new JPalette<String>();\r
                JPanel northAccessPanel = new JPanel(new BorderLayout(5, 5));\r
                northAccessPanel.add(newFieldPanel(Translation.get("gb.accessRestriction"),\r
                                accessRestriction), BorderLayout.NORTH);\r
                northAccessPanel.add(newFieldPanel(Translation.get("gb.authorizationControl"),\r
                                authorizationPanel), BorderLayout.CENTER);\r
+               northAccessPanel.add(clonePushPanel, BorderLayout.SOUTH);\r
 \r
                JPanel accessPanel = new JPanel(new BorderLayout(5, 5));\r
                accessPanel.add(northAccessPanel, BorderLayout.NORTH);\r
@@ -472,7 +481,9 @@ public class EditRepositoryDialog extends JDialog {
                repository.showReadme = showReadme.isSelected();\r
                repository.skipSizeCalculation = skipSizeCalculation.isSelected();\r
                repository.skipSummaryMetrics = skipSummaryMetrics.isSelected();\r
+               \r
                repository.isFrozen = isFrozen.isSelected();\r
+               repository.allowForks = allowForks.isSelected();\r
 \r
                String ml = mailingListsField.getText();\r
                if (!StringUtils.isEmpty(ml)) {\r