Adding custom message in banner

Review Request #8824 — Created March 18, 2017 and submitted

Information

khp
Review Board
master

Reviewers

Read-only mode is a feature that can be enabled by the admin to disable
most backend changes by regular users. This commit adds a custom
message for the banner when in read-only mode. The message can be
optionally added through the admin panel right under where the admin
would enable/disable read-only mode.

Ran js-tests - passed
Ran python tests - most passed, some failures fixed in future commit
Checked changing value in admin panel reflects in banner


Description From Last Updated

Mind wrapping your description & testing done at 72 characters?

brenniebrennie

Care to add the keys to this?

brenniebrennie

How about "A custom message displayed when the site is in read-only mode."

brenniebrennie

<b> is deprecated. Since you're making this a header, how about just using h2 (since its not the main header …

brenniebrennie

"dictionary will"

brenniebrennie

:py:class:`bool`

brenniebrennie

Blank line between these.

brenniebrennie

string is not a type, you mean unicode. Also, this won't auto link to the correct type. Use: :py:class:`unicode`

brenniebrennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/admin/context_processors.py
        reviewboard/admin/forms.py
    
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/static/rb/css/defs.less
        reviewboard/templates/base.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/admin/context_processors.py
        reviewboard/admin/forms.py
    
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/static/rb/css/defs.less
        reviewboard/templates/base.html
    
    
  2. 
      
brennie
  1. 
      
  2. reviewboard/admin/context_processors.py (Diff revision 1)
     
     
    Show all issues

    Care to add the keys to this?

  3. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues

    How about "A custom message displayed when the site is in read-only mode."

  4. reviewboard/templates/base.html (Diff revision 1)
     
     
     
     
    Show all issues

    <b> is deprecated. Since you're making this a header, how about just using h2 (since its not the main header of the page, which is what h1 should usually be used for) instead of <span><b>

    1. Wow, I did not know that! I couldn't get it to look good with h2 since it introduces a break-line, so I just styled the span to have a font-weight: bold; attribute.

    2. You can do h2 { display: inline; } to not introduce a line-break.

  5. 
      
KH
KH
KH
brennie
  1. Minor nitpicks. Looks good to me!

  2. reviewboard/admin/context_processors.py (Diff revision 2)
     
     
    Show all issues

    "dictionary will"

  3. reviewboard/admin/context_processors.py (Diff revision 2)
     
     
    Show all issues

    :py:class:`bool`
    
  4. reviewboard/admin/context_processors.py (Diff revision 2)
     
     
     
    Show all issues

    Blank line between these.

  5. reviewboard/admin/context_processors.py (Diff revision 2)
     
     
    Show all issues

    string is not a type, you mean unicode.

    Also, this won't auto link to the correct type. Use:

    :py:class:`unicode`
    
  6. 
      
brennie
  1. 
      
  2. Show all issues

    Mind wrapping your description & testing done at 72 characters?

  3. 
      
KH
KH
Review request changed
Status:
Completed
Change Summary:
Pushed to release-4.0.x (5f7b06b)