<!-- $Id$ -->

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

  <zope:class class="loops.organize.work.base.WorkItem">
    <require permission="zope.View"
             interface="cybertools.organize.work.IWorkItem" />
    <require permission="zope.ManageContent"
             set_schema="cybertools.organize.work.IWorkItem" />
  </zope:class>

  <!-- ZMI views -->

  <browser:page
      for="cybertools.organize.interfaces.IWorkItem"
      name="index.html"
      class="loops.organize.work.browser.WorkItemView"
      permission="zope.View" />

  <!-- application views -->

  <zope:adapter
        name="allworkitems.html"
        for="loops.interfaces.IConcept
             zope.publisher.interfaces.browser.IBrowserRequest"
        provides="zope.interface.Interface"
        factory="loops.organize.work.browser.AllWorkItems"
        permission="zope.View" />

  <zope:adapter
        name="relatedtaskworkitems.html"
        for="loops.interfaces.IConcept
             zope.publisher.interfaces.browser.IBrowserRequest"
        provides="zope.interface.Interface"
        factory="loops.organize.work.browser.RelatedTaskWorkItems"
        permission="zope.View" />

  <zope:adapter
        name="taskworkitems.html"
        for="loops.interfaces.IConcept
             zope.publisher.interfaces.browser.IBrowserRequest"
        provides="zope.interface.Interface"
        factory="loops.organize.work.browser.TaskWorkItems"
        permission="zope.View" />

  <zope:adapter
        name="personworkitems.html"
        for="loops.interfaces.IConcept
             zope.publisher.interfaces.browser.IBrowserRequest"
        provides="zope.interface.Interface"
        factory="loops.organize.work.browser.PersonWorkItems"
        permission="zope.View" />

  <zope:adapter
        name="userworkitems.html"
        for="loops.interfaces.IConcept
             zope.publisher.interfaces.browser.IBrowserRequest"
        provides="zope.interface.Interface"
        factory="loops.organize.work.browser.UserWorkItems"
        permission="zope.View" />

  <browser:page
      name="create_workitem.html"
      for="loops.interfaces.INode"
      class="loops.organize.work.browser.CreateWorkItemForm"
      permission="zope.View" />

  <zope:adapter
      name="create_workitem"
      for="loops.browser.node.NodeView
           zope.publisher.interfaces.browser.IBrowserRequest"
      factory="loops.organize.work.browser.CreateWorkItem"
      permission="zope.View" />

  <browser:page
      name="workitem_info.html"
      for="loops.interfaces.INode"
      class="loops.organize.work.browser.WorkItemInfo"
      permission="zope.View" />

  <!-- reporting -->

  <zope:adapter 
      name="work_report"
      factory="loops.organize.work.report.WorkReportInstance"
      provides="loops.expert.report.IReportInstance"
      trusted="True" />
  <zope:class class="loops.organize.work.report.WorkReportInstance">
    <require permission="zope.View"
             interface="loops.expert.report.IReportInstance" />
    <require permission="zope.ManageContent"
             set_schema="loops.expert.report.IReportInstance" />
  </zope:class>

  <zope:adapter 
      name="work_plan_report"
      factory="loops.organize.work.report.WorkPlanReportInstance"
      provides="loops.expert.report.IReportInstance"
      trusted="True" />
  <zope:class class="loops.organize.work.report.WorkPlanReportInstance">
    <require permission="zope.View"
             interface="loops.expert.report.IReportInstance" />
    <require permission="zope.ManageContent"
             set_schema="loops.expert.report.IReportInstance" />
  </zope:class>

  <browser:page
      name="work.html"
      for="loops.organize.interfaces.IConceptSchema"
      class="loops.organize.work.report.WorkStatementView"
      permission="zope.View" />

  <browser:page
      name="work_plan.html"
      for="loops.organize.interfaces.IConceptSchema"
      class="loops.organize.work.report.WorkPlanView"
      permission="zope.View" />

  <browser:page
      name="work.csv"
      for="loops.organize.interfaces.IConceptSchema"
      class="loops.organize.work.report.WorkStatementCSVExport"
      permission="zope.View" />

  <zope:adapter 
      name="person_work_statement"
      factory="loops.organize.work.report.PersonWorkReportInstance"
      provides="loops.expert.report.IReportInstance"
      trusted="True" />
  <zope:class class="loops.organize.work.report.PersonWorkReportInstance">
    <require permission="zope.View"
             interface="loops.expert.report.IReportInstance" />
    <require permission="zope.ManageContent"
             set_schema="loops.expert.report.IReportInstance" />
  </zope:class>

  <zope:adapter 
      name="meeting_minutes"
      factory="loops.organize.work.report.MeetingMinutes"
      provides="loops.expert.report.IReportInstance"
      trusted="True" />
  <zope:class class="loops.organize.work.report.MeetingMinutes">
    <require permission="zope.View"
             interface="loops.expert.report.IReportInstance" />
    <require permission="zope.ManageContent"
             set_schema="loops.expert.report.IReportInstance" />
  </zope:class>

  <browser:page
      name="meeting_minutes.html"
      for="loops.interfaces.IConceptSchema"
      class="loops.organize.work.meeting.MeetingMinutes"
      permission="zope.View" />

  <browser:page
      name="meeting_minutes.doc"
      for="loops.interfaces.IConceptSchema"
      class="loops.organize.work.meeting.MeetingMinutesDocument"
      attribute="embed"
      permission="zope.View" />

  <!-- repair -->

  <browser:page
      name="fix_checkup_workitems.fix"
      for="loops.interfaces.ILoops"
      class="loops.organize.work.browser.FixCheckupWorkItems"
      permission="zope.View" />

  <!-- setup -->

  <zope:adapter factory="loops.organize.work.setup.SetupManager"
                name="organize.work" />

</configure>
