| | |
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.link.BookmarkablePageLink;
|
| | | import org.apache.wicket.markup.html.link.ExternalLink;
|
| | | import org.apache.wicket.markup.repeater.Item;
|
| | | import org.apache.wicket.markup.repeater.data.DataView;
|
| | | import org.apache.wicket.markup.repeater.data.ListDataProvider;
|
| | |
| | | import org.eclipse.jgit.lib.Repository;
|
| | | import org.eclipse.jgit.revwalk.RevCommit;
|
| | |
|
| | | import com.gitblit.DownloadZipServlet;
|
| | | import com.gitblit.GitBlit;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.JGitUtils.SearchType;
|
| | | import com.gitblit.wicket.LinkPanel;
|
| | | import com.gitblit.wicket.RepositoryPage;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.models.PathModel.PathChangeModel;
|
| | | import com.gitblit.wicket.panels.CommitHeaderPanel;
|
| | | import com.gitblit.wicket.panels.CommitLegendPanel;
|
| | |
|
| | | public class CommitPage extends RepositoryPage {
|
| | |
| | | super(params);
|
| | |
|
| | | Repository r = getRepository();
|
| | | RevCommit c = JGitUtils.getCommit(r, objectId);
|
| | | RevCommit c = getCommit();
|
| | |
|
| | | List<String> parents = new ArrayList<String>();
|
| | | if (c.getParentCount() > 0) {
|
| | |
| | | }
|
| | | add(new BookmarkablePageLink<Void>("patchLink", PatchPage.class, WicketUtils.newObjectParameter(repositoryName, objectId)));
|
| | |
|
| | | add(new LinkPanel("shortlog", "title", c.getShortMessage(), CommitDiffPage.class, WicketUtils.newObjectParameter(repositoryName, objectId)));
|
| | | add(new CommitHeaderPanel("commitHeader", repositoryName, c));
|
| | |
|
| | | addRefs(r, c);
|
| | |
|
| | |
| | | add(new Label("commitId", c.getName()));
|
| | |
|
| | | add(new LinkPanel("commitTree", "list", c.getTree().getName(), TreePage.class, newCommitParameter()));
|
| | | add(new BookmarkablePageLink<Void>("treeLink", TreePage.class, newCommitParameter()));
|
| | | add(new ExternalLink("zipLink", DownloadZipServlet.asLink(getRequest().getRelativePathPrefixToContextRoot(), repositoryName, objectId, null)).setVisible(GitBlit.self().settings().getBoolean(Keys.web.allowZipDownloads, true)));
|
| | |
|
| | | // Parent Commits
|
| | | ListDataProvider<String> parentsDp = new ListDataProvider<String>(parents);
|