add support for pagination in the diff viewer

Review Request #265 — Created Feb. 20, 2008 and submitted


Review Board SVN (deprecated)


I took a crack at adding pagination to the diff viewer.  The problem I'm trying to solve is that, when the diffs are too big, the browser has trouble displaying them.  There is a typical list of page numbers and previous/next links.  The code is based on the paginator stuff I saw on the Django website.  I also modified the links in the threaded comment view to include the file id as a parameter, so we can flip to the right page.

    1. I've gone ahead and cleaned up most of this and committed it.  On more than
      one occasion, a gigantic diff (>200 files changed) has taken down our server,
      and I'm fed up with having 40 people tell me all at once that review board
      is down :)
      Christian says he'll take care of the djblets code-sharing later.  I'll
      leave this review open to remind him.  Of course, anyone is welcome to do it
      if they're quicker.
      Thanks, Tim!
  2. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Can you put this in the list alphabetically (by module name)?
  3. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Each comment should be sentence case, and a blank line before each comment.
  4. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Blank line before and after each for loop.
  5. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Excess whitespace.
  6. /trunk/reviewboard/diffviewer/ (Diff revision 1)
    Sentence case.
  7. /trunk/reviewboard/htdocs/css/diffviewer.css (Diff revision 1)
    Can we reuse the CSS for the datagrids?
  8. /trunk/reviewboard/ (Diff revision 1)
    Same with sentence case and blank lines.
  9. /trunk/reviewboard/templates/diffviewer/changeindex.html (Diff revision 1)
    I think you can use the djblets.datagrid.templatetags.paginator tag for most of this.