Add read-only banner under navbar
Review Request #8812 — Created March 11, 2017 and submitted
Information | |
---|---|
khp | |
Review Board | |
master | |
|
|
8861, 8824, 8847 | |
Reviewers | |
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
Description | From | Last Updated |
---|---|---|
Can you wrap your description at 72 characters? |
|
|
Please attach a screenshot. |
|
|
Just one newline here? |
![]() |
|
It looks like these lines should be indented by an addition one space? |
![]() |
|
Can you change these to read-only-... instead? It's nicer than readonly. |
|
|
Can you make these colours into constants in defs.less? |
|
|
Can you make these constants in defs.less? |
|
|
Where does the 20px come from? It'd be nice to have this value in defs.less. |
|
|
Can you change this to read_only_banner? |
|
|
This would be much nicer as read_only_banner.html. Although, is there really any reason to split that off into another file? … |
|
|
Should have the same name as the block. Helps to catch problems as code shuffles around, as Django will do … |
|
|
Can you rename this to readonly_banner.html ? |
|
|
If this file is included, then this check was already done. No need to duplicate it here. |
|
|
Instead of "Site" how about "Review Board" |
|

-
-
-
reviewboard/templates/base.html (Diff revision 1) It looks like these lines should be indented by an addition one space?

-
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
-
-
-
-
reviewboard/static/rb/css/pages/base.less (Diff revision 2) Can you make these colours into constants in
defs.less
? -
reviewboard/templates/base/readonlybanner.html (Diff revision 2) Can you rename this to
readonly_banner.html
?
-
-
reviewboard/static/rb/css/pages/base.less (Diff revision 2) Can you change these to
read-only-...
instead? It's nicer thanreadonly
. -
reviewboard/static/rb/css/pages/base.less (Diff revision 2) Can you make these constants in
defs.less
? -
reviewboard/static/rb/css/pages/base.less (Diff revision 2) Where does the
20px
come from? It'd be nice to have this value indefs.less
. -
-
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.
-
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.
-
reviewboard/templates/base/readonlybanner.html (Diff revision 2) If this file is included, then this check was already done. No need to duplicate it here.
Change Summary:
Wrap description
Description: |
|
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Added Files: |

-
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