add support for pagination in the diff viewer

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

Information

Review Board SVN (deprecated)

Reviewers

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.

 
chipx86
  1. 
      
    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/views.py (Diff revision 1)
     
     
    Can you put this in the list alphabetically (by module name)?
  3. /trunk/reviewboard/diffviewer/views.py (Diff revision 1)
     
     
     
     
     
     
     
    Each comment should be sentence case, and a blank line before each comment.
  4. /trunk/reviewboard/diffviewer/views.py (Diff revision 1)
     
     
     
     
     
    Blank line before and after each for loop.
  5. /trunk/reviewboard/diffviewer/views.py (Diff revision 1)
     
     
    Excess whitespace.
  6. /trunk/reviewboard/diffviewer/views.py (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/settings.py (Diff revision 1)
     
     
     
     
     
    Same with sentence case and blank lines.
    
    Can you change these to DIFFVIEWER_PAGINATE_BY and DIFFVIEWER_PAGINATE_ORPHANS?
  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.
  10. 
      
Loading...