From 08beeb46e9b4f64cdc59e817fcc2bc495d0cd8f0 Mon Sep 17 00:00:00 2001 From: Jolse Maginnis Date: Fri, 21 Dec 2018 10:48:50 +1100 Subject: [PATCH] #635 Only wrap content when needed --- .../scalasrc/com/tle/web/api/LegacyContentApi.scala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/LegacyContentApi.scala b/Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/LegacyContentApi.scala index 6cc10ca6a3..ca4b76f40c 100644 --- a/Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/LegacyContentApi.scala +++ b/Source/Plugins/Core/com.equella.core/scalasrc/com/tle/web/api/LegacyContentApi.scala @@ -412,12 +412,15 @@ class LegacyContentApi { def wrapBody(context: RenderContext, body: SectionRenderable): SectionRenderable = { val decs = Decorations.getDecorations(context) - val cbTag = context.getBody - cbTag.setId("content-body") - val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass) - val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses) - new DivRenderer(citag, new DivRenderer(cbtag, body)) + if (decs.isBanner || !decs.isMenuHidden || decs.isContent) { + val cbTag = context.getBody + cbTag.setId("content-body") + val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass) + val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses) + + new DivRenderer(citag, new DivRenderer(cbtag, body)) + } else body }