Package com.gitblit.models.NavLink

Examples of com.gitblit.models.NavLink.PageNavLink


    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(
View Full Code Here


    }

    // navigation links
    List<NavLink> navLinks = new ArrayList<NavLink>();
    if (!authenticateView || (authenticateView && isLoggedIn)) {
      navLinks.add(new PageNavLink(isLoggedIn ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class,
          getRootPageParameters()));
      if (isLoggedIn && app().tickets().isReady()) {
        navLinks.add(new PageNavLink("gb.myTickets", MyTicketsPage.class));
      }
      navLinks.add(new PageNavLink("gb.repositories", RepositoriesPage.class,
          getRootPageParameters()));
      navLinks.add(new PageNavLink("gb.activity", ActivityPage.class, getRootPageParameters()));
      if (allowLucene) {
        navLinks.add(new PageNavLink("gb.search", LuceneSearchPage.class));
      }

      if (!authenticateView || (authenticateView && isLoggedIn)) {
        addDropDownMenus(navLinks);
      }
View Full Code Here

          Component c = new DropDownMenu("link", linkText, reg);
          c.setRenderBodyOnly(true);
          item.add(c);
          WicketUtils.setCssClass(item, "dropdown");
        } else if (navLink instanceof PageNavLink) {
          PageNavLink reg = (PageNavLink) navLink;
          // standard page link
          Component c = new LinkPanel("link", null, linkText,
              reg.pageClass, reg.params);
          c.setRenderBodyOnly(true);
          if (reg.pageClass.equals(pageClass)) {
View Full Code Here

TOP

Related Classes of com.gitblit.models.NavLink.PageNavLink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.