| | |
| | | import com.gitblit.utils.ArrayUtils;
|
| | | import com.gitblit.utils.DeepCopier;
|
| | | import com.gitblit.utils.JGitUtils;
|
| | | import com.gitblit.utils.PushLogUtils;
|
| | | import com.gitblit.utils.RefLogUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.utils.TicgitUtils;
|
| | | import com.gitblit.wicket.GitBlitWebSession;
|
| | |
| | | RepositoryModel model = getRepositoryModel();
|
| | |
|
| | | // standard links
|
| | | if (PushLogUtils.getPushLogBranch(r) == null) {
|
| | | if (RefLogUtils.getRefLogBranch(r) == null) {
|
| | | pages.put("summary", new PageRegistration("gb.summary", SummaryPage.class, params));
|
| | | } else {
|
| | | pages.put("summary", new PageRegistration("gb.summary", SummaryPage.class, params));
|
| | | // pages.put("overview", new PageRegistration("gb.overview", OverviewPage.class, params));
|
| | | pages.put("pushes", new PageRegistration("gb.pushes", PushesPage.class, params));
|
| | | pages.put("reflog", new PageRegistration("gb.reflog", ReflogPage.class, params));
|
| | | }
|
| | | pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params));
|
| | | pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params));
|
| | |
| | | isOwner = GitBlitWebSession.get().isLoggedIn()
|
| | | && (model.isOwner(GitBlitWebSession.get()
|
| | | .getUsername()));
|
| | | if (showAdmin || isOwner) {
|
| | | pages.put("edit", new PageRegistration("gb.edit", EditRepositoryPage.class, params));
|
| | | }
|
| | | return pages;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (showAdmin || isOwner) {
|
| | | String url = getRequestCycle().urlFor(EditRepositoryPage.class, WicketUtils.newRepositoryParameter(model.name)).toString();
|
| | | add(new ExternalLink("editLink", url)); |
| | | } else {
|
| | | add(new Label("editLink").setVisible(false));
|
| | | }
|
| | | |
| | | super.setupPage(repositoryName, pageName);
|
| | | }
|
| | |
|
| | |
| | | RevCommit commit = JGitUtils.getCommit(r, objectId);
|
| | | if (commit == null) {
|
| | | error(MessageFormat.format(getString("gb.failedToFindCommit"),
|
| | | objectId, repositoryName, getPageName()), true);
|
| | | objectId, repositoryName, getPageName()), null, LogPage.class,
|
| | | WicketUtils.newRepositoryParameter(repositoryName));
|
| | | }
|
| | | getSubmodules(commit);
|
| | | return commit;
|