summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-09-30 09:30:04 -0400
committerJames Moger <james.moger@gitblit.com>2013-09-30 10:11:28 -0400
commit699e71e76b15081baf746c6ce9c9144f7e5f1ff9 (patch)
tree4a9ea25c258caeae3dea4bc1de809f47bc615d81 /src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
parent235ad956fa84cad4fac1b2e69a0c9e4f50376ea3 (diff)
downloadgitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.tar.gz
gitblit-699e71e76b15081baf746c6ce9c9144f7e5f1ff9.zip
Trim trailing whitespace and organize imports
Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java')
-rw-r--r--src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
index 122ae55e..d8a4a106 100644
--- a/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
+++ b/src/main/java/com/gitblit/wicket/panels/CompressedDownloadsPanel.java
@@ -17,7 +17,6 @@ package com.gitblit.wicket.panels;
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 class CompressedDownloadsPanel extends Panel {
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,12 +51,12 @@ public class CompressedDownloadsPanel extends Panel {
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);
LinkPanel c = new LinkPanel("compressedLink", null, format.name(), href);
@@ -72,7 +71,7 @@ public class CompressedDownloadsPanel extends Panel {
}
};
add(refsView);
-
+
setVisible(GitBlit.getBoolean(Keys.web.allowZipDownloads, true));
}
} \ No newline at end of file