<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://primefaces.org/ui" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <!--@elvariable id="msgs" type="de.ivu.elect.business.lokalisierung.control.LokalisierungResourceBundle"-->

    <div class="ui-widget page-header__wrapper">
        <div class="page-header__brand-logo" style="background-color: #{layoutComponentsContext.logoFarbe};">
            <h:outputLink rel="first" value="#{request.contextPath}/#{layoutComponentsContext.logoUrlString}" title="#{msgs['app.name.full']}">
                <h:graphicImage library="images" name="app-logo-200x40.png" alt="#{msgs['app.name']}" />
            </h:outputLink>
        </div>
        <div id="app-logo" class="page-header__app-logo" title="#{msgs['app.name.full']}">
            <div>
                <h:outputText value="#{msgs['app.name.short']}" />
            </div>
        </div>

        <!-- NOTE that this must/should reuse the PrimeFaces style classes! -->
        <div class="page-header__context-heading #{not layoutComponentsContext.selected ? 'ui-state-selected' : 'ui-state-default'}">
            <h:outputText value="#{layoutComponentsContext.heading}" />

                <c:if test="#{layoutComponentsContext.subcontextPresent}">
                    <p:outputPanel layout="inline" deferred="true" styleClass="sub" style="padding-top: 0.2em;" id="subcontextPresentPnl">
                        <h:outputText id="lblSubcontext" value="" escape="false" />
                        <h:outputText id="lblSubcontextContent" value="#{layoutComponentsContext.subcontextName}" />
                    </p:outputPanel>
                </c:if>
                <c:if test="#{not layoutComponentsContext.subcontextPresent}">
                    <!-- id muss vorhanden sein -->
                    <h:outputText id="lblSubcontextContent" value="" />
                </c:if>
        </div>
    </div>
    <nav id="ctnMainServiceMenu" role="navigation" aria-label="#{msgs['page.layout.service.menu.label']}" class="page-nav-service">
        <ui:insert name="mainServiceMenu">
            <ui:include src="/WEB-INF/templates/main-service-menu.xhtml" />
        </ui:insert>
        
    </nav>

</ui:composition>
