<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    i18n_domain="senaite.core">

  <!-- needed for moved worksheet permissions -->
  <include package="senaite.core.permissions" />

  <!-- Default worksheet layouts (classic and transposed view) -->
  <utility
      name="default_worksheet_layouts"
      factory=".utility.DefaultWorksheetLayouts"
      provides="bika.lims.interfaces.IWorksheetLayouts"
  />

  <!-- Views -->
  <browser:page
      for="bika.lims.interfaces.IWorksheetFolder"
      name="base_view"
      class="bika.lims.browser.worksheet.views.FolderView"
      permission="zope.Public"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheetFolder"
      name="worksheet_add"
      class="bika.lims.browser.worksheet.views.AddWorksheetView"
      permission="zope.Public"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="manage_results"
      class="bika.lims.browser.worksheet.views.ManageResultsView"
      permission="senaite.core.permissions.ViewResults"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="add_analyses"
      class="bika.lims.browser.worksheet.views.AddAnalysesView"
      permission="senaite.core.permissions.EditWorksheet"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <!-- Analyses Classic View -->
  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="analyses_classic_view"
      class="bika.lims.browser.worksheet.views.AnalysesView"
      permission="senaite.core.permissions.ViewResults"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <!-- Analyses Transposed View -->
  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="analyses_transposed_view"
      class="bika.lims.browser.worksheet.views.AnalysesTransposedView"
      permission="senaite.core.permissions.ViewResults"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="add_blank"
      class="bika.lims.browser.worksheet.views.AddBlankView"
      permission="senaite.core.permissions.EditWorksheet"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="add_control"
      class="bika.lims.browser.worksheet.views.AddControlView"
      permission="senaite.core.permissions.EditWorksheet"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="add_duplicate"
      class="bika.lims.browser.worksheet.views.AddDuplicateView"
      permission="senaite.core.permissions.EditWorksheet"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="export"
      class="bika.lims.browser.worksheet.views.ExportView"
      permission="senaite.core.permissions.ViewResults"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="getWorksheetReferences"
      class="bika.lims.browser.worksheet.views.ReferenceSamplesView"
      permission="zope.Public"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="print"
      class="bika.lims.browser.worksheet.views.PrintView"
      permission="senaite.core.permissions.ViewResults"
      layer="bika.lims.interfaces.IBikaLIMS"
      />


  <!-- Ajax signatures -->
  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="set_analyst"
      class="bika.lims.browser.worksheet.ajax.SetAnalyst"
      permission="zope.Public"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

  <browser:page
      for="bika.lims.interfaces.IWorksheet"
      name="set_instrument"
      class="bika.lims.browser.worksheet.ajax.SetInstrument"
      permission="zope.Public"
      layer="bika.lims.interfaces.IBikaLIMS"
      />

</configure>
