From 56d1c441d3b591c161e36e5a001cca83a7d17c93 Mon Sep 17 00:00:00 2001 From: Dongsu, KIM <ds5apn@gmail.com> Date: Fri, 19 Jul 2013 05:39:08 -0400 Subject: [PATCH] Update Korean Translation --- src/main/java/com/gitblit/wicket/pages/RepositoryPage.java | 37 +++++++++++++++++++++---------------- 1 files changed, 21 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 918127b..372b68d 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -60,7 +60,7 @@ 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; @@ -187,31 +187,31 @@ 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)); - 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); } @@ -226,9 +226,6 @@ isOwner = GitBlitWebSession.get().isLoggedIn() && (model.isOwner(GitBlitWebSession.get() .getUsername())); - if (showAdmin || isOwner) { - pages.put("edit", new PageRegistration("gb.edit", EditRepositoryPage.class, params)); - } return pages; } @@ -286,8 +283,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 +298,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)); } @@ -334,6 +331,13 @@ String url = getRequestCycle().urlFor(ForkPage.class, WicketUtils.newRepositoryParameter(model.name)).toString(); add(new ExternalLink("forkLink", url)); } + } + + 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); @@ -390,7 +394,8 @@ 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; @@ -441,7 +446,7 @@ if (submoduleName.lastIndexOf('/') > -1) { String name = submoduleName.substring(submoduleName.lastIndexOf('/') + 1); candidates.add(currentPath + StringUtils.stripDotGit(name)); - candidates.add(currentPath + candidates.get(candidates.size() - 1) + ".git"); + candidates.add(candidates.get(candidates.size() - 1) + ".git"); } // absolute -- Gitblit v1.9.1