<?xml version="1.0"?>
<component name="org.esup.theme.nuxeo.default">
<require>org.nuxeo.theme.nuxeo.default</require>
<require>org.nuxeo.theme.nuxeo.virtualnavigation</require>
<!-- perspectives -->
  <extension target="org.nuxeo.theme.services.ThemeService" point="perspectives">

    <perspective name="view_calendar">
      <title>Calendar management mode</title>
    </perspective>

    <perspective name="multiple_domains">
      <title>Perspective for multiple domains</title>
    </perspective>

  </extension>
<!-- theme -->
<extension target="org.nuxeo.theme.services.ThemeService" point="themes">
    <theme>
      <src>themes/esup-document-management.xml</src>
    </theme>
  </extension>

<!-- views -->
<extension point="views" target="org.nuxeo.theme.services.ThemeService">
    <view name="Esup logo" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/esup_logo.xhtml</template>
    </view>
    <view name="Nuxeo DM logo (Galaxy Theme)" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/logo_DM_galaxy.xhtml</template>
    </view>
    <view name="nuxeo5 includes" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/includes.xhtml</template>
      <resource>dragdrop.js</resource>
      <resource>seam-remote.js</resource>
      <resource>bsn.AutoSuggest_2.1.3.js</resource>
      <resource>foldable-box.js</resource>
      <resource>window.js</resource>
      <resource>window_effects.js</resource>
      <resource>waitdlg.js</resource>
      <!-- include JS used for D&D and tableSelection -->
      <resource>utils.js</resource>
      <!-- include JS for contextual menu -->
      <resource>jquery.js</resource>
      <resource>jquery.fancybox.js</resource>
      <resource>jquery.fancybox.style.css</resource>
      <resource>fancybox-popup-utils.js</resource>
      <resource>contextmenu.js</resource>
      <resource>jquery.tools.tooltip.min.js</resource>
      <resource>jquery.tools.focusfirst.js</resource>
      <resource>jquery.hotkeys.js</resource>
      <resource>sarissa-ie-workaround.js</resource>
    </view>
    <view name="Nuxeo header" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/nuxeo_header.xhtml</template>
      <resource>screen.css</resource>
    </view>
    <view name="Esup header" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/esup_header.xhtml</template>
      <resource>screen.css</resource>
    </view>
    <view name="nuxeo5 breadcrumbs" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/breadcrumb.xhtml</template>
    </view>
    
    
    <view name="nuxeo5 tree explorer" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/tree_explorer.xhtml</template>
    </view>
    <view name="nuxeo5 directory tree explorer" template-engine="jsf-facelets">
      <!-- Fragment (not enabled in the default theme)
        that displays trees of [x]vocabularies to perform queries
        based on a hierarchical meta data. See the DirectoryTreeService
        extension point for more info on how to use this fragment.
      -->
      <format-type>widget</format-type>
      <template>incl/directory_tree_explorer.xhtml</template>
    </view>
    <view name="nuxeo5 clip board" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/user_clipboard.xhtml</template>
      <resource>dragdrop.js</resource>
    </view>
    <view name="Esup footer" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/esup_footer.xhtml</template>
    </view>
    <view name="Nuxeo footer" template-engine="jsf-facelets">
      <format-type>widget</format-type>
      <template>incl/nuxeo_footer.xhtml</template>
    </view>
  </extension>
<!-- flavors -->
<extension point="flavors" target="org.nuxeo.theme.styling.service">

    <flavor name="defaultEsup">
      <label>label.theme.flavor.nuxeo.default</label>
      <logo>
        <path>/img/logoBx1.png</path>
        <previewPath>/img/logoBx1.png</previewPath>
        <width>269</width>
        <height>45</height>
        <title>Bordeaux 1</title>
      </logo>
      <presetsList>
        <presets category="border" src="themes/palettes/default-borders.properties"/>
        <presets category="background" src="themes/palettes/default-backgrounds.properties"/>
        <presets category="font" src="themes/palettes/default-fonts.properties"/>
        <presets category="color" src="themes/palettes/default-colors.properties"/>
      </presetsList>
      <palettePreview>
        <colors>
          <color>#cfecff</color>
          <color>#70bbff</color>
          <color>#4e9ae1</color>
          <color>#fff</color>
          <color>#fff</color>
          <color>#0079a6</color>
          <color>#00416b</color>
          <color>#332e2e</color>
          <color>#cfecff</color>
        </colors>
      </palettePreview>
    </flavor>
