<!-- $Id$ -->

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

  <!-- content views -->

  <browser:page
      name="index.html"
      for="loops.layout.interfaces.ILayoutNode"
      class="loops.layout.browser.node.LayoutNodeView"
      permission="zope.View" />

  <browser:addform
      label="Add Layout Node"
      name="AddLoopsLayoutNode.html"
      content_factory="loops.layout.base.LayoutNode"
      schema="loops.layout.interfaces.ILayoutNode"
      fields="title description nodeType viewName pageName body"
      template="../../browser/add.pt"
      permission="zope.ManageContent">
    <widget field="description" height="2" />
    <widget field="body" height="3" />
  </browser:addform>

  <browser:addMenuItem
      class="loops.layout.base.LayoutNode"
      title="Layout Node"
      description="A layout node controls the presentation of objects"
      permission="zope.ManageContent"
      view="AddLoopsLayoutNode.html" />

  <browser:editform
      label="Edit Layout Node"
      name="edit.html"
      schema="loops.layout.interfaces.ILayoutNode"
      fields="title description nodeType viewName pageName body"
      for="loops.layout.interfaces.ILayoutNode"
      template="../../browser/edit.pt"
      permission="zope.ManageContent">
    <widget field="description" height="2" />
    <widget field="body" height="3" />
  </browser:editform>

  <!-- target views -->

  <zope:adapter
      name="layout"
      for="loops.interfaces.ILoopsAdapter
           zope.publisher.interfaces.browser.IBrowserRequest"
      provides="zope.interface.Interface"
      factory="loops.layout.browser.concept.ConceptView" />

  <zope:adapter
      name="layout"
      for="loops.interfaces.IConcept
           zope.publisher.interfaces.browser.IBrowserRequest"
      provides="zope.interface.Interface"
      factory="loops.layout.browser.concept.ConceptView" />

  <zope:adapter
      name="layout"
      for="loops.interfaces.ITextDocument
           zope.publisher.interfaces.browser.IBrowserRequest"
      provides="zope.interface.Interface"
      factory="loops.layout.browser.resource.TextView" />

  <!-- traversal adapter -->

  <zope:view factory="loops.layout.browser.traversal.NodeTraverser"
        for="loops.layout.interfaces.ILayoutNode"
        type="zope.publisher.interfaces.http.IHTTPRequest"
        provides="zope.publisher.interfaces.browser.IBrowserPublisher"
        allowed_interface="zope.publisher.interfaces.browser.IBrowserPublisher"
        permission="zope.Public" />

  <!-- layouts -->

  <zope:module module="loops.layout.browser.resource" />

</configure>
