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

  <page
      name="demographics_macros"
      for="*"
      permission="zope.Public"
      template="demographics_macros.pt"
      />

  <page
      name="index.html"
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      class=".personform.PersonView"
      permission="zope.View"
      menu="schooltool_actions"
      title="View"
      />

  <page
      name="edit.html"
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      class=".personform.PersonEditView"
      permission="zope.View"
      menu="schooltool_actions"
      title="Edit"
      />

  <page
      for="..interfaces.INameInfo"
      name="edit.html"
      class=".personform.NameInfoEdit"
      permission="schooltool.edit"
      />

  <page
      for="..interfaces.INameInfo"
      name="index.html"
      class=".personform.NameInfoDisplay"
      permission="schooltool.view"
      />

  <page
      for="..interfaces.IDemographics"
      name="edit.html"
      class=".personform.DemographicsEdit"
      permission="schooltool.edit"
      />

  <page
      for="..interfaces.IDemographics"
      name="index.html"
      class=".personform.DemographicsDisplay"
      permission="schooltool.view"
      />

  <page
      for="..interfaces.ISchoolData"
      name="edit.html"
      class=".personform.SchoolDataEdit"
      permission="schooltool.edit"
      />

  <page
      for="..interfaces.ISchoolData"
      name="index.html"
      class=".personform.SchoolDataDisplay"
      permission="schooltool.view"
      />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="parent1"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="parent2"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="emergency1"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="emergency2"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="emergency3"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="nameinfo"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="demographics"
      permission="zope.Public" />

  <zope:singleAttributeTraverserPlugin
      for="schooltool.demographics.interfaces.IDemographicsPerson"
      name="schooldata"
      permission="zope.Public" />

  <page
      for="..interfaces.IContactInfo"
      name="edit.html"
      class=".personform.ContactInfoEdit"
      permission="schooltool.edit"
      />

  <page
      for="..interfaces.IContactInfo"
      name="index.html"
      class=".personform.ContactInfoDisplay"
      permission="schooltool.view"
      />

  <!-- to get simple drop down lists in widgets -->
  <zope:adapter
      for="schooltool.demographics.interfaces.IDemographicsSource
           zope.publisher.interfaces.browser.IBrowserRequest"
      factory=".personform.Terms"
      />

  <!-- list of teachers -->
  <zope:adapter
      for="schooltool.demographics.interfaces.ITeachersSource
           zope.publisher.interfaces.browser.IBrowserRequest"
           factory=".personform.TeachersTerms"
      />

  <!-- list of groups -->
  <zope:adapter
      for="schooltool.demographics.interfaces.IGroupsSource
           zope.publisher.interfaces.browser.IBrowserRequest"
           factory=".personform.GroupsTerms"
      />

  <page
    name="menu_macros"
    for="*"
    permission="zope.View"
    template="menu_macros.pt"
    />

  <!-- menu for different screens -->
  <menu
    id="person_edit_menu"
    title="Schooltool Person Menu"
    class=".personform.AttributeMenu"
  />

  <menuItems
    for="*"
    menu="person_edit_menu"
    >

    <menuItem
      title="name info"
      action="/nameinfo/@@edit.html"
      permission="schooltool.edit"
      />

    <menuItem
      title="demographics"
      action="/demographics/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="schooldata"
      action="/schooldata/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="parent1"
      action="/parent1/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="parent2"
      action="/parent2/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="emergency1"
      action="/emergency1/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="emergency2"
      action="/emergency2/@@edit.html"
      permission="schooltool.edit"
     />

    <menuItem
      title="emergency3"
      action="/emergency3/@@edit.html"
      permission="schooltool.edit"
     />

  </menuItems>

  <menu
    id="person_display_menu"
    title="Schooltool Person Display Menu"
    class=".personform.AttributeMenu"
  />

  <menuItems
    for="*"
    menu="person_display_menu"
    >

    <menuItem
      title="name info"
      action="/nameinfo"
      permission="schooltool.view"
      />

    <menuItem
      title="demographics"
      action="/demographics"
      permission="schooltool.view"
     />

    <menuItem
      title="schooldata"
      action="/schooldata"
      permission="schooltool.view"
     />

    <menuItem
      title="parent1"
      action="/parent1"
      permission="schooltool.view"
     />

    <menuItem
      title="parent2"
      action="/parent2"
      permission="schooltool.view"
     />

    <menuItem
      title="emergency1"
      action="/emergency1"
      permission="schooltool.view"
     />

    <menuItem
      title="emergency2"
      action="/emergency2"
      permission="schooltool.view"
     />

    <menuItem
      title="emergency3"
      action="/emergency3"
      permission="schooltool.view"
     />

  </menuItems>

</configure>
