James Moger
2012-02-03 1c221573789f0673995cfec03e05af936a4ff3b3
Show a ! in the swatch of a repository with a working copy (issue-49)
3 files modified
18 ■■■■ changed files
docs/04_releases.mkd 2 ●●●●● patch | view | raw | blame | history
resources/bootstrap.gb.css 6 ●●●●● patch | view | raw | blame | history
src/com/gitblit/wicket/panels/RepositoriesPanel.java 10 ●●●● patch | view | raw | blame | history
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)
resources/bootstrap.gb.css
@@ -219,9 +219,11 @@
}
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;
src/com/gitblit/wicket/panels/RepositoriesPanel.java
@@ -148,9 +148,15 @@
                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);