container.add(new SimpleAttributeModifier("style", background));\r
}\r
\r
- public static void setHtmlTooltip(Component container, String value) {\r
- container.add(new SimpleAttributeModifier("title", value));\r
+ public static Component setHtmlTooltip(Component container, String value) {\r
+ return container.add(new SimpleAttributeModifier("title", value));\r
}\r
\r
public static void setInputPlaceholder(Component container, String value) {\r
<td class="changeType"><span wicket:id="changeType">[change type]</span></td> \r
<td class="path"><span wicket:id="pathName">[commit path]</span></td> \r
<td class="hidden-phone rightAlign">\r
- <span wicket:id="filestore" style="margin-right:20px;" class="aui-lozenge aui-lozenge-moved"></span>\r
+ <span wicket:id="filestore" style="margin-right:20px;" class="fa fa-fw fa-external-link-square filestore-item"></span>\r
<span class="hidden-tablet" style="padding-right:20px;" wicket:id="diffStat"></span>\r
<span class="link">\r
<span class="hidden-tablet"><a wicket:id="patch"><wicket:message key="gb.patch"></wicket:message></a> | </span><a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a><span class="hidden-tablet"> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a></span> | <a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
setChangeTypeTooltip(changeType, entry.changeType);
item.add(changeType);
item.add(new DiffStatPanel("diffStat", entry.insertions, entry.deletions, true));
+ item.add(WicketUtils.setHtmlTooltip(new Label("filestore", ""), getString("gb.filestore"))
+ .setVisible(entry.isFilestoreItem()));
boolean hasSubmodule = false;
String submodulePath = null;
// quick links
if (entry.isSubmodule()) {
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));
-
item.add(new ExternalLink("raw", "").setEnabled(false));
// submodule
item.add(new ExternalLink("patch", "").setEnabled(false));
&& !entry.changeType.equals(ChangeType.DELETE)));
if (entry.isFilestoreItem()) {
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(true));
-
item.add(new Link<Object>("view", null) {
private static final long serialVersionUID = 1L;
getRequestCycle().setRequestTarget(new ResourceStreamRequestTarget(resourceStream, entry.path));
}});
} else {
-
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));
-
item.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils
.newPathParameter(repositoryName, entry.commitId, entry.path))
.setEnabled(!entry.changeType.equals(ChangeType.DELETE)));
<td class="changeType"><span wicket:id="changeType">[change type]</span></td>\r
<td class="path"><span wicket:id="pathName">[commit path]</span></td> \r
<td class="hidden-phone rightAlign">\r
- <span wicket:id="filestore" style="margin-right:20px;" class="aui-lozenge aui-lozenge-moved"></span>\r
+ <span wicket:id="filestore" style="margin-right:20px;" class="fa fa-fw fa-external-link-square filestore-item"></span>\r
<span class="hidden-tablet" style="padding-right:20px;" wicket:id="diffStat"></span>\r
<span class="link">\r
<a wicket:id="diff"><wicket:message key="gb.diff"></wicket:message></a> | <span class="hidden-tablet"><a wicket:id="view"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="raw"><wicket:message key="gb.raw"></wicket:message></a> | </span><a wicket:id="blame"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="history"><wicket:message key="gb.history"></wicket:message></a>\r
package com.gitblit.wicket.pages;\r
\r
import java.io.OutputStream;\r
-import java.sql.Blob;\r
import java.util.ArrayList;\r
import java.util.Arrays;\r
import java.util.List;\r
-import java.util.concurrent.Callable;\r
\r
import org.apache.wicket.PageParameters;\r
-import org.apache.wicket.behavior.SimpleAttributeModifier;\r
import org.apache.wicket.markup.html.basic.Label;\r
import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
-import org.apache.wicket.markup.html.link.DownloadLink;\r
import org.apache.wicket.markup.html.link.ExternalLink;\r
import org.apache.wicket.markup.html.link.Link;\r
-import org.apache.wicket.markup.html.link.ResourceLink;\r
import org.apache.wicket.markup.repeater.Item;\r
import org.apache.wicket.markup.repeater.data.DataView;\r
import org.apache.wicket.markup.repeater.data.ListDataProvider;\r
-import org.apache.wicket.model.AbstractReadOnlyModel;\r
-import org.apache.wicket.model.IModel;\r
import org.apache.wicket.model.StringResourceModel;\r
-import org.apache.wicket.request.target.basic.RedirectRequestTarget;\r
import org.apache.wicket.request.target.resource.ResourceStreamRequestTarget;\r
-import org.apache.wicket.util.resource.AbstractResourceStream;\r
import org.apache.wicket.util.resource.AbstractResourceStreamWriter;\r
import org.apache.wicket.util.resource.IResourceStream;\r
-import org.bouncycastle.jcajce.provider.symmetric.Threefish;\r
import org.eclipse.jgit.diff.DiffEntry.ChangeType;\r
import org.eclipse.jgit.lib.Repository;\r
import org.eclipse.jgit.revwalk.RevCommit;\r
\r
import com.gitblit.Constants;\r
-import com.gitblit.GitBlit;\r
-import com.gitblit.manager.FilestoreManager;\r
-import com.gitblit.manager.GitblitManager;\r
-import com.gitblit.models.FilestoreModel;\r
import com.gitblit.models.GitNote;\r
-import com.gitblit.models.RepositoryModel;\r
import com.gitblit.models.PathModel.PathChangeModel;\r
import com.gitblit.models.SubmoduleModel;\r
import com.gitblit.models.UserModel;\r
@Override\r
public void populateItem(final Item<PathChangeModel> item) {\r
final PathChangeModel entry = item.getModelObject();\r
- final String filestoreItemUrl = entry.isFilestoreItem() ? JGitUtils.getLfsRepositoryUrl(getContextUrl(), repositoryName, entry.getFilestoreOid()) : null;\r
\r
Label changeType = new Label("changeType", "");\r
WicketUtils.setChangeTypeCssClass(changeType, entry.changeType);\r
setChangeTypeTooltip(changeType, entry.changeType);\r
item.add(changeType);\r
item.add(new DiffStatPanel("diffStat", entry.insertions, entry.deletions, true));\r
+ item.add(WicketUtils.setHtmlTooltip(new Label("filestore", ""), getString("gb.filestore"))\r
+ .setVisible(entry.isFilestoreItem()));\r
\r
boolean hasSubmodule = false;\r
String submodulePath = null;\r
if (entry.isSubmodule()) {\r
item.add(new ExternalLink("raw", "").setEnabled(false));\r
\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
- \r
// submodule\r
item.add(new BookmarkablePageLink<Void>("diff", BlobDiffPage.class, WicketUtils\r
.newPathParameter(repositoryName, entry.commitId, entry.path))\r
&& !entry.changeType.equals(ChangeType.DELETE)));\r
\r
if (entry.isFilestoreItem()) {\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(true));\r
- \r
- \r
- \r
item.add(new Link<Object>("view", null) {\r
\r
private static final long serialVersionUID = 1L;\r
}});\r
\r
} else {\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
- \r
item.add(new BookmarkablePageLink<Void>("view", BlobPage.class, WicketUtils\r
.newPathParameter(repositoryName, entry.commitId, entry.path))\r
.setEnabled(!entry.changeType.equals(ChangeType.DELETE)));\r
<tr wicket:id="changedPath">\r
<td class="hidden-phone icon"><img wicket:id="pathIcon" /></td>\r
<td><span wicket:id="pathName"></span></td>\r
- <td class="hidden-phone filestore"><span wicket:id="filestore" class="aui-lozenge aui-lozenge-moved"></span></td>\r
+ <td class="hidden-phone filestore"><span wicket:id="filestore" class="fa fa-fw fa-external-link-square filestore-item"></span></td>\r
<td class="hidden-phone size"><span wicket:id="pathSize">[path size]</span></td>\r
<td class="hidden-phone mode"><span wicket:id="pathPermissions">[path permissions]</span></td>\r
<td class="treeLinks"><span wicket:id="pathLinks">[path links]</span></td>\r
final PathModel entry = item.getModelObject();\r
\r
item.add(new Label("pathPermissions", JGitUtils.getPermissionsFromMode(entry.mode)));\r
- \r
+ item.add(WicketUtils.setHtmlTooltip(new Label("filestore", ""), getString("gb.filestore"))\r
+ .setVisible(entry.isFilestoreItem()));\r
+\r
if (entry.isParentPath) {\r
// parent .. path\r
item.add(WicketUtils.newBlankImage("pathIcon"));\r
item.add(new Label("pathSize", ""));\r
item.add(new LinkPanel("pathName", null, entry.name, TreePage.class,\r
- WicketUtils\r
- .newPathParameter(repositoryName, id, entry.path)));\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
+ WicketUtils.newPathParameter(repositoryName, id, entry.path)));\r
item.add(new Label("pathLinks", ""));\r
} else {\r
if (entry.isTree()) {\r
WicketUtils.newPathParameter(repositoryName, id,\r
entry.path)));\r
\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
-\r
// links\r
Fragment links = new Fragment("pathLinks", "treeLinks", this);\r
links.add(new BookmarkablePageLink<Void>("tree", TreePage.class,\r
getShortObjectId(submoduleId), TreePage.class,\r
WicketUtils.newPathParameter(submodulePath, submoduleId, "")).setEnabled(hasSubmodule));\r
\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
- \r
Fragment links = new Fragment("pathLinks", "submoduleLinks", this);\r
links.add(new BookmarkablePageLink<Void>("view", SummaryPage.class,\r
WicketUtils.newRepositoryParameter(submodulePath)).setEnabled(hasSubmodule));\r
Fragment links = new Fragment("pathLinks", "blobLinks", this);\r
\r
if (entry.isFilestoreItem()) {\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(true));\r
- \r
item.add(new LinkPanel("pathName", "list", displayPath, new Link<Object>("link", null) {\r
\r
private static final long serialVersionUID = 1L;\r
}});\r
\r
} else {\r
- item.add(new Label("filestore", getString("gb.filestore")).setVisible(false));\r
- \r
item.add(new LinkPanel("pathName", "list", displayPath, BlobPage.class,\r
WicketUtils.newPathParameter(repositoryName, id,\r
path)));\r
.file-negative {\r
color:#D51900;\r
}\r
+\r
+.filestore-item {\r
+ color:#815b3a;\r
+}
\ No newline at end of file