Expose whether to display the navigation header and footer
320880
def navigation_info(request):
    ''''''
    if request.GET.get('wafer_hide_navigation') == "1":
        nav_class = "wafer-invisible"
    else:
        nav_class = "wafer-visible"
    context = {
        'WAFER_NAVIGATION_VISIBILITY': nav_class,
    }
    return context
605029
def display(self) -> typing.Union[None, report.Report]:
        """"""
        return (
            self._project.current_step.report
            if self._project and self._project.current_step else
            None
        )
202420
function(){
      var headerElement = this.header.element;
      var footerElement = this.footer ? this.footer.element : null;

      //
      // Sync header html
      //
      var headerOuterHTML = domUtils.outerHTML(headerElement);
      if (this.shadowHeaderHTML_ != headerOuterHTML)
      {
        this.shadowHeaderHTML_ = headerOuterHTML;
        replaceTemplateNode(this, 'shadowHeader', headerElement.cloneNode(true));
      }

      //
      // Sync footer html
      //
      if (footerElement)
      {
        var footerOuterHTML = domUtils.outerHTML(footerElement);
        if (this.shadowFooterHtml_ != footerOuterHTML)
        {
          this.shadowFooterHtml_ = footerOuterHTML;
          replaceTemplateNode(this, 'shadowFooter', footerElement.cloneNode(true));
        }
      }

      //
      // Sync column width
      //
      for (var i = 0, column, columnWidth; column = this.columnWidthSync_[i]; i++)
      {
        columnWidth = column.measure.offsetWidth + 'px';
        cssom.setStyleProperty(column.header.firstChild, 'width', columnWidth);
        if (footerElement)
          cssom.setStyleProperty(column.footer.firstChild, 'width', columnWidth);
      }

      //
      // Calc metrics boxes
      //
      var tableWidth = this.tmpl.boundElement.offsetWidth || 0;
      var headerHeight = headerElement.offsetHeight || 0;
      var footerHeight = (footerElement && footerElement.offsetHeight) || 0;

      //
      // Update style properties
      //
      this.tmpl.headerExpandCell.style.left = tableWidth + 'px';
      this.tmpl.footerExpandCell.style.left = tableWidth + 'px';
      this.tmpl.tableElement.style.margin = '-' + headerHeight + 'px 0 -' + footerHeight + 'px';

      if (this.fitToContainer)
        this.element.style.paddingBottom = (headerHeight + footerHeight) + 'px';

      // reset timer
      // it should be at the end of relayout to prevent relayout call while relayout
      this.timer_ = basis.clearImmediate(this.timer_);
    }
475727
function() {
            var headerID = this.id + '__header';
            var $header = this.$pinny.find('h1, .' + classes.TITLE).first();
            var $wrapper = this.$pinny.find('.' + classes.WRAPPER);

            // Lockup a11y fix
            // Instead of making whole lockup container aria hidden,
            // just make page content aria hidden, since otherwise pinny
            // cannot be read by screenreaders
            this.$container.attr('aria-hidden', 'false');

            this.$pinny
                .attr('role', 'dialog')
                .attr('aria-labelledby', headerID)
                .attr('aria-hidden', 'true')
                .attr('tabindex', '-1');

            $wrapper
                .attr('role', 'document');

            $header
                .attr('id', headerID);
        }
983138
public function isDisplayable() {
        $displayable = $this->enable && $this->visible;
        if (true === $displayable) {
            return true;
        }
        foreach ($this->getNodes() as $current) {
            if (false === ($current instanceof AbstractNavigationNode)) {
                continue;
            }
            if (true === $current->isDisplayable()) {
                return true;
            }
        }
        return $displayable;
    }
528631
function is_page_visible( $slug ) {
            if ( $this->is_admin_page( $slug ) ) {
                return true;
            }

            return $this->_menu->is_submenu_item_visible( $slug, true, true );
        }
522377
def horizon_main_nav(context):
    """"""
    if 'request' not in context:
        return {}
    current_dashboard = context['request'].horizon.get('dashboard', None)
    dashboards = []
    for dash in Horizon.get_dashboards():
        if dash.can_access(context):
            if callable(dash.nav) and dash.nav(context):
                dashboards.append(dash)
            elif dash.nav:
                dashboards.append(dash)
    return {'components': dashboards,
            'user': context['request'].user,
            'current': current_dashboard,
            'request': context['request']}
