]> source.dussan.org Git - gitblit.git/commitdiff
Show a ! in the swatch of a repository with a working copy (issue 49)
authorJames Moger <james.moger@gitblit.com>
Sat, 4 Feb 2012 04:32:41 +0000 (23:32 -0500)
committerJames Moger <james.moger@gitblit.com>
Sat, 4 Feb 2012 04:32:41 +0000 (23:32 -0500)
docs/04_releases.mkd
resources/bootstrap.gb.css
src/com/gitblit/wicket/panels/RepositoriesPanel.java

index 1cd966e352ccb1df8b0eba6f1c516dd8d971c733..32769762cf386c4082883034496a70970e1a4547 100644 (file)
@@ -11,6 +11,8 @@
 \r
 #### additions\r
 \r
+- On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)  \r
+Push requests to these repositories will be rejected.\r
 - New setting to prevent display/serving non-bare repositories  \r
     **New:** *git.onlyAccessBareRepositories = false*\r
 - Allow relinking HEAD to a branch or a tag (Github/plm)\r
index 7df374307398fcb1b5840f7ac73e37b2d183bbeb..7ff8fa87ddb0d3e7837c3a9a5203eee5eb4bdc1a 100644 (file)
@@ -219,9 +219,11 @@ span.link em, div.link span em {
 }\r
 \r
 span.repositorySwatch {\r
-       border-radius: 3px;\r
-       padding: 2px 5px;       \r
+       border-radius: 3px;     \r
+       padding: 1px 4px 2px 4px;       \r
        color: #ffffff;\r
+       font-weight: bold;\r
+       vertical-align: center;\r
 }\r
 span.repositorySwatch a {\r
        color: inherit;\r
index 4007a97956eaeeafb83d094aec3cf3aeb68cee64..4dcdab48b5a942ce1af50996e6c34db17b04ad43 100644 (file)
@@ -148,9 +148,15 @@ public class RepositoriesPanel extends BasePanel {
                                if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {\r
                                        repoName = repoName.substring(currGroupName.length() + 1);\r
                                }\r
-                               \r
+                                                               \r
                                // repository swatch\r
-                               Component swatch = new Label("repositorySwatch", "&nbsp;").setEscapeModelStrings(false);\r
+                               Component swatch;\r
+                               if (entry.isBare){\r
+                                       swatch = new Label("repositorySwatch", "&nbsp;").setEscapeModelStrings(false);\r
+                               } else {\r
+                                       swatch = new Label("repositorySwatch", "!");\r
+                                       WicketUtils.setHtmlTooltip(swatch, "This repository has a working copy and can not receive pushes");\r
+                               }\r
                                WicketUtils.setCssBackground(swatch, entry.toString());\r
                                row.add(swatch);\r
                                swatch.setVisible(showSwatch);\r