</extension>
<!-- styles -->
<extension target="org.nuxeo.theme.styling.service" point="styles">
 <style name="esupStyle">
      <src>themes/css/esupStyle.css</src>
</style>
</extension>


<!-- Pages -->
<extension target="org.nuxeo.theme.styling.service" point="pages">
    <themePage name="esup/print">
      <defaultFlavor>default</defaultFlavor>
      <flavors>
        <flavor>defaultEsup</flavor>
      </flavors>
      <flavors>
        <flavor>rainbow</flavor>
      </flavors>
      <styles>
        <style>print_generic</style>
      </styles>
    </themePage>

    <themePage name="esup/popup">
      <defaultFlavor>defaultEsup</defaultFlavor>
      <flavors>
        <flavor>default</flavor>
        <flavor>rainbow</flavor>
      </flavors>
      <styles>
        <style>basics</style>
        <style>buttons_and_actions</style>
        <style>body</style>
        <style>navigation</style>
        <style>tables</style>
        <style>forms</style>
        <style>messages_and_tooltips</style>
        <style>foldable_boxes</style>
        <style>richfaces_components</style>
        <style>tabs_content</style>
        <style>nuxeo_dm_specific</style>
      </styles>
    </themePage>

    <themePage name="esup/default">
      <defaultFlavor>defaultEsup</defaultFlavor>
      <flavors>
        <flavor>default</flavor>
        <flavor>rainbow</flavor>
      </flavors>
      <styles>
        <style>basics</style>
        <style>buttons_and_actions</style>
        <style>header</style>
        <style>body</style>
        <style>footer</style>
        <style>navigation</style>
        <style>tables</style>
        <style>forms</style>
        <style>popups</style>
        <style>breadcrumb</style>
        <style>messages_and_tooltips</style>
        <style>foldable_boxes</style>
        <style>drag_and_drop</style>
        <style>richfaces_components</style>
        <style>tabs_content</style>
        <style>nuxeo_dm_specific</style>
		<style>esupStyle</style>
      </styles>
    </themePage>
  </extension>

<!-- negotiation -->
<extension target="org.nuxeo.theme.services.ThemeService" point="applications">
<application root="${org.nuxeo.ecm.contextPath}"
      template-engine="jsf-facelets">

      <negotiation>
        <strategy>nuxeo5</strategy>
        <default-engine>default</default-engine>
        <default-theme>esup/default</default-theme>
        <default-perspective>default</default-perspective>
      </negotiation>

      <!-- Cache control for theme resources (/nxthemes-lib/) -->
      <resource-caching>
        <lifetime>36000</lifetime>
      </resource-caching>

      <!-- Cache control for theme styles (/nxthemes-css/) -->
      <style-caching>
        <lifetime>900</lifetime>
      </style-caching>

      <view id="/create_relation_search_document_popup.xhtml">
        <theme>galaxy/popup</theme>
      </view>
      <view id="/view_calendar.xhtml">
        <perspective>view_calendar</perspective>
      </view>
      <view id="/print.xhtml">
        <perspective>print</perspective>
      </view>
      <view id="/editor_link_search_document.xhtml">
        <theme>galaxy/popup</theme>
      </view>
      <view id="/editor_image_upload.xhtml">
        <theme>galaxy/popup</theme>
      </view>
      <view id="/search/choose_searchscope_popup.xhtml">
        <theme>galaxy/popup</theme>
      </view>
    </application>
  </extension>
</component>
