summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/04_releases.mkd2
-rw-r--r--resources/bootstrap.gb.css6
-rw-r--r--src/com/gitblit/wicket/panels/RepositoriesPanel.java10
3 files changed, 14 insertions, 4 deletions
diff --git a/docs/04_releases.mkd b/docs/04_releases.mkd
index 1cd966e3..32769762 100644
--- a/docs/04_releases.mkd
+++ b/docs/04_releases.mkd
@@ -11,6 +11,8 @@
#### additions
+- On the Repositories page show a bang *!* character in the color swatch of a repository with a working copy (issue 49)
+Push requests to these repositories will be rejected.
- New setting to prevent display/serving non-bare repositories
**New:** *git.onlyAccessBareRepositories = false*
- Allow relinking HEAD to a branch or a tag (Github/plm)
diff --git a/resources/bootstrap.gb.css b/resources/bootstrap.gb.css
index 7df37430..7ff8fa87 100644
--- a/resources/bootstrap.gb.css
+++ b/resources/bootstrap.gb.css
@@ -219,9 +219,11 @@ span.link em, div.link span em {
}
span.repositorySwatch {
- border-radius: 3px;
- padding: 2px 5px;
+ border-radius: 3px;
+ padding: 1px 4px 2px 4px;
color: #ffffff;
+ font-weight: bold;
+ vertical-align: center;
}
span.repositorySwatch a {
color: inherit;
diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
index 4007a979..4dcdab48 100644
--- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java
+++ b/src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -148,9 +148,15 @@ public class RepositoriesPanel extends BasePanel {
if (!StringUtils.isEmpty(currGroupName) && (repoName.indexOf('/') > -1)) {
repoName = repoName.substring(currGroupName.length() + 1);
}
-
+
// repository swatch
- Component swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
+ Component swatch;
+ if (entry.isBare){
+ swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
+ } else {
+ swatch = new Label("repositorySwatch", "!");
+ WicketUtils.setHtmlTooltip(swatch, "This repository has a working copy and can not receive pushes");
+ }
WicketUtils.setCssBackground(swatch, entry.toString());
row.add(swatch);
swatch.setVisible(showSwatch);