James Moger
2011-04-18 9bc17d16ea48a7978b198126d346828b1d24fe4e
src/com/gitblit/wicket/pages/CommitDiffPage.java
@@ -16,7 +16,7 @@
import com.gitblit.wicket.LinkPanel;
import com.gitblit.wicket.RepositoryPage;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.models.PathModel;
import com.gitblit.wicket.models.PathModel.PathChangeModel;
public class CommitDiffPage extends RepositoryPage {
@@ -46,14 +46,19 @@
      add(new LinkPanel("shortlog", "title", commit.getShortMessage(), CommitPage.class, newCommitParameter()));
      // changed paths list
      List<PathModel> paths = JGitUtils.getFilesInCommit(r, commit);
      ListDataProvider<PathModel> pathsDp = new ListDataProvider<PathModel>(paths);
      DataView<PathModel> pathsView = new DataView<PathModel>("changedPath", pathsDp) {
      List<PathChangeModel> paths = JGitUtils.getFilesInCommit(r, commit);
      ListDataProvider<PathChangeModel> pathsDp = new ListDataProvider<PathChangeModel>(paths);
      DataView<PathChangeModel> pathsView = new DataView<PathChangeModel>("changedPath", pathsDp) {
         private static final long serialVersionUID = 1L;
         int counter = 0;
         public void populateItem(final Item<PathModel> item) {
            final PathModel entry = item.getModelObject();
         public void populateItem(final Item<PathChangeModel> item) {
            final PathChangeModel entry = item.getModelObject();
            Label changeType = new Label("changeType", "");
            WicketUtils.setChangeTypeCssClass(changeType, entry.changeType);
            setChangeTypeTooltip(changeType, entry.changeType);
            item.add(changeType);
            if (entry.isTree()) {
               item.add(new LinkPanel("pathName", null, entry.path, TreePage.class, newPathParameter(entry.path)));
            } else {