James Moger
2013-09-30 699e71e76b15081baf746c6ce9c9144f7e5f1ff9
src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
@@ -17,7 +17,6 @@
import java.util.List;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
@@ -35,13 +34,13 @@
   public CompressedDownloadsPanel(String id, final String baseUrl, final String repositoryName, final String objectId, final String path) {
      super(id);
      List<String> types = GitBlit.getStrings(Keys.web.compressedDownloads);
      if (types.isEmpty()) {
         types.add(Format.zip.name());
         types.add(Format.gz.name());
      }
      ListDataProvider<String> refsDp = new ListDataProvider<String>(types);
      DataView<String> refsView = new DataView<String>("compressedLinks", refsDp) {
         private static final long serialVersionUID = 1L;
@@ -52,15 +51,16 @@
            super.onBeforeRender();
            counter = 0;
         }
         @Override
         public void populateItem(final Item<String> item) {
            String compressionType = item.getModelObject();
            Format format = Format.fromName(compressionType);
            String href = DownloadZipServlet.asLink(baseUrl, repositoryName,
                  objectId, path, format);
            Component c = new LinkPanel("compressedLink", null, format.name(), href);
            LinkPanel c = new LinkPanel("compressedLink", null, format.name(), href);
            c.setNoFollow();
            item.add(c);
            Label lb = new Label("linkSep", "|");
            lb.setVisible(counter > 0);
@@ -71,7 +71,7 @@
         }
      };
      add(refsView);
      setVisible(GitBlit.getBoolean(Keys.web.allowZipDownloads, true));
   }
}