<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<tr:document xmlns="http://www.w3.org/1999/xhtml"
             xmlns:ui="http://java.sun.com/jsf/facelets"
             xmlns:h="http://java.sun.com/jsf/html"
             xmlns:f="http://java.sun.com/jsf/core"
             xmlns:tr="http://myfaces.apache.org/trinidad">
  <f:facet name="metaContainer">
    <!-- 
         Insert the title that is defined in the page. If no title is defined,
         use "** NO TITLE SET **" as default title.
    -->
      <!-- 
           Include the CSS stylesheet 
      -->
    <h:panelGroup>
      <link rel="stylesheet" href="/MIAS/templates/mias.css"/>
      <title>
        <ui:insert name="title" >** NO TITLE SET **</ui:insert>
      </title>
    </h:panelGroup>
  </f:facet>

  <!-- 
       Load our application-wide resource bundle, so it's available on all
       pages that use this template.
  -->
  <f:loadBundle basename="inc.monsters.mias.Messages" var="msg"/>
  
  <!--
       The "header" div element can be used by the CSS to format the page 
       header. 
  -->
  <div id="header">
    <!-- 
         Unless an alternative header is defined in the page, the file
         "header.xhtml" will be included as page header. We pass the
         application title as a parameter to the "header.xhtml" file. 
    -->
    <ui:insert name="header">
      <ui:include src="header.xhtml">
        <ui:param name="appTitle" value="Monsters, Inc. Administration System"/>
      </ui:include>
    </ui:insert>
  </div>

  <!--
       We re-use the value of "title" here to add a heading to the page. 
  -->
  <div id="content">
    <tr:form usesUpload="#{usesUpload}">
    <p>
        <tr:breadCrumbs var="m" value="#{miasMenu}" orientation="horizontal">
          <f:facet name="nodeStamp">
            <tr:commandNavigationItem text="#{m.label}"
                                      action="#{m.doAction}"/>
          </f:facet>
        </tr:breadCrumbs>
    </p>
    <p>
        <tr:goLink destination="/logout" text="Logout"/>

        
    </p>
    
    <h2> <ui:insert name="title" /> </h2>
    <!--
         The page should use a ui:define to define the content of the 
         page, that will be substituted here. 
    -->
    <ui:insert name="content" />
    </tr:form>
  </div>

  <div id="footer">
    <ui:insert name="footer">
      <ui:include src="footer.xhtml" />
    </ui:insert>
  </div>
  
  <!--
       This will enable the Facelets debug feature and assign the hotkey
       SHIFT+CTRL+D to it. 
  -->
  <ui:debug hotkey="d" rendered="true"/>
</tr:document>