<?xml version="1.0"?>
<configure xmlns="http://namespaces.zope.org/browser"
           xmlns:zope="http://namespaces.zope.org/zope"
           i18n_domain="schooltool">

  <page
      name="index.html"
      for="schooltool.contact.interfaces.IContact"
      class=".contact.ContactView"
      permission="schooltool.view"
      menu="schooltool_actions"
      title="View"
      />

  <page
      name="manage_contacts.html"
      for="schooltool.basicperson.interfaces.IBasicPerson"
      class=".relationship.ContactManagementView"
      permission="schooltool.edit"
      />

  <page
      name="edit.html"
      for="schooltool.contact.interfaces.IContact"
      class=".contact.ContactEditView"
      permission="schooltool.edit"
      menu="schooltool_actions"
      title="Edit"
      />

  <page
      name="index.html"
      for="schooltool.contact.basicperson.IBoundContact"
      class=".basicperson.ContactOverviewView"
      permission="schooltool.view"
      menu="schooltool_actions"
      title="View"
      />

  <page
      name="edit.html"
      for="schooltool.contact.basicperson.IBoundContact"
      class=".basicperson.BoundContactEditView"
      permission="schooltool.edit"
      menu="schooltool_actions"
      title="Edit"
      />

  <page
     name="add.html"
     for="schooltool.contact.interfaces.IContactContainer"
     class=".contact.ContactAddView"
     permission="schooltool.edit"
     menu="schooltool_actions" title="New Contact" />

  <page
     name="add_contact.html"
     for="schooltool.basicperson.interfaces.IBasicPerson"
     class=".contact.PersonContactAddView"
     permission="schooltool.edit" />

  <configure package="schooltool.skin">

    <navigationViewlet
      name="contacts"
      for="*"
      manager="schooltool.app.browser.interfaces.IManageMenuViewletManager"
      template="templates/navigationViewlet.pt"
      class="schooltool.skin.skin.NavigationViewlet"
      permission="schooltool.edit"
      link="contacts"
      title="Contacts"
      order="60"
     />

    <navigationViewlet
      name="self-contact-info"
      for="schooltool.basicperson.interfaces.IBasicPerson"
      manager="schooltool.skin.IActionMenuManager"
      template="templates/actionsViewlet.pt"
      class="schooltool.skin.skin.ActionMenuViewlet"
      permission="schooltool.view"
      link="contact"
      title="Contacts"
      order="30"
      />

    <page
        name="index.html"
        for="schooltool.contact.interfaces.IContactContainer"
        class="schooltool.contact.browser.contact.ContactContainerView"
        template="templates/container.pt"
        permission="schooltool.view"
        menu="zmi_views"
        title="View"
        />

  </configure>

  <navigationViewlet
    name="manage-contacts"
    for="schooltool.contact.basicperson.IBoundContact"
    manager="schooltool.skin.IActionMenuManager"
    template="templates/actionsViewlet.pt"
    class="schooltool.contact.browser.basicperson.ManageContactsActionViewlet"
    permission="schooltool.edit"
    title="Manage Contacts"
    order="30"
    />

  <navigationViewlet
    name="contact-info-to-container"
    for="schooltool.contact.interfaces.IContact"
    manager="schooltool.skin.IActionMenuManager"
    template="templates/actionsViewlet.pt"
    class="schooltool.contact.browser.contact.ContactBackToContainerViewlet"
    permission="schooltool.view"
    title="Other Contacts"
    order="40"
    />

  <configure package="schooltool.skin">
    <navigationViewlet
      name="contact-info-to-container"
      for="schooltool.contact.basicperson.IBoundContact"
      manager="schooltool.skin.IActionMenuManager"
      template="templates/actionsViewlet.pt"
      class="schooltool.skin.skin.DisableNavigationViewlet"
      permission="schooltool.view"
      title="Other Contacts"
      order="40"
      />
  </configure>

  <zope:adapterTraverserPlugin
      for="schooltool.app.interfaces.ISchoolToolApplication"
      layer="zope.publisher.interfaces.browser.IBrowserRequest"
      name="contacts"
      adapter="schooltool.contact.interfaces.IContactContainer"
      />

  <zope:adapterTraverserPlugin
      for="schooltool.basicperson.interfaces.IBasicPerson"
      layer="zope.publisher.interfaces.browser.IBrowserRequest"
      name="contact"
      adapter="schooltool.contact.interfaces.IContact"
      />

  <zope:adapter
      factory=".contact.ContactContainerAbsoluteURLAdapter"
      provides="zope.traversing.browser.interfaces.IAbsoluteURL" />

  <zope:adapter
      factory=".contact.ContactContainerAbsoluteURLAdapter"
      provides="zope.interface.Interface"
      name="absolute_url"/>

  <zope:adapter
      for="schooltool.contact.interfaces.IContactContainer
           zope.publisher.interfaces.browser.IBrowserRequest"
      factory=".contact.ContactTableFormatter " />

  <zope:adapter
      for="schooltool.contact.interfaces.IContactContainer
           zope.publisher.interfaces.browser.IBrowserRequest"
      factory=".contact.ContactFilterWidget" />

  <navigationViewlet
      name="contact-send-email"
      for="schooltool.contact.interfaces.IContact"
      manager="schooltool.skin.IActionMenuManager"
      template="templates/sendEmailActionViewlet.pt"
      class=".contact.SendEmailActionViewlet"
      permission="schooltool.view"
      title="Send Email"
      order="70"
      />

  <page
      name="sendEmail.html"
      for="schooltool.contact.interfaces.IContact"
      class=".contact.SendEmailView"
      permission="schooltool.view"
      />

  <page
      name="noTeacherEmail.html"
      for="schooltool.contact.interfaces.IContact"
      class=".contact.NoTeacherEmailView"
      permission="schooltool.view"
      />

  <zope:adapter
      factory=".contact.SendEmailFormAdapter" />

</configure>
