<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    >

  <include
      package="ploneintranet.layout"
      file="permissions.zcml"
      />
  <include file="baseviews.zcml" />

  <browser:page
      name="library"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".views.LibraryHomeView"
      permission="ploneintranet.viewsite"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.library.content.ILibraryApp"
      class=".views.LibraryAppView"
      template="templates/library.html"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.library.content.ILibrarySection"
      class=".views.LibrarySectionView"
      template="templates/library.html"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.library.content.ILibraryFolder"
      class=".views.LibraryFolderView"
      template="templates/library.html"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="breadcrumbs_view"
      for="*"
      class="ploneintranet.layout.viewlets.navigation.OneLevelBreadcrumbs"
      allowed_attributes="breadcrumbs"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="tag"
      for="ploneintranet.library.content.ILibraryApp"
      class=".views.LibraryTagView"
      template="templates/library.html"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="tag"
      for="ploneintranet.library.content.ILibrarySection"
      class=".views.LibraryTagView"
      template="templates/library.html"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="panel-download-library-content"
      for="*"
      class=".download_as_pdf.PickerView"
      template="templates/panel-download-library-content.pt"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="download-topic-as-pdf"
      for="*"
      class=".download_as_pdf.DownloadTopicView"
      template="templates/panel-download-library-content.pt"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="download-list-link"
      for="*"
      class=".download_list.LinkView"
      template="templates/download_list_link.pt"
      permission="zope2.View"
      layer="ploneintranet.library.interfaces.IPloneintranetLibraryLayer"
      />

  <browser:page
      name="more-menu"
      for="ploneintranet.library.content.ILibraryContainer"
      class=".views.LibraryBaseView"
      template="templates/more-menu.pt"
      permission="cmf.ModifyPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="panel-edit-library-section"
      for="ploneintranet.library.content.ILibraryContainer"
      class=".library_container.PanelEditLibrarySection"
      template="templates/panel-edit-library-section.pt"
      permission="cmf.ModifyPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="panel-create-library-section"
      for="ploneintranet.library.content.ILibraryApp"
      class=".library_container.PanelCreateLibrarySection"
      template="templates/panel-create-library-section.pt"
      permission="cmf.AddPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="panel-create-library-section"
      for="ploneintranet.library.content.ILibraryContainer"
      class=".library_container.PanelCreateLibraryFolder"
      template="templates/panel-create-library-section.pt"
      permission="cmf.AddPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <configure package="ploneintranet.layout.browser">
    <browser:page
        name="workflow_menu"
        for="*"
        class="ploneintranet.library.browser.workflow.LibraryWorkflowMenu"
        template="templates/workflow_menu.pt"
        permission="zope2.View"
        layer="ploneintranet.library.interfaces.ILibraryContentLayer"
        />
  </configure>

</configure>
