| | |
| | |
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.models.PathModel;
|
| | | import com.gitblit.wicket.pages.BlobPage;
|
| | | import com.gitblit.wicket.pages.TreePage;
|
| | |
|
| | |
|
| | |
| | |
|
| | | public TreeLinksPanel(String id, String repositoryName, PathModel path) {
|
| | | super(id);
|
| | | if (path.isTree()) {
|
| | | add(new LinkPanel("link", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | add(new Label("raw", ""));
|
| | | } else {
|
| | | add(new LinkPanel("link", null, "view", BlobPage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | add(new Label("raw", "download"));
|
| | | }
|
| | | add(new LinkPanel("link", null, "tree", TreePage.class, new PageParameters("p=" + repositoryName + ",h=" + path.commitId + ",f=" + path.path)));
|
| | | add(new Label("history", "history"));
|
| | | }
|
| | | } |