| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| --> |
| |
| <tc:header fixed="true" |
| xmlns:tc="http://myfaces.apache.org/tobago/component" |
| xmlns:f="http://java.sun.com/jsf/core"> |
| |
| <!-- tbd: how to solve this? --> |
| |
| <!-- |
| <tc:flexLayout columns="auto 1fr" alignItems="center"> |
| |
| <tc:image value="image/feather-leaf.png"/> |
| --> |
| |
| <tc:bar id="bar" markup="togglerLeft, light, large"> |
| <tc:style customClass="bg-light box-shadow"/> |
| <f:facet name="brand"> |
| <!-- label="Tobago Demo" contains a NO-BREAK SPACE character --> |
| <tc:link image="#{request.contextPath}/image/feather-leaf.png" label="Tobago Demo" id="brand" |
| link="http://tobago-vm.apache.org/"/> |
| </f:facet> |
| |
| <tc:form id="header"> |
| |
| <tc:links id="commands"> |
| |
| <tc:link id="config" label="Configuration" omit="true"> |
| <tc:link label="Theme" omit="true"> |
| <tc:selectOneRadio value="#{themeController.theme}"> |
| <tc:event action="#{themeController.submit}"/> |
| <tc:selectItems value="#{themeController.themeItems}"/> |
| </tc:selectOneRadio> |
| </tc:link> |
| <!--<tc:link action="#{themeController.resetTheme}" label="Reset Theme"/>--> |
| <tc:link label="Locale"> |
| <tc:selectOneRadio value="#{localeController.locale}"> |
| <tc:event action="#{localeController.submit}"/> |
| <tc:selectItems value="#{localeController.localeItems}"/> |
| </tc:selectOneRadio> |
| </tc:link> |
| <tc:link outcome="/login.xhtml" label="Login" rendered="#{request.userPrincipal == null}"/> |
| <tc:link action="#{loginController.logout}" label="Logout '#{request.userPrincipal.name}'" rendered="#{request.userPrincipal != null}"/> |
| <tc:link action="#{loginController.resetSession}" label="Reset Session"/> |
| </tc:link> |
| |
| <tc:link label="Test" omit="true"> |
| <tc:link id="runtest" label="Run test" outcome="/test.xhtml" |
| immediate="true" disabled="#{!testController.hasTest()}"> |
| <f:param name="base" value="#{testController.base}"/> |
| </tc:link> |
| <tc:link label="Run all tests" outcome="/testAll.xhtml" target="_blank" |
| immediate="true" rendered="#{facesContext.isProjectStage('Development')}"/> |
| <tc:link label="Access all pages" outcome="/testAccessAllPages.xhtml" target="_blank" |
| immediate="true" rendered="#{facesContext.isProjectStage('Development')}"/> |
| </tc:link> |
| |
| <tc:link label="Menu" omit="true"> |
| <tc:link label="Menu Item" omit="true"> |
| <tc:dataAttribute name="alert-text" value="Demo Message"/> |
| </tc:link> |
| <tc:separator/> |
| <tc:link label="Sub Menu" omit="true"> |
| <tc:link label="Sub 1" omit="true"/> |
| <tc:link label="Sub 2" omit="true"/> |
| <tc:link label="Sub 3" omit="true"/> |
| <tc:link action="doit" label="Sub 4" omit="true"> |
| <tc:link label="Sub 4 1" omit="true"/> |
| <tc:link label="Sub 4 2" omit="true"/> |
| <tc:link label="Sub 4 3" omit="true"/> |
| </tc:link> |
| <tc:link label="Sub 5" omit="true"> |
| <tc:link label="Sub 5 1" omit="true"/> |
| <tc:link label="Sub 5 2" omit="true"/> |
| </tc:link> |
| </tc:link> |
| </tc:link> |
| |
| <tc:link label="Info" omit="true"> |
| <tc:link label="About" omit="true"> |
| <tc:dataAttribute name="alert-text" value="Tobago Demo - #{serverInfo.version}"/> |
| </tc:link> |
| <tc:link omit="true" label="Client Info" id="headerInfo"> |
| <tc:operation name="show" for=":::info"/> |
| </tc:link> |
| <tc:link outcome="/server-info.xhtml" immediate="true" label="Server Info" disabled="#{! serverInfo.enabled}"/> |
| <tc:link outcome="/logging-info.xhtml" immediate="true" label="Logging Info" |
| disabled="#{! serverInfo.enabled}"/> |
| <tc:separator/> |
| <tc:link link="http://myfaces.apache.org/tobago" label="Tobago Home"/> |
| </tc:link> |
| |
| </tc:links> |
| |
| </tc:form> |
| |
| <f:facet name="after"> |
| <tc:flexLayout columns="auto auto"> |
| <tc:form id="search"> |
| <tc:flexLayout columns="200px auto"> |
| <tc:in id="searchField" placeholder="Search by Google" labelLayout="skip"/> |
| <tc:button id="searchCommand" defaultCommand="true" label="go" |
| link="https://www.google.com/search?q=site%3Atobago-vm.apache.org%2Fdemo-4-snapshot&oq=site%3Atobago-vm.apache.org%2Fdemo-4-snapshot"> |
| <!-- is initialized by demo.js --> |
| </tc:button> |
| </tc:flexLayout> |
| </tc:form> |
| <tc:form id="navbtns"> |
| <tc:flexLayout columns="auto auto"> |
| <tc:buttons> |
| <tc:button immediate="true" id="previous" |
| image="fa-angle-left" |
| action="#{navigationState.gotoPrevious}" |
| disabled="#{navigationState.first}" |
| tip="Previous"/> |
| <tc:button immediate="true" id="next" |
| image="fa-angle-right" |
| action="#{navigationState.gotoNext}" |
| disabled="#{navigationState.last}" |
| tip="Next"/> |
| </tc:buttons> |
| <tc:button action="#{navigationState.toggleViewSource}" |
| image="fa-code" |
| immediate="true" tip="View Source"/> |
| </tc:flexLayout> |
| </tc:form> |
| </tc:flexLayout> |
| </f:facet> |
| </tc:bar> |
| |
| <!-- |
| </tc:flexLayout> |
| --> |
| |
| </tc:header> |