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

  <zope:adapter factory="loops.versioning.versionable.VersionableResource"
                trusted="True" />

  <zope:class class="loops.versioning.versionable.VersionableResource">
    <require permission="zope.View"
             interface="loops.versioning.interfaces.IVersionable" />
    <require permission="zope.ManageContent"
             set_schema="loops.versioning.interfaces.IVersionable" />
  </zope:class>

  <zope:subscriber
        for="loops.interfaces.IResource
             zope.app.container.interfaces.IObjectRemovedEvent"
        handler="loops.versioning.versionable.cleanupVersions" />

  <zope:subscriber
        for="loops.interfaces.IConcept
             zope.app.container.interfaces.IObjectRemovedEvent"
        handler="loops.versioning.versionable.cleanupVersions" />

  <!-- user interface -->

  <browser:page
      name="listversions"
      for="loops.interfaces.IResource"
      class="loops.versioning.browser.ListVersions"
      permission="zope.View" />

</configure>
