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

  <include package="plone.app.contentmenu" />

  <!-- -*- extra stuff goes here -*- -->
  
    <browser:viewlet
       name="zopyx.authoring.projectaddform"
       for="zopyx.authoring.interfaces.IAuthoringProject"
       manager="plone.app.layout.viewlets.interfaces.IBelowContentBody"
       template="authoringproject_addform.pt"
       permission="cmf.ModifyPortalContent"
    />


    <!-- Office formats import form -->
    <browser:page
       name="import-office-document-form"
       for="zopyx.authoring.interfaces.IAuthoringContentFolder"
       template="contentfolder_importform.pt"
       permission="cmf.ModifyPortalContent"
    />

    <browser:page
       name="import-office-document"
       permission="cmf.ModifyPortalContent"
       class=".contentfolder.OfficeUpload"
       for="zopyx.authoring.interfaces.IAuthoringContentFolder"
    />
    <browser:page
       name="usage"
       permission="zope2.View"
       template="authoringcontentfolder_usage.pt"
       for="zopyx.authoring.interfaces.IAuthoringContentFolder"
    />

    <!-- Authoring project cleanup drafts -->
    <browser:page
       name="cleanup-project-form"
       template="authoringproject_cleanup_form.pt"
       for="zopyx.authoring.interfaces.IAuthoringProject"
       permission="cmf.ModifyPortalContent"
    />

    <browser:page
       name="cleanup-project"
       attribute="cleanup_project"
       for="zopyx.authoring.interfaces.IAuthoringProject"
       class=".authoringproject.AuthoringProject"
       permission="cmf.ModifyPortalContent"
    />

    <!-- Authoring project add new conversion-->
    <browser:page
       name="add-new-authoringproject"
       attribute="add_authoringproject"
       for="zopyx.authoring.interfaces.IAuthoringProject"
       class=".authoringproject.AuthoringProject"
       permission="cmf.ModifyPortalContent"
    />

    <browser:page
        for="Products.ATContentTypes.interface.folder.IATFolder"
        name="folder_aggregation_view"
        template="folder_aggregation_view.pt"
        permission="zope2.View"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="zope2.View"
      name="authoringtemplate_view"
      template="authoringtemplate_view.pt"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="cmf.ModifyPortalContent"
      name="import_form"
      template="authoringtemplate_import.pt"
      class=".authoringtemplate.AuthoringTemplateView"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="cmf.ModifyPortalContent"
      name="export_form"
      template="authoringtemplate_export.pt"
      class=".authoringtemplate.AuthoringTemplateView"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="cmf.ModifyPortalContent"
      name="export_resource"
      attribute="export_resource"
      class=".authoringtemplate.AuthoringTemplateView"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="cmf.ModifyPortalContent"
      name="sync"
      attribute="sync"
      class=".authoringtemplate.AuthoringTemplateView"
    />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringTemplate"
      permission="cmf.ModifyPortalContent"
      name="import_resource"
      attribute="import_resource"
      class=".authoringtemplate.AuthoringTemplateView"
    />

    <browser:pages
      for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
      permission="cmf.ModifyPortalContent"
      class=".conversionsfolder.ConversionsFolderView">

        <page
          name="redirect-edit-view"
          attribute="redirect_edit_view"
        />

        <browser:page 
          name="generate_pdf"
          attribute="generate_pdf"
        />

        <browser:page 
          name="generate_html_pdf"
          attribute="generate_html_pdf"
        />

        <browser:page 
          name="generate_epub"
          attribute="generate_epub"
        />

        <browser:page 
          name="cleanDrafts"
          attribute="cleanDrafts"
        />

        <browser:page 
          name="publishDraft"
          attribute="publishDraft"
        />

        <browser:page 
          name="publishDropbox"
          attribute="publishDropbox"
        />
    </browser:pages>

    <browser:page
        for="*"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_view.pt"
        name="debug-view"
    />

    <browser:page
        for="*"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_preflight.pt"
        name="debug-preflight"
    />

    <browser:page
        for="*"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_levels.pt"
        name="debug-levels"
    />

    <browser:page
        for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_images.pt"
        name="debug-images"
    />

    <browser:page
        for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        attribute="updateImages"
        name="update-images"
    />


    <browser:page
        for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_anchors.pt"
        name="debug-anchors"
    />

    <browser:page
        for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
        permission="cmf.ModifyPortalContent"
        class=".debug.DebugView"
        template="debug_links.pt"
        name="debug-links"
    />

    <browser:page
      name="asHTML"
      for="..interfaces.IAuthoringPublishedDocument"
      permission="zope2.View"
      class=".types.publisheddocument.HTMLView"
      />

    <browser:page
      name="asHTML"
      for="..interfaces.IAuthoringContentPage"
      permission="zope2.View"
      class=".types.authoringcontentpage.HTMLView"
      />


    <browser:page
      name="asHTML"
      for="..interfaces.IAuthoringContentAggregator"
      permission="zope2.View"
      class=".types.authoringcontentaggregator.HTMLView"
      />

    <browser:page
      for="zopyx.authoring.interfaces.IAuthoringConversionFolder"
      permission="zope2.View"
      template="conversionsfolder_view.pt"
      class=".conversionsfolder.ConversionsFolderView"
      name="conversionsfolder_view"  
    />

    <browser:page 
      for="Products.ATContentTypes.interfaces.IATFolder"
      permission="zope2.View"
      name="download_all"
      class=".folder.DownloadAll"
    />

    <browser:page
        name="sort_folder"
        for="Products.ATContentTypes.interfaces.IATFolder"
        class=".folder.SortFolderView"
        permission="cmf.ModifyPortalContent"
    />

    <browser:page
      for="*"
      permission="zope2.View"
      name="s5_presentation_template"
      template="s5_presentation_template.pt"
    />

    <browser:page
      for="zopyx.smartprintng.plone.interfaces.IPPContent"
      permission="zope2.View"
      name="metaInformation"
      class=".ippcontent.MetaInformation"
      template="ippcontent_metainformation.pt"
    />

    <browser:page
      for="zopyx.smartprintng.plone.interfaces.IPPContent"
      permission="zope2.View"
      name="show_table"
      attribute="show_table"
      class=".ippcontent.TableHandler"
    />

    <browser:page
      for="Products.ATContentTypes.interfaces.IATImage"
      permission="zope2.View"
      name="supplementaryPDFInformation"
      attribute="supplementaryPDFInformation"
      class=".image.Image"
    />

    <browser:viewlet
       name="zopyx.authoring.promotion"
       for="zopyx.authoring.interfaces.IAuthoringProject"
       manager="plone.app.layout.viewlets.interfaces.IBelowContentTitle"
       template="promotion.pt"
       permission="zope2.View"
    />

    <browser:viewlet
       name="zopyx.authoring.additional_js"
       for="*"
       manager="plone.app.layout.viewlets.interfaces.IHtmlHead"
       template="additional_js.pt"
       permission="zope2.View"
    />
 
    <browser:resourceDirectory
        name="zopyx.authoring"
        directory="resources"
    />

    <browser:page
        name="view_readonly"
        for="..interfaces.IAuthoringMasterTemplate"
        template="resource_view_readonly.pt"
        permission="zope2.View"
    />
    <browser:page
        name="view_readonly"
        for="..interfaces.IAuthoringStylesheet"
        template="resource_view_readonly.pt"
        permission="zope2.View"
    />
    <browser:page
        name="view_readonly"
        for="..interfaces.IAuthoringCoverPage"
        template="resource_view_readonly.pt"
        permission="zope2.View"
    />
    <browser:page
        name="view_readonly"
        for="..interfaces.IAuthoringCalibreProfile"
        template="resource_view_readonly.pt"
        permission="zope2.View"
    />
<!--
    <utility
        name="demo"
        factory=".conversion.SupplConversionView"
        />
-->
</configure>
