Add read-only banner under navbar

Review Request #8812 - Created March 12, 2017 and updated

Kanghee Park
Review Board
master
8810, 8811, 8657, 8648
8861, 8824, 8847
reviewboard, students

Read-only mode is a setting an admin can enable to prevent writes to
the database. This can be used when the site is under maintenence or
being upgraded. This commit adds a banner under the nav bar when the
site is in read-only mode.

Check that the banner appears in read-only mode
Check that the banner does not appear when not in read-only mode

Loading file attachments...

  • 0
  • 0
  • 14
  • 0
  • 14
Description From Last Updated
Review Bot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/templates/base/readonlybanner.html
        reviewboard/templates/base.html
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/templates/base/readonlybanner.html
        reviewboard/templates/base.html
    
    
  2. 
      
Simon Zhang
  1. 
      
  2. reviewboard/static/rb/css/pages/base.less (Diff revision 1)
     
     
     

    Just one newline here?

  3. reviewboard/templates/base.html (Diff revision 1)
     
     
     
     
     
     

    It looks like these lines should be indented by an addition one space?

  4. 
      
Kanghee Park
Review Bot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/templates/base/readonlybanner.html
        reviewboard/templates/base.html
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/templates/base/readonlybanner.html
        reviewboard/templates/base.html
    
    
  2. 
      
Barret Rennie
  1. 
      
  2. Can you wrap your description at 72 characters?

  3. Please attach a screenshot.

  4. reviewboard/static/rb/css/pages/base.less (Diff revision 2)
     
     
     

    Can you make these colours into constants in defs.less?

  5. Can you rename this to readonly_banner.html ?

  6. 
      
Christian Hammond
  1. 
      
  2. Can you change these to read-only-... instead? It's nicer than readonly.

  3. reviewboard/static/rb/css/pages/base.less (Diff revision 2)
     
     
     

    Can you make these constants in defs.less?

  4. Where does the 20px come from? It'd be nice to have this value in defs.less.

  5. reviewboard/templates/base.html (Diff revision 2)
     
     

    Can you change this to read_only_banner?

  6. reviewboard/templates/base.html (Diff revision 2)
     
     

    This would be much nicer as read_only_banner.html.

    Although, is there really any reason to split that off into another file? It seems we could just put it inline here. It's faster than doing an include, and is only 3 lines.

  7. reviewboard/templates/base.html (Diff revision 2)
     
     

    Should have the same name as the block. Helps to catch problems as code shuffles around, as Django will do a name check and make sure blocks line up.

  8. If this file is included, then this check was already done. No need to duplicate it here.

  9. 
      
Kanghee Park
Kanghee Park
Review Bot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/static/rb/css/defs.less
        reviewboard/templates/base.html
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/css/pages/base.less
        reviewboard/static/rb/css/defs.less
        reviewboard/templates/base.html
    
    
  2. 
      
Barret Rennie
  1. 
      
  2. reviewboard/templates/base.html (Diff revision 3)
     
     

    Instead of "Site" how about "Review Board"

  3. 
      
Kanghee Park
Review request changed

Checks run (3 succeeded)

JSHint passed.
PEP8 Style Checker passed.
Pyflakes passed.
Loading...