List<NavLink> navLinks = new ArrayList<NavLink>();
// standard links
if (RefLogUtils.getRefLogBranch(r) == null) {
navLinks.add(new PageNavLink("gb.summary", SummaryPage.class, params));
} else {
navLinks.add(new PageNavLink("gb.summary", SummaryPage.class, params));
// pages.put("overview", new PageRegistration("gb.overview", OverviewPage.class, params));
navLinks.add(new PageNavLink("gb.reflog", ReflogPage.class, params));
}
if (!model.hasCommits) {
return navLinks;
}
navLinks.add(new PageNavLink("gb.commits", LogPage.class, objectParams));
navLinks.add(new PageNavLink("gb.tree", TreePage.class, objectParams));
if (app().tickets().isReady() && (app().tickets().isAcceptingNewTickets(model) || app().tickets().hasTickets(model))) {
PageParameters tParams = WicketUtils.newOpenTicketsParameter(getRepositoryName());
navLinks.add(new PageNavLink("gb.tickets", TicketsPage.class, tParams));
}
navLinks.add(new PageNavLink("gb.docs", DocsPage.class, objectParams, true));
if (app().settings().getBoolean(Keys.web.allowForking, true)) {
navLinks.add(new PageNavLink("gb.forks", ForksPage.class, params, true));
}
navLinks.add(new PageNavLink("gb.compare", ComparePage.class, params, true));
// conditional links
// per-repository extra navlinks
if (JGitUtils.getPagesBranch(r) != null) {
ExternalNavLink pagesLink = new ExternalNavLink("gb.pages", PagesServlet.asLink(