Add button to list all entries in an AlphanumericDataGrid.

Review Request #7190 — Created April 10, 2015 and submitted

Information

Djblets
master
2e71fb0...

Reviewers

Added "All" button to list all entries in an AlphanumericDataGrid. This can be useful to list e.g. all users in a review group, or all users on the Review Board server, especially for servers/groups with few users.

  • Tested that alphanumeric buttons work as before
  • Tested that "All" button shows all users, and that they are sortable
  • Tested that "All" is the default page

Description From Last Updated

Perhaps we should default to all?

daviddavid

Hmm. I'm not sure how to localize this. I'm thinking that we probably want to have some specialized code in …

daviddavid

Can this be formatted as follows to remove the backslash? self.extra_context['letters'] = (['all', '0'] + list(string.ascii_uppercase))

brenniebrennie

Should be {{letter}} not {{ letter }}.

brenniebrennie

Should be {{letter}} not {{ letter }.

brenniebrennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
  2. 
      
david
  1. 
      
    1. Please also upload a screenshot as a file attachment.

  2. djblets/datagrid/grids.py (Diff revision 1)
     
     
    Show all issues

    Perhaps we should default to all?

    1. I think 'all' is a sensible default, unless you think that some servers with many users might have trouble listing all the users at once. Since the output is paginated anyway, I guess that won't be a problem. 'all' is the default in the latest diff.

  3. djblets/datagrid/grids.py (Diff revision 1)
     
     
    Show all issues

    Hmm. I'm not sure how to localize this. I'm thinking that we probably want to have some specialized code in the paginator template that adds this, rather than including it in the letters variable in the context. We can then have the value passed in in the query string be different from what's presented on the screen.

    1. The template loops over letters, so I've left 'all' in letters, and then treat this value specifically in the template. If letter == 'all', then the template translates 'all' to the right language. See latest diff.

  4. 
      
HA
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
  2. 
      
HA
brennie
  1. Just a few minor fixes, and then I say ship it!

    Looks good to me.

  2. djblets/datagrid/grids.py (Diff revision 2)
     
     
     
    Show all issues

    Can this be formatted as follows to remove the backslash?

            self.extra_context['letters'] = (['all', '0'] +
                                             list(string.ascii_uppercase))
    
  3. Show all issues

    Should be {{letter}} not {{ letter }}.

  4. Show all issues

    Should be {{letter}} not {{ letter }.

  5. 
      
HA
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
    
    Tool: Pyflakes
    Processed Files:
        djblets/datagrid/grids.py
    
    Ignored Files:
        djblets/datagrid/templates/datagrid/alphanumeric_paginator.html
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
HA
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-0.8.x (ff14373)
Loading...