fix banner inception

don't include fixed bottom bar warnings on pages that have been loaded into
iframes and have set @body_class_no_headers.  currently these are only used in
test environments.

test plan:
- in a test environment, go to speedgrader to an assignment with submission
  previews
- you should have the "test environment" warning along the bottom of the page,
  but it should not be duplicated inside of the preview area.

Change-Id: I9a8c7162cd2480e5fe17e90079cce8ecd9ca721c
Reviewed-on: https://gerrit.instructure.com/14096
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
This commit is contained in:
Simon Williams 2012-10-02 13:19:07 -06:00
parent 1b648b575a
commit c62a374ebd
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@
content_for :pre_html do
@body_class_no_headers = @headers == false
@show_fixed_bottom = @fixed_warnings.present? || (@real_current_user && @real_current_user != @current_user && (!@body_class_no_headers || @outer_frame))
@show_fixed_bottom = (@fixed_warnings.present? || (@real_current_user && @real_current_user != @current_user)) && (!@body_class_no_headers || @outer_frame)
@body_classes << "no-headers" if @body_class_no_headers
unless (@body_classes.include? "no-headers") || (@show_left_side == false)
left_side = yield :left_side