| | |
| | | import org.apache.wicket.PageParameters;
|
| | | import org.apache.wicket.markup.html.basic.Label;
|
| | | import org.apache.wicket.markup.html.link.ExternalLink;
|
| | | import org.apache.wicket.markup.html.panel.Fragment;
|
| | |
|
| | | import com.gitblit.GitBlit;
|
| | | import com.gitblit.Keys;
|
| | |
| | | import com.gitblit.wicket.PageRegistration.DropDownMenuItem;
|
| | | import com.gitblit.wicket.PageRegistration.DropDownMenuRegistration;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.panels.FilterableRepositoryList;
|
| | |
|
| | | public class ProjectPage extends DashboardPage {
|
| | |
|
| | |
| | | }
|
| | | int daysBack = params == null ? 0 : WicketUtils.getDaysBack(params);
|
| | | if (daysBack < 1) {
|
| | | daysBack = 7;
|
| | | daysBack = GitBlit.getInteger(Keys.web.activityDuration, 7);
|
| | | }
|
| | | // reset the daysback parameter so that we have a complete project
|
| | | // repository list. the recent activity will be built up by the
|
| | | // reflog utils.
|
| | | params.put("db", 0);
|
| | | params.remove("db");
|
| | |
|
| | | List<RepositoryModel> repositories = getRepositories(params);
|
| | | Collections.sort(repositories, new Comparator<RepositoryModel>() {
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | |
| | | addActivity(user, repositories, daysBack);
|
| | | addActivity(user, repositories, getString("gb.recentActivity"), daysBack);
|
| | |
|
| | | if (repositories.isEmpty()) {
|
| | | add(new Label("repositoryList").setVisible(false));
|
| | | } else {
|
| | | Fragment activeView = createNgList("repositoryList", "repositoryListFragment", "repositoryListCtrl", repositories);
|
| | | add(activeView);
|
| | | FilterableRepositoryList repoList = new FilterableRepositoryList("repositoryList", repositories);
|
| | | repoList.setAllowCreate(user.canCreate(project.name + "/"));
|
| | | add(repoList);
|
| | | }
|
| | | }
|
| | |
|