Add filters for searching.

Review Request #7063 — Created March 15, 2015 and submitted

Information

Review Board
release-2.0.x
8cf85b3...

Reviewers

Now that we're showing more than review requests in the search results,
we need to give users the option to filter those results.

There's now a filter bar above the search results, showing a tab-like
view of All Results, Users, and Review Requests. Clicking one of these
will re-search with a filter applied.

Users can also combine filters in the URL, if they want, though there's
no UI for doing so. It's an advanced feature that may be more useful
down the road.

While here, I removed some old, dead code from the template and context
variables, and tweaked the number of pages shown in the paginator.

Tested searching with each filter type, with no filters, and with
combinations of filters. I always got the results I expected.


Description From Last Updated

'six' imported but unused

reviewbotreviewbot

Would you mind putting parens around the expression passed in for active? I know it's not necessary but I find …

daviddavid

Do we not have a definition that would work here?

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/search/views.py
    
    Ignored Files:
        reviewboard/templates/search/results.html
        reviewboard/static/rb/css/search.less
    
    
    
    Tool: Pyflakes
    Processed Files:
        reviewboard/search/views.py
    
    Ignored Files:
        reviewboard/templates/search/results.html
        reviewboard/static/rb/css/search.less
    
    
  2. reviewboard/search/views.py (Diff revision 1)
     
     
    Show all issues
     'six' imported but unused
    
  3. 
      
david
  1. 
      
  2. reviewboard/search/views.py (Diff revision 1)
     
     
    Show all issues

    Would you mind putting parens around the expression passed in for active? I know it's not necessary but I find it makes it a lot easier to read.

    1. Oops, I normally would have. That's the result of turning this from a {...} to a dict(...).

  3. reviewboard/static/rb/css/search.less (Diff revision 1)
     
     
    Show all issues

    Do we not have a definition that would work here?

    1. Nope. It's part of the styling for this page, specifically, to fit in with the tab colors. Just grayish text.

  4. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/search/views.py
    
    Ignored Files:
        reviewboard/templates/search/results.html
        reviewboard/static/rb/css/search.less
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/search/views.py
    
    Ignored Files:
        reviewboard/templates/search/results.html
        reviewboard/static/rb/css/search.less
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (32499ee)
Loading...