| | |
| | | import org.apache.wicket.markup.repeater.data.DataView;
|
| | | import org.apache.wicket.markup.repeater.data.ListDataProvider;
|
| | | import org.eclipse.jgit.lib.Constants;
|
| | | import org.eclipse.jgit.lib.FileMode;
|
| | | import org.eclipse.jgit.lib.Repository;
|
| | | import org.eclipse.jgit.revwalk.RevCommit;
|
| | |
|
| | |
| | | // breadcrumbs
|
| | | add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, path, objectId));
|
| | | if (path != null && path.trim().length() > 0) {
|
| | | paths.add(0, PathModel.getParentPath(path, objectId));
|
| | | // add .. parent path entry
|
| | | String parentPath = null;
|
| | | if (path.lastIndexOf('/') > -1) {
|
| | | parentPath = path.substring(0, path.lastIndexOf('/'));
|
| | | }
|
| | | PathModel model = new PathModel("..", parentPath, 0, FileMode.TREE.getBits(), objectId);
|
| | | model.isParentPath = true;
|
| | | paths.add(0, model);
|
| | | }
|
| | |
|
| | | final ByteFormat byteFormat = new ByteFormat();
|
| | |
| | | entry.path)));
|
| | | links.add(new BookmarkablePageLink<Void>("raw", RawPage.class, WicketUtils
|
| | | .newPathParameter(repositoryName, entry.commitId, entry.path)));
|
| | | links.add(new BookmarkablePageLink<Void>("blame", BlobPage.class)
|
| | | .setEnabled(false));
|
| | | links.add(new BookmarkablePageLink<Void>("blame", BlamePage.class,
|
| | | WicketUtils.newPathParameter(repositoryName, entry.commitId,
|
| | | entry.path)));
|
| | | links.add(new BookmarkablePageLink<Void>("history", HistoryPage.class,
|
| | | WicketUtils.newPathParameter(repositoryName, entry.commitId,
|
| | | entry.path)));
|