| | |
| | | // navigation links
|
| | | List<PageRegistration> pages = new ArrayList<PageRegistration>();
|
| | | if (!authenticateView || (authenticateView && GitBlitWebSession.get().isLoggedIn())) {
|
| | | pages.add(new PageRegistration(GitBlitWebSession.get().isLoggedIn() ? "gb.myDashboard" : "gb.dashboard", DashboardPage.class,
|
| | | pages.add(new PageRegistration(GitBlitWebSession.get().isLoggedIn() ? "gb.myDashboard" : "gb.dashboard", MyDashboardPage.class,
|
| | | getRootPageParameters()));
|
| | | pages.add(new PageRegistration("gb.repositories", RepositoriesPage.class,
|
| | | getRootPageParameters()));
|
| | |
| | | if (daysBack < 1) {
|
| | | daysBack = 7;
|
| | | }
|
| | | PageParameters clonedParams;;
|
| | | if (params == null) {
|
| | | clonedParams = new PageParameters();
|
| | | } else {
|
| | | clonedParams = new PageParameters(params);
|
| | | }
|
| | | |
| | | if (!clonedParams.containsKey("db")) {
|
| | | clonedParams.put("db", daysBack);
|
| | | }
|
| | | |
| | | List<DropDownMenuItem> items = new ArrayList<DropDownMenuItem>();
|
| | | Set<Integer> choicesSet = new TreeSet<Integer>(GitBlit.getIntegers(Keys.web.activityDurationChoices));
|
| | | if (choicesSet.isEmpty()) {
|
| | |
| | | String lastDaysPattern = getString("gb.lastNDays");
|
| | | for (Integer db : choices) {
|
| | | String txt = MessageFormat.format(lastDaysPattern, db);
|
| | | items.add(new DropDownMenuItem(txt, "db", db.toString(), params));
|
| | | items.add(new DropDownMenuItem(txt, "db", db.toString(), clonedParams));
|
| | | }
|
| | | items.add(new DropDownMenuItem());
|
| | | return items;
|
| | |
| | | }
|
| | |
|
| | | add(new Label("displayName", user.getDisplayName()));
|
| | | |
| | |
|
| | | add(new BookmarkablePageLink<Void>("newRepository",
|
| | | EditRepositoryPage.class).setVisible(user.canAdmin() || user.canCreate()));
|
| | |
|
| | | add(new BookmarkablePageLink<Void>("myProfile",
|
| | | UserPage.class, WicketUtils.newUsernameParameter(user.username)));
|
| | |
|