James Moger
2015-11-22 ed552ba47c02779c270ffd62841d6d1048dade70
src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java
@@ -51,23 +51,26 @@
      final boolean showSwatch = app().settings().getBoolean(Keys.web.repositoryListSwatches, true);
      final boolean showSize = app().settings().getBoolean(Keys.web.showRepositorySizes, true);
      // repository swatch
      Component swatch;
      if (entry.isBare) {
         swatch = new Label("repositorySwatch", " ").setEscapeModelStrings(false);
      } else {
         swatch = new Label("repositorySwatch", "!");
         WicketUtils.setHtmlTooltip(swatch, localizer.getString("gb.workingCopyWarning", parent));
      }
      WicketUtils.setCssBackground(swatch, entry.toString());
      add(swatch);
      swatch.setVisible(showSwatch);
      PageParameters pp = WicketUtils.newRepositoryParameter(entry.name);
      add(new LinkPanel("repositoryName", "list", StringUtils.getRelativePath(entry.projectPath,
            StringUtils.stripDotGit(entry.name)), SummaryPage.class, pp));
      add(new Label("repositoryDescription", entry.description).setVisible(!StringUtils
            .isEmpty(entry.description)));
      Fragment iconFragment;
      if (entry.isMirror) {
         iconFragment = new Fragment("repoIcon", "mirrorIconFragment", this);
      } else if (entry.isFork()) {
         iconFragment = new Fragment("repoIcon", "forkIconFragment", this);
      } else if (entry.isBare) {
         iconFragment = new Fragment("repoIcon", "repoIconFragment", this);
      } else {
         iconFragment = new Fragment("repoIcon", "cloneIconFragment", this);
      }
      if (showSwatch) {
         WicketUtils.setCssStyle(iconFragment, "color:" + StringUtils.getColor(entry.toString()));
      }
      add(iconFragment);
      if (StringUtils.isEmpty(entry.originRepository)) {
         add(new Label("originRepository").setVisible(false));
@@ -84,13 +87,7 @@
         add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false));
      }
      if (entry.isMirror) {
         add(WicketUtils.newImage("mirrorIcon", "mirror_16x16.png", localizer.getString("gb.isMirror", parent)));
      } else {
         add(WicketUtils.newClearPixel("mirrorIcon").setVisible(false));
      }
      if (entry.isFrozen) {
      if (!entry.isMirror && entry.isFrozen) {
         add(WicketUtils.newImage("frozenIcon", "cold_16x16.png", localizer.getString("gb.isFrozen", parent)));
      } else {
         add(WicketUtils.newClearPixel("frozenIcon").setVisible(false));
@@ -161,6 +158,7 @@
         add(new Label("repositorySize", localizer.getString("gb.empty", parent)).setEscapeModelStrings(false));
      }
      add(new ExternalLink("syndication", SyndicationServlet.asLink("", entry.name, null, 0)));
      add(new ExternalLink("syndication", SyndicationServlet.asLink(getRequest()
            .getRelativePathPrefixToContextRoot(), entry.name, null, 0)));
   }
}