| | |
| | | import com.gitblit.models.Activity;
|
| | | import com.gitblit.models.Activity.RepositoryCommit;
|
| | | import com.gitblit.utils.StringUtils;
|
| | | import com.gitblit.wicket.GitBlitWebApp;
|
| | | import com.gitblit.wicket.GitBlitWebSession;
|
| | | import com.gitblit.wicket.WicketUtils;
|
| | | import com.gitblit.wicket.pages.BasePage;
|
| | | import com.gitblit.wicket.pages.CommitDiffPage;
|
| | | import com.gitblit.wicket.pages.CommitPage;
|
| | | import com.gitblit.wicket.pages.LogPage;
|
| | |
| | | super(wicketId);
|
| | |
|
| | | Collections.sort(recentActivity);
|
| | | |
| | | GitBlitWebApp app = (GitBlitWebApp) GitBlitWebSession.get().getApplication();
|
| | | final Class<? extends BasePage> searchPageClass = app.getSearchPageClass();
|
| | |
|
| | | DataView<Activity> activityView = new DataView<Activity>("activity",
|
| | | new ListDataProvider<Activity>(recentActivity)) {
|
| | |
| | |
|
| | | // display the commits in chronological order
|
| | | DataView<RepositoryCommit> commits = new DataView<RepositoryCommit>("commits",
|
| | | new ListDataProvider<RepositoryCommit>(entry.commits)) {
|
| | | new ListDataProvider<RepositoryCommit>(entry.getCommits())) {
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public void populateItem(final Item<RepositoryCommit> item) {
|
| | |
| | | // author search link
|
| | | String author = commit.getAuthorIdent().getName();
|
| | | LinkPanel authorLink = new LinkPanel("author", "list", author,
|
| | | SearchPage.class, WicketUtils.newSearchParameter(commit.repository,
|
| | | searchPageClass, WicketUtils.newSearchParameter(commit.repository,
|
| | | commit.getName(), author, Constants.SearchType.AUTHOR), true);
|
| | | setPersonSearchTooltip(authorLink, author, Constants.SearchType.AUTHOR);
|
| | | fragment.add(authorLink);
|
| | |
| | |
|
| | | // message/commit link
|
| | | String shortMessage = commit.getShortMessage();
|
| | | String trimmedMessage = StringUtils.trimShortLog(shortMessage);
|
| | | String trimmedMessage = shortMessage;
|
| | | if (commit.getRefs() != null && commit.getRefs().size() > 0) {
|
| | | trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG_REFS);
|
| | | } else {
|
| | | trimmedMessage = StringUtils.trimString(shortMessage, Constants.LEN_SHORTLOG);
|
| | | }
|
| | | LinkPanel shortlog = new LinkPanel("message", "list subject",
|
| | | trimmedMessage, CommitPage.class, WicketUtils.newObjectParameter(
|
| | | commit.repository, commit.getName()), true);
|