Browse Source

Show a ! in the swatch of a repository with a working copy (issue 49)

tags/v0.9.0
James Moger 12 years ago
parent
commit
1c22157378

+ 2
- 0
docs/04_releases.mkd View File

@@ -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)

+ 4
- 2
resources/bootstrap.gb.css View File

@@ -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;

+ 8
- 2
src/com/gitblit/wicket/panels/RepositoriesPanel.java View File

@@ -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);

Loading…
Cancel
Save