840848
function () {

            // Note: Controllers are responsible of setting needRedraw.
            if (this.needRedraw) {

                // Create root element for the page
                var page = document.createElement('div');
                page.style.display = 'block';
                page.setAttribute('data-role', 'page');

                // Create, render and add the header
                if (this.header) {
                    var header = document.createElement('div');
                    header.setAttribute('data-role', 'header');
                    this.header.setElement(header);
                    this.header.render();
                    page.appendChild(header);
                }

                // Create the content element
                var content = document.createElement('div');
                content.setAttribute('data-role', 'content');
                content.className = 'content';

                // Render the content
                this.content.setElement(content);
                this.content.render();

                // Make sure content fills the screen to the top/bottom
                // when no header/footer are provided.
                if (!this.header) {
                    content.style.top = '0';
                }
                if (!this.footer) {
                    content.style.bottom = '0';
                }

                page.appendChild(content);

                // Create, render and add the footer
                if (this.footer) {
                    var footer = document.createElement('div');
                    footer.setAttribute('data-role', 'footer');
                    this.footer.setElement(footer);
                    this.footer.render();
                    page.appendChild(footer);
                }

                // Add the page into the DOM.
                if (this.el.firstChild) {
                    this.el.replaceChild(page, this.el.firstChild);
                }
                else {
                    this.el.appendChild(page);
                }
 
                this.needRedraw = false;
            }
        }
574953
public boolean isAnyHeadingFooting()
    {
        boolean bHeadingFootingExists = false;
        int iNumCols = this.getSFieldCount();
        for (int iIndex = 0; iIndex < iNumCols; iIndex++)
        {
            ScreenField sField = this.getSField(iIndex);
            if (sField == this.getReportHeading())
                continue;	// Report headings and footings don't count, only detail headings and footings
            if (sField == this.getReportFooting())
                continue;
            if (sField == this.getReportDetail())
            	continue;
            if ((sField.getDisplayFieldDesc() & HtmlConstants.HEADING_SCREEN) == 0)
                bHeadingFootingExists = true;   // Yes, there is a heading or footing.
            if ((sField.getDisplayFieldDesc() & HtmlConstants.FOOTING_SCREEN) == 0)
                bHeadingFootingExists = true;   // Yes, there is a heading or footing.
        }
        return bHeadingFootingExists;
    }
410541
def _prior_headerfooter(self):
        """"""
        preceding_sectPr = self._sectPr.preceding_sectPr
        return (
            None if preceding_sectPr is None
            else _Footer(preceding_sectPr, self._document_part, self._hdrftr_index)
        )
221078
function() {
        var win = $(window),
            options = this.options,
            element = this.element,
            parent = options.context ? element.parents(options.context) : element.parent();

        this.viewport = {
            width: win.width(),
            height: win.height()
        };

        this.elementHeight = element.outerHeight(true); // Include margin
        this.parentHeight = parent.height(); // Exclude padding
        this.parentTop = parent.offset().top;

        // Disable pin if element is larger than the viewport
        if (options.lock && this.elementHeight >= this.viewport.height) {
            this.active = false;

        // Enable pin if the parent is larger than the child
        } else {
            this.active = (element.is(':visible') && this.parentHeight > this.elementHeight);
        }
    }
145656
private boolean isAlwaysShow(Component comp) {

        return ((comp == m_appIndicator)
            || (comp == m_contextMenu)
            || (comp == m_userDropDown)
            || (comp == m_quickLaunchDropDown)
            || comp.getStyleName().contains(OpenCmsTheme.REQUIRED_BUTTON));
    }
1160628
function() {
        this.renderHeader();
        for (var p=0;p<this.pages.length;++p) {
            var cal = this.pages[p];
            cal.render();
        }
        this.renderFooter();
    }
527709
@Override
    public void renderHead(final IHeaderResponse response) {
        // select bootstrap tab for current theme selected
        int selectedTab = this.getSelectedTab();
        response.render(OnDomReadyHeaderItem.forScript("$('#themes li:eq("
                + selectedTab + ") a').tab('show');"));
    }
951524
public function isFooterShown($isFirst = false, $isMiddle = false, $isLast = false)
    {
        return $this->isShown('Footer', $isFirst, $isMiddle, $isLast);
    }
767872
def visible?(page)
      # outer
      if outer > 0
        return true if outer >= page
        return true if (pages - outer) < page
      end

      # current page
      return true if current_page == page

      # inner
      return true if inner_range.include? page

      false
    end
737811
public void setHeaderVisible(boolean visible) {

        String style = I_CmsSitemapLayoutBundle.INSTANCE.sitemapCss().headerContainerVaadinMode();
        if (visible) {
            m_headerContainer.removeStyleName(style);
        } else {
            m_headerContainer.addStyleName(style);
        }
    }