From 1c221573789f0673995cfec03e05af936a4ff3b3 Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Fri, 03 Feb 2012 23:32:41 -0500 Subject: [PATCH] Show a ! in the swatch of a repository with a working copy (issue 49) --- src/com/gitblit/wicket/panels/RepositoriesPanel.java | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/com/gitblit/wicket/panels/RepositoriesPanel.java index 4007a97..4dcdab4 100644 --- a/src/com/gitblit/wicket/panels/RepositoriesPanel.java +++ b/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); -- Gitblit v1.9.1