Users should be able to specify their default Dashboard view

Review Request #3653 — Created Dec. 11, 2012 and discarded — Latest diff uploaded

Information

Review Board
581

Reviewers

Users should be able to specify their default dashboard view.
    
Introduce a User Profile attribute that allows the user to select one of "incoming","outgoing","starred","mine". Once they select one of these (the default will be "incoming"), the default view will be set to that and will be shown anytime they come into the /dashboard/ page.
    
Summary of changes:
* reviewboard/accounts/evolutions/__init__.py
* reviewboard/accounts/evolutions/default_view.py
  + Migration script to add the "default_view" column to accounts_profile
    
* reviewboard/accounts/forms.py
  + Create a default_view field selected from a dropdown list of "incoming", "outgoing", "mine" or "starred".
  + Save the user selected value when saving the user profile.
    
* reviewboard/accounts/models.py
  + Create a default_view field in the model (CharField) that has a default value of "incoming".
    
* reviewboard/reviews/datagrids.py
  + Get the value from the constructor and set it to be the default_view. If nothing is setup, default to 'incoming' (Existing behaviour) Fill it out the same way as how it would be when a         
    user does /dashboard?view=<view type>
    
* reviewboard/reviews/tests.py
  + Added testDashboardDefaultView that sets the default view for "doc" user. Test the counts by varying the account profile value.
    
* reviewboard/reviews/views.py
  + Call DashboardDataGrid passing in the user's default_view profile setting.

Manual, ran the test cases (new and existing).

I wasnt sure of how to run the migration testing, so that was not tested.

    Loading...