Clicking username in nav bar now links to user profile instead of user preferences.

Review Request #6865 — Created Jan. 31, 2015 and submitted

Information

Review Board
master
f9134ce...

Reviewers

When you click on your avatar and/or username in the navigation bar, it takes you to the user preferences page. There is already a link to the Preferences page in the user drop down menu, but there isn't a link to your own user page anywhere. Your avatar and username in the navigation bar is now changed to link to your own profile page.

Clicked my avatar/username from a variety of different places on the site. They all successfully linked to my own profile page.

Description From Last Updated

I think {% url 'user' %} will work. The URL name for that page is, kinda unintuitively, under datagrids/urls.py: url(r"^users/(?P<username>[A-Za-z0-9@_\-\.'\+]+)/$", …

mike_conleymike_conley
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/templates/base/headerbar.html
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/templates/base/headerbar.html
    
    
  2. 
      
mike_conley
  1. 
      
  2. I think {% url 'user' %} will work.

    The URL name for that page is, kinda unintuitively, under datagrids/urls.py:

        url(r"^users/(?P<username>[A-Za-z0-9@_\-\.'\+]+)/$",
            'submitter', name='user'),
    

    That name parameter is what we can pass to the url templatetag, so I'm pretty sure just replacing user-preferences with user will work.

    1. I had already tried that, but it did not work. It says "Reverse for 'user' with arguments '()' and keyword arguments '{}' not found."

    2. Ah, you might need to pass in the username as well, since the regex is expecting to inject that:

      Try:

      {% url 'user' request.user.username %}

      Does that work?

  3. 
      
JE
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/templates/base/headerbar.html
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/templates/base/headerbar.html
    
    
  2. 
      
mike_conley
  1. Ship It!
  2. 
      
brennie
  1. Ship It!
  2. 
      
JE
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to maste (365cff0)
Loading...