<!-- $Id$ -->

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

  <zope:class class="loops.organize.comment.base.Comment">
    <require permission="zope.View"
             interface="cybertools.tracking.comment.interfaces.IComment" />
    <require permission="zope.ManageSite"
             set_schema="cybertools.tracking.comment.interfaces.IComment" />
  </zope:class>

  <zope:utility
        factory="loops.organize.comment.base.commentStates"
        name="organize.commentStates" />

  <!-- views -->

  <browser:page
      name="comments.html"
      for="loops.interfaces.INode"
      class="loops.organize.comment.browser.CommentsView"
      permission="zope.View" />

  <browser:page
      name="create_comment.html"
      for="loops.interfaces.INode"
      class="loops.organize.comment.browser.CreateCommentForm"
      permission="zope.View" />

  <zope:adapter
      name="create_comment"
      for="loops.browser.node.NodeView
           zope.publisher.interfaces.browser.IBrowserRequest"
      factory="loops.organize.comment.browser.CreateComment"
      permission="zope.View" />

  <!-- reporting -->

  <zope:adapter
      name="list_comments.html"
      for="loops.interfaces.IConcept
           zope.publisher.interfaces.browser.IBrowserRequest"
      provides="zope.interface.Interface"
      factory="loops.organize.comment.report.CommentsOverview"
      permission="zope.View" />

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

</configure>
