Yuhi Ishikura
2013-06-02 7eb9828ec6a31ad372c6a1dac7fa042bcdbd6818
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
@@ -196,22 +196,22 @@
      }      
      pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params));
      pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params));
      pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params));
      pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params, true));
      if (GitBlit.getBoolean(Keys.web.allowForking, true)) {
         pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params));
         pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params, true));
      }
      // conditional links
      // per-repository extra page links
      if (model.useTickets && TicgitUtils.getTicketsBranch(r) != null) {
         pages.put("tickets", new PageRegistration("gb.tickets", TicketsPage.class, params));
         pages.put("tickets", new PageRegistration("gb.tickets", TicketsPage.class, params, true));
      }
      if (model.showReadme || model.useDocs) {
         pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params));
         pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true));
      }
      if (JGitUtils.getPagesBranch(r) != null) {
         OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink(
               getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null));
               getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null), true);
         pages.put("pages", pagesLink);
      }
@@ -286,8 +286,8 @@
         }
      }
      
      // (un)star link allows a user to star someone else's repository
      if (user.isAuthenticated && !model.isOwner(user.username) && !model.isUsersPersonalRepository(user.username)) {
      // (un)star link allows a user to star a repository
      if (user.isAuthenticated) {
         PageParameters starParams = DeepCopier.copy(getPageParameters());
         starParams.put(PARAM_STAR, !user.getPreferences().isStarredRepository(model.name));
         String toggleStarUrl = getRequestCycle().urlFor(getClass(), starParams).toString();
@@ -301,7 +301,7 @@
            add(new Label("unstarLink").setVisible(false));
         }
      } else {
         // anonymous user or the repository owner is browsing the repository
         // anonymous user
         add(new Label("starLink").setVisible(false));
         add(new Label("unstarLink").setVisible(false));
      }