<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:zcml="http://namespaces.zope.org/zcml"
    i18n_domain="izug.basetheme">

    <include package=".dashboard_icons" />

  <!-- 'iZug Base Theme' Zope 3 browser layer -->
  <interface
      interface=".interfaces.IThemeSpecific"
      type="zope.publisher.interfaces.browser.IBrowserSkinType"
      name="iZug Base Theme"
      />

  <browser:jbot
     directory="customized"
     layer=".interfaces.IThemeSpecific"
     />

  <browser:page
     for="Products.CMFCore.interfaces.IContentish"
     name="breadcrumbs_view"
     class=".navigation.PhysicalNavigationBreadcrumbs"
     permission="zope2.View"
     layer=".interfaces.IThemeSpecific"
     />

  <!-- we have to override portal_tabs_view here because if we need actions
  displayed in the global navigation they have to be last instead of first -->
  <browser:page
      zcml:condition="not-have opengever"
      for="*"
      name="portal_tabs_view"
      class=".navigation.CatalogNavigationTabs"
      permission="zope.Public"
      allowed_attributes="topLevelTabs"
      layer=".interfaces.IThemeSpecific"
      />
  <browser:page
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      name="test_icons"
      class=".testicons.TestIconsView"
      template="testicons.pt"
      permission="zope2.Public"
      />

    <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        name="folder_overview"
		permission="zope2.View"
        template="folder_overview.pt"
		layer=".interfaces.IIzugSpecific"
        />

  <browser:viewlet
      name="izug.path_bar"
      manager="plone.app.layout.viewlets.interfaces.IAboveContent"
      class=".viewlets.PathBar"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      for="*"
      />

  <browser:viewlet
      name="plone.personal_bar"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.IZugPersonalBar"
      permission="zope2.View"
      layer=".interfaces.IOpengeverSpecific"
      />

  <browser:viewlet
      name="plone.personal_bar"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.IZugPersonalBar"
      permission="zope2.View"
      layer=".interfaces.IIzugSpecific"
      />

  <!-- izug4 refbrowser popup-->
  <browser:page
      zcml:condition="have plone-4"
      name="refbrowser_popup"
      permission="zope2.Public"
      for="*"
      layer=".interfaces.IIzug4Specific"
      class=".custom_refbrowser.ReferenceBrowserPopup"
      />

  <!-- izug4 specific personal bar viewlet -->
  <browser:viewlet
      name="plone.personal_bar"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.IZugPersonalBar"
      permission="zope2.View"
      layer=".interfaces.IIzug4Specific"
      />

  <!-- izug4 specific comment viewlet -->
    <browser:viewlet
        name="plone.comments"
        for="Products.CMFCore.interfaces.IContentish"
        layer=".interfaces.IIzug4Specific"
        manager="plone.app.layout.viewlets.interfaces.IBelowContent"
        view="plone.app.layout.globals.interfaces.IViewView"
        class="plone.app.layout.viewlets.comments.CommentsViewlet"
        permission="zope2.View"
        />

  <browser:viewlet
      name="plone.personal_bar"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.ZugPersonalBar"
      permission="zope2.View"
      layer=".interfaces.IDirectorySpecific"
      />

  <!-- override for searchbox title-translation-->
  <browser:viewlet
      name="plone.searchbox"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.SearchBoxViewlet"
      permission="zope2.View"
      layer=".interfaces.IIzugSpecific"
      />

  <browser:viewlet
      name="plone.searchbox"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.IZugSearchBoxViewlet"
      permission="zope2.View"
      layer=".interfaces.IIzug4Specific"
      />

  <browser:viewlet
      name="plone.searchbox"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.GeverSearchBoxViewlet"
      permission="zope2.View"
      layer=".interfaces.IOpengeverSpecific"
      />

  <!-- zug.ch-specific personal bar viewlet -->
  <browser:viewlet
      name="plone.personal_bar"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.ZugPersonalBar"
      permission="zope2.View"
      layer=".interfaces.IZugSpecific"
      />

  <browser:viewlet
      name="plone.site_actions"
      manager="plone.app.layout.viewlets.interfaces.IBelowContent"
      class=".viewlets.SiteActions"
      permission="zope2.View"
      layer=".interfaces.IOpengeverSpecific"
      />

  <!-- zug.ch need a customized site_actions-viewlet -->
  <browser:viewlet
      zcml:condition="not-have opengever"
      name="plone.site_actions"
      manager="plone.app.layout.viewlets.interfaces.IBelowContent"
      class=".viewlets.ZugSiteActions"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      />

  <browser:viewlet
      name="plone.abovecontenttitle.documentactions"
      manager="plone.app.layout.viewlets.interfaces.IAboveContentTitle"
      class=".viewlets.DocumentActions"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      />

  <browser:viewlet
      name="plone.abovecontenttitle.documentactions"
      manager="plone.app.layout.viewlets.interfaces.IAboveContentTitle"
      class=".viewlets.DocumentActionsIzug4"
      permission="zope2.View"
      layer=".interfaces.IIzug4Specific"
      />



  <browser:viewlet
      name="plone.belowcontenttitle.documentbyline"
      manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
      class=".viewlets.Byline"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      />

  <browser:viewlet
      name="debug-info"
      manager="plone.app.layout.viewlets.interfaces.IPortalTop"
      class=".viewlets.DebugInfo"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      />

  <browser:viewlet
      name="izug.banner"
      manager="plone.app.layout.viewlets.interfaces.IPortalHeader"
      class=".viewlets.Banner"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      for="*"
      />

  <!-- izug specific -->
  <!-- new edit menu on top of the page -->
  <browser:viewlet
      name="izug.editmenu"
  	  for="*"
      manager="plone.app.layout.viewlets.interfaces.IPortalTop"
      class=".viewlets.ZugEditMenu"
      permission="zope2.View"
      layer="izug.basetheme.browser.interfaces.IIzugSpecific"
      />

  <browser:viewlet
      name="izug.documentbyline"
      manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
      class=".viewlets.ZugBylineViewlet"
      permission="zope2.View"
  	  layer="izug.basetheme.browser.interfaces.IIzugSpecific"
      />


  <browser:viewlet
      name="izug.dropdowncontentmenu"
      manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
      class=".viewlets.ContentMenuViewlet"
      permission="zope2.View"
      layer="izug.basetheme.browser.interfaces.IIzugSpecific"
      />


  <!-- izug/zug.ch special folder_contents -->
  <browser:page
      for="Products.Archetypes.interfaces.IBaseObject"
      class=".foldercontents.IzugFolderContentsView"
      name="folder_contents"
      template="foldercontents.pt"
      layer="izug.basetheme.browser.interfaces.IIzugSpecific"
      permission="cmf.ListFolderContents" />

  <browser:page
       for="Products.Archetypes.interfaces.IBaseObject"
       class=".foldercontents.FolderContentsKSSView"
       attribute="update_table"
       name="foldercontents_update_table"
       layer="izug.basetheme.browser.interfaces.IIzugSpecific"
       permission="cmf.ListFolderContents" />

   <browser:page
       for="Products.Archetypes.interfaces.IBaseObject"
       class=".foldercontents.IzugFolderContentsView"
       name="folder_contents"
       template="foldercontents.pt"
       layer="izug.basetheme.browser.interfaces.IZugSpecific"
       permission="cmf.ListFolderContents" />

   <browser:page
        for="Products.Archetypes.interfaces.IBaseObject"
        class=".foldercontents.FolderContentsKSSView"
        attribute="update_table"
        name="foldercontents_update_table"
        layer="izug.basetheme.browser.interfaces.IZugSpecific"
        permission="cmf.ListFolderContents" />


  <!-- A content provider showing the menu customised for izug -->
  <adapter
      for="Products.ATContentTypes.interface.interfaces.IATContentType
           .interfaces.IIzugSpecific
           *"
      factory=".contentmenu.ContentMenuProvider"
      name="plone.contentmenu"
      provides="zope.contentprovider.interfaces.IContentProvider"
      />

  <!-- ftw.contentmenu adjustments -->

    <browser:viewlet
        name="izug.basethem.belowcontenttitle.contentviews"
        layer="izug.basetheme.browser.interfaces.IThemeSpecific"
        manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
        class=".contentviews.ContentViews"
        permission="zope2.View"
        zcml:condition="have plone-4"
        />

    <!-- Register contentactions for the egov conteviews vielet-->
    <browser:viewlet
        name="plone.contentactions"
        layer="izug.basetheme.browser.interfaces.IThemeSpecific"
        for="*"
        manager="plone.app.layout.viewlets.interfaces.IContentViews"
        class="plone.app.layout.viewlets.common.ContentActionsViewlet"
        permission="zope2.View"
        zcml:condition="have plone-4"
        />

  <!-- for plone 3 only -->
  <browser:viewlet
      name="ftw.contentviews"
	  zcml:condition="not-installed plone.app.upgrade"
      manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
      template="viewlets_templates/contentviews.pt"
      permission="zope2.View"
      layer=".interfaces.IThemeSpecific"
      />

  <browser:viewlet
      name="izug.basetheme-colorization"
      manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
      template="viewlets_templates/colorization.pt"
      class=".colorization.ColorizationViewlet"
      permission="zope2.View"
      />

</configure>
