summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/pages
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-01-11 23:53:32 -0500
committerJames Moger <james.moger@gitblit.com>2013-01-11 23:53:32 -0500
commite4e68298c2f55c93dc2464e26a24b119a649e642 (patch)
tree80f3094fb062fc26be705fd8f5c86fa03cc97aea /src/com/gitblit/wicket/pages
parent5316d20e861640867d10405b25cfe75aeca0a34c (diff)
downloadgitblit-e4e68298c2f55c93dc2464e26a24b119a649e642.tar.gz
gitblit-e4e68298c2f55c93dc2464e26a24b119a649e642.zip
Show indicators for Sparkleshared repositories
Diffstat (limited to 'src/com/gitblit/wicket/pages')
-rw-r--r--src/com/gitblit/wicket/pages/RawPage.java4
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.html2
-rw-r--r--src/com/gitblit/wicket/pages/RepositoryPage.java8
3 files changed, 11 insertions, 3 deletions
diff --git a/src/com/gitblit/wicket/pages/RawPage.java b/src/com/gitblit/wicket/pages/RawPage.java
index 7f6ed139..28e8bae2 100644
--- a/src/com/gitblit/wicket/pages/RawPage.java
+++ b/src/com/gitblit/wicket/pages/RawPage.java
@@ -109,7 +109,7 @@ public class RawPage extends WebPage {
switch (type) {
case 2:
// image blobs
- byte[] image = JGitUtils.getByteContent(r, commit.getTree(), blobPath);
+ byte[] image = JGitUtils.getByteContent(r, commit.getTree(), blobPath, true);
response.setContentType("image/" + extension.toLowerCase());
response.setContentLength(image.length);
try {
@@ -120,7 +120,7 @@ public class RawPage extends WebPage {
break;
case 3:
// binary blobs (download)
- byte[] binary = JGitUtils.getByteContent(r, commit.getTree(), blobPath);
+ byte[] binary = JGitUtils.getByteContent(r, commit.getTree(), blobPath, true);
response.setContentLength(binary.length);
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=\"" + filename + "\"");
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.html b/src/com/gitblit/wicket/pages/RepositoryPage.html
index 63a894da..d49f0188 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.html
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.html
@@ -52,7 +52,7 @@
</div>
</div>
<div class="span7">
- <div><span class="project" wicket:id="projectTitle">[project title]</span>/<span class="repository" wicket:id="repositoryName">[repository name]</span> <span class="hidden-phone"><span wicket:id="pageName">[page name]</span></span></div>
+ <div><span class="project" wicket:id="projectTitle">[project title]</span>/<img wicket:id="repositoryIcon" style="padding-left: 10px;"></img><span class="repository" wicket:id="repositoryName">[repository name]</span> <span class="hidden-phone"><span wicket:id="pageName">[page name]</span></span></div>
<span wicket:id="originRepository">[origin repository]</span>
</div>
</div>
diff --git a/src/com/gitblit/wicket/pages/RepositoryPage.java b/src/com/gitblit/wicket/pages/RepositoryPage.java
index aac527d7..16087fa6 100644
--- a/src/com/gitblit/wicket/pages/RepositoryPage.java
+++ b/src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -246,6 +246,14 @@ public abstract class RepositoryPage extends BasePage {
}
}
+ // show sparkleshare folder icon
+ if (model.isSparkleshared()) {
+ add(WicketUtils.newImage("repositoryIcon", "folder_star_32x32.png",
+ getString("gb.isSparkleshared")));
+ } else {
+ add(WicketUtils.newClearPixel("repositoryIcon").setVisible(false));
+ }
+
if (getRepositoryModel().isBare) {
add(new Label("workingCopyIndicator").setVisible(false));
} else {