Added alphabetic pagination to users list

Review Request #6368 — Created Sept. 24, 2014 and submitted

Information

Review Board
master
829
6e82fd3...

Reviewers

The usergrid object triggers the paginator in djiblets to turn on alphabetic queries by providing a current_letter parameter to the DataGrid.
If there is no letter parameter passed into query string it defaults to 'A'.
The users_list function (in views) is reponsible for catching a letter parameter in the query string (including catching and throwing errors), and filtering the queryset accordingly (ie. filter for names starting with 'A') before passing it to the datagrid.

I've provided a screenshot of what the paginator looks like and am open to suggestions about making CSS modifications. I've also tried out Andrew Hongs suggestions of adding brackets around the numeric buttons.

Manually tested button behaviour of first last, next and back arrows.

Unit tests for the user list are updated to test new features and all pass.

All unit tests pass.


Description From Last Updated

Col: 80 E501 line too long (94 > 79 characters)

reviewbotreviewbot

Col: 23 E225 missing whitespace around operator

reviewbotreviewbot

This will end up undoing the local_site filter above. These should be qs = qs.filter(...)

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/views.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/views.py
    
    
  2. reviewboard/datagrids/grids.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (94 > 79 characters)
    
  3. 
      
RM
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/views.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/views.py
    
    
  2. 
      
RM
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
    
    
  2. reviewboard/datagrids/grids.py (Diff revision 3)
     
     
    Show all issues
    Col: 23
     E225 missing whitespace around operator
    
  3. 
      
RM
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
    
    
  2. 
      
RM
RM
RM
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/tests.py
    
    
  2. 
      
RM
david
  1. 
      
  2. reviewboard/datagrids/grids.py (Diff revision 6)
     
     
     
     
    Show all issues

    This will end up undoing the local_site filter above. These should be qs = qs.filter(...)

  3. 
      
RM
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/datagrids/grids.py
        reviewboard/datagrids/tests.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
RM
RM
RM
Review request changed
Status:
Completed