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

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.IProjects"
      title="CanDo"
      class=".gradebook.ProjectsBreadcrumbs"
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.IProject"
      title=""
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.IProjectsGradebook"
      title=""
      />

  <flourish:viewlet
      name="cando"
      after="manage_school gradebook"
      title="CanDo"
      manager="schooltool.skin.flourish.page.IHeaderNavigationManager"
      class=".gradebook.CanDoStartupNavLink"
      permission="schooltool.view"
      />

  <flourish:activeViewlet
      name="cando"
      manager="schooltool.skin.flourish.page.IHeaderNavigationManager"
      view=".gradebook.CanDoStartupView"
      />

  <flourish:activeViewlet
      name="cando"
      manager="schooltool.skin.flourish.page.IHeaderNavigationManager"
      for="schooltool.cando.interfaces.IProject"
      />

  <flourish:viewlet
      name="gradebook_modes"
      before="*"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.CanDoModes"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      title="View"
      permission="schooltool.edit"
      view=".gradebook.CanDoGradebookOverviewBase"
      />

  <flourish:viewlet
      name="gradebook_modes_buttons"
      manager=".gradebook.CanDoModes"
      class=".gradebook.CanDoModesViewlet"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook_overview"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.CanDoProjectsAddLinks"
      for="schooltool.cando.interfaces.IProjectsGradebook"
      title="Add"
      permission="schooltool.edit"
      view=".gradebook.ProjectsGradebookOverview"
      />

  <flourish:viewlet
      name="../addSkillBrowse.html"
      class=".gradebook.SkillAddLink"
      manager=".gradebook.CanDoProjectsAddLinks"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="../../addProject.html"
      title="Project"
      class="schooltool.skin.flourish.page.LinkViewlet"
      manager=".gradebook.CanDoProjectsAddLinks"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook_settings"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.CanDoProjectsSettingsLinks"
      for="schooltool.cando.interfaces.IProjectsGradebook"
      title="Settings"
      permission="schooltool.edit"
      view=".gradebook.ProjectsGradebookOverview"
      />

  <flourish:viewlet
      name="../.."
      title="Projects"
      class="schooltool.skin.flourish.page.LinkViewlet"
      manager=".gradebook.CanDoProjectsSettingsLinks"
      permission="schooltool.edit"
      />

  <flourish:page
      name="index.html"
      for="schooltool.cando.interfaces.IProjects"
      subtitle="Projects"
      content_template="templates/projects.pt"
      class="schooltool.gradebook.browser.activity.FlourishWorksheetsView"
      permission="schooltool.edit"
      />

  <flourish:page
      name="index.html"
      for="schooltool.cando.interfaces.ISectionSkills"
      subtitle="Skill Sets"
      content_template="templates/skillsets.pt"
      class="schooltool.gradebook.browser.activity.FlourishWorksheetsView"
      permission="schooltool.edit"
      />

  <configure package="schooltool.skin.flourish">

    <flourish:page
        name="addProject.html"
        for="schooltool.cando.interfaces.IProjects"
        class="schooltool.cando.browser.gradebook.ProjectAddView"
        content_template="templates/z3c_form_edit.pt"
        permission="schooltool.edit"
        title="CanDo"
        subtitle="New Project"
        />

  </configure>

  <flourish:page
      name="addSkillBrowse.html"
      for="schooltool.cando.interfaces.IProject"
      subtitle="XXX Browse and Select Skill XXX"
      class="schooltool.cando.browser.gradebook.ProjectSkillBrowseView"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="table"
      class=".gradebook.SkillsTable"
      for="schooltool.cando.interfaces.IProject"
      manager="schooltool.skin.flourish.interfaces.IAJAXParts"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="filter"
      before="batch table"
      class=".gradebook.SkillsTableFilter"
      render="template"
      manager=".gradebook.SkillsTable"
      permission="schooltool.view"
      />

  <flourish:page
      name="addSkillCreate.html"
      for="schooltool.cando.interfaces.IProject"
      subtitle="XXX Create New Skill XXX"
      class="schooltool.cando.browser.gradebook.ProjectSkillAddView"
      content_template="templates/form.pt"
      permission="schooltool.edit"
      />

  <flourish:viewletManager
      name="tertiary_navigation"
      provides="schooltool.skin.flourish.page.ITertiaryNavigationManager"
      class=".gradebook.SkillAddTertiaryNavigationManager"
      view=".gradebook.ProjectSkillBrowseView"
      permission="zope.Public"
      />

  <flourish:viewletManager
      name="tertiary_navigation"
      provides="schooltool.skin.flourish.page.ITertiaryNavigationManager"
      class=".gradebook.SkillAddTertiaryNavigationManager"
      view=".gradebook.ProjectSkillAddView"
      permission="zope.Public"
      />

  <flourish:page
      name="cando.html"
      for="schooltool.app.interfaces.ISchoolToolApplication"
      title="CanDo"
      class=".gradebook.CanDoStartupView"
      permission="schooltool.view"
      />

  <flourish:page
      name="gradebook-projects"
      for="schooltool.course.interfaces.ISection"
      class=".gradebook.SectionProjectsCanDoRedirectView"
      permission="schooltool.view"
      />

  <flourish:page
      name="gradebook-skills"
      for="schooltool.course.interfaces.ISection"
      class=".gradebook.SectionSkillsCanDoRedirectView"
      permission="schooltool.view"
      />

  <flourish:page
      name="index.html"
      for="schooltool.cando.interfaces.IProjectsGradebook"
      class="schooltool.cando.browser.gradebook.ProjectsGradebookOverview"
      permission="schooltool.view"
      />

  <flourish:page
      name="index.html"
      for="schooltool.cando.interfaces.ISkillsGradebook"
      class="schooltool.cando.browser.gradebook.SkillsGradebookOverview"
      permission="schooltool.view"
      />

  <flourish:page
      name="export.xls"
      for="schooltool.cando.interfaces.IProjects"
      class="schooltool.gradebook.browser.activity.WorksheetsExportView"
      permission="schooltool.view"
      />

  <flourish:page
      name="export.xls"
      for="schooltool.cando.interfaces.ISectionSkills"
      class="schooltool.gradebook.browser.activity.WorksheetsExportView"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="cando-resources"
      view="schooltool.cando.browser.gradebook.ProjectsGradebookOverview"
      manager="schooltool.skin.flourish.page.IPageContentManager"
      template="templates/cando_resources.pt"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="cando-resources"
      view="schooltool.cando.browser.gradebook.SkillsGradebookOverview"
      manager="schooltool.skin.flourish.page.IPageContentManager"
      template="templates/cando_resources.pt"
      permission="schooltool.view"
      />

  <zope:resourceLibrary
      name="schooltool.cando.flourish"
      require="schooltool.skin.flourish-gradebook"
      layer="schooltool.skin.flourish.IFlourishLayer">
    <directory
          source="resources"
          include="cando.css
                   cando.js"
          />
  </zope:resourceLibrary>

  <flourish:page
      name="name_popup_menu"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      class=".gradebook.CanDoNamePopupMenuView"
      permission="schooltool.edit"
      />

  <flourish:page
      name="activity_popup_menu"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      class=".gradebook.SkillPopupMenuView"
      permission="schooltool.edit"
      />

  <flourish:page
      name="student_popup_menu"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      class=".gradebook.StudentPopupMenuView"
      permission="schooltool.view"
      />

  <flourish:page
      name="edit.html"
      for="schooltool.cando.interfaces.ISkill"
      title="CanDo"
      subtitle="Edit Skill"
      content_template="templates/skill_edit.pt"
      class=".gradebook.SkillEditView"
      permission="schooltool.edit"
      />

  <flourish:viewletManager
      name="tertiary_navigation"
      provides="schooltool.skin.flourish.page.ITertiaryNavigationManager"
      class=".gradebook.CanDoGradebookTertiaryNavigationManager"
      view=".gradebook.ProjectsGradebookOverview"
      permission="zope.Public"
      />

  <flourish:viewletManager
      name="tertiary_navigation"
      provides="schooltool.skin.flourish.page.ITertiaryNavigationManager"
      class=".gradebook.CanDoGradebookTertiaryNavigationManager"
      view=".gradebook.SkillsGradebookOverview"
      permission="zope.Public"
      />

  <flourish:viewlet
      name="select_year"
      class=".gradebook.CanDoYearNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookYearNavigation"
      view=".gradebook.ProjectsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="select_term"
      class=".gradebook.CanDoTermNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookTermNavigation"
      view=".gradebook.ProjectsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="select_section"
      class=".gradebook.CanDoSectionNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookSectionNavigation"
      view=".gradebook.ProjectsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook-help"
      after="gradebook-reports-links"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.GradebookHelpLinks"
      view=".gradebook.CanDoGradebookOverviewBase"
      title="Help"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="scoresystemhelp.html"
      title="Score System"
      class=".gradebook.ScoreSystemHelpViewlet"
      manager=".gradebook.GradebookHelpLinks"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="colorcodeshelp.html"
      after="scoresystemhelp.html"
      title="Color Codes"
      class=".gradebook.ColorCodesHelpViewlet"
      manager=".gradebook.GradebookHelpLinks"
      permission="schooltool.view"
      />

  <flourish:page
      name="scoresystemhelp.html"
      for="*"
      class=".gradebook.ScoreSystemHelpView"
      template="templates/scoresystem_help.pt"
      permission="schooltool.view"
      />

  <flourish:page
      name="colorcodeshelp.html"
      for="*"
      class=".gradebook.ColorCodesHelpView"
      template="templates/colorcodes_help.pt"
      permission="schooltool.view"
      />

  <!-- XXX: Some of these are duplicated. Remove them after
            writing enough stests and maybe unifying both
            gradebook modes -->

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ISectionSkills"
      title="CanDo"
      class=".gradebook.SkillsBreadcrumbs"
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ICourseSkillSet"
      view=".gradebook.SkillsGradebookOverview"
      title=""
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ICourseSkillSet"
      view="schooltool.gradebook.browser.gradebook.FlourishGradeActivity"
      title=""
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ISkillsGradebook"
      title=""
      />

  <flourish:activeViewlet
      name="cando"
      manager="schooltool.skin.flourish.page.IHeaderNavigationManager"
      for="schooltool.cando.interfaces.ICourseSkillSet"
      view=".gradebook.SkillsGradebookOverview"
      />

  <flourish:viewlet
      name="select_year"
      class=".gradebook.CanDoYearNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookYearNavigation"
      view=".gradebook.SkillsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="select_term"
      class=".gradebook.CanDoTermNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookTermNavigation"
      view=".gradebook.SkillsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="select_section"
      class=".gradebook.CanDoSectionNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishGradebookSectionNavigation"
      view=".gradebook.SkillsGradebookOverview"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook_overview"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class="schooltool.skin.flourish.page.DisabledViewlet"
      for="schooltool.cando.interfaces.ISkillsGradebook"
      permission="schooltool.edit"
      view=".gradebook.SkillsGradebookOverview"
      />

  <flourish:viewlet
      name="gradebook_settings"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class="schooltool.skin.flourish.page.DisabledViewlet"
      for="schooltool.cando.interfaces.ISkillsGradebook"
      permission="schooltool.edit"
      view=".gradebook.SkillsGradebookOverview"
      />

  <flourish:viewlet
      name="gradebookskills.html"
      after="*"
      title="Skills Pop-up"
      class=".gradebook.GradebookSkillsViewlet"
      manager=".gradebook.CanDoModes"
      permission="schooltool.view"
      />

  <flourish:page
      name="gradebookskills.html"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      class=".gradebook.GradebookSkillsView"
      template="templates/gradebook_skills_dialog.pt"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="gradebook-skills"
      after="calendar schedule gradebook"
      title="CanDo Gradebook"
      for="schooltool.course.interfaces.ISection"
      manager="schooltool.course.browser.section.SectionLinks"
      class="schooltool.skin.flourish.page.LinkViewlet"
      permission="schooltool.view"
      />

  <flourish:page
      name="filldown"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      template="templates/filldown_dialog.pt"
      permission="schooltool.view"
      />

  <flourish:page
      name="mygrades-skills"
      for="schooltool.course.interfaces.ISection"
      class=".gradebook.SectionSkillsCanDoRedirectView"
      permission="schooltool.view"
      />

  <configure package="schooltool.gradebook.browser.gradebook">

    <flourish:page
        name="index.html"
        for="schooltool.cando.interfaces.IMySkillsGrades"
        title="My Skills Grades"
        class="schooltool.cando.browser.gradebook.MySkillsGradesView"
        content_template="templates/f_mygrades.pt"
        permission="zope.Public"
        />

  </configure>

  <flourish:viewlet
      name="mygrades_section_navigation"
      before="mygrades_term_navigation"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class="schooltool.gradebook.browser.gradebook.FlourishMyGradesSectionNavigation"
      for="schooltool.gradebook.interfaces.IMyGrades"
      title="Section"
      permission="zope.Public"
      view=".gradebook.MySkillsGradesView"
      />

  <flourish:viewlet
      name="mygrades_term_navigation"
      before="mygrades_year_navigation"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class="schooltool.gradebook.browser.gradebook.FlourishMyGradesTermNavigation"
      for="schooltool.gradebook.interfaces.IMyGrades"
      title="Term"
      permission="zope.Public"
      view=".gradebook.MySkillsGradesView"
      />

  <flourish:viewlet
      name="mygrades_year_navigation"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class="schooltool.gradebook.browser.gradebook.FlourishMyGradesYearNavigation"
      for="schooltool.gradebook.interfaces.IMyGrades"
      title="Year"
      permission="zope.Public"
      view=".gradebook.MySkillsGradesView"
      />

  <flourish:viewlet
      name="select_year"
      class=".gradebook.MySkillsGradesYearNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishMyGradesYearNavigation"
      view=".gradebook.MySkillsGradesView"
      permission="zope.Public"
      />

  <flourish:viewlet
      name="select_term"
      class=".gradebook.MySkillsGradesTermNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishMyGradesTermNavigation"
      view=".gradebook.MySkillsGradesView"
      permission="zope.Public"
      />

  <flourish:viewlet
      name="select_section"
      class=".gradebook.MySkillsGradesSectionNavigationViewlet"
      manager="schooltool.gradebook.browser.gradebook.FlourishMyGradesSectionNavigation"
      view=".gradebook.MySkillsGradesView"
      permission="zope.Public"
      />

  <flourish:viewletManager
      name="tertiary_navigation"
      provides="schooltool.skin.flourish.page.ITertiaryNavigationManager"
      class=".gradebook.MySkillsGradesTertiaryNavigationManager"
      view=".gradebook.MySkillsGradesView"
      permission="zope.Public"
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ICourseSkillSet"
      view=".gradebook.MySkillsGradesView"
      title=""
      />

  <flourish:breadcrumb
      for="schooltool.cando.interfaces.ICourseSkillSet"
      view="schooltool.gradebook.browser.gradebook.FlourishStudentGradeHistory"
      title=""
      />

  <flourish:viewlet
      name="cando-resources"
      view="schooltool.cando.browser.gradebook.MySkillsGradesView"
      manager="schooltool.skin.flourish.page.IPageContentManager"
      template="templates/cando_resources.pt"
      permission="zope.Public"
      />

  <flourish:page
      name="index.html"
      for="schooltool.cando.interfaces.ICanDoStudentGradebook"
      title="Score"
      class="schooltool.cando.browser.gradebook.CanDoGradeStudent"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook-help"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.GradebookHelpLinks"
      view="schooltool.cando.browser.gradebook.CanDoGradeStudent"
      title="Help"
      permission="schooltool.view"
      />

  <flourish:page
      name="gradebook.pdf"
      for="schooltool.cando.interfaces.ICanDoGradebook"
      class=".gradebook.CanDoGradebookPDFView"
      permission="schooltool.edit"
      />

  <flourish:page
      name="student_competency_report.html"
      for="schooltool.cando.interfaces.ICanDoStudentGradebook"
      title="Student Competency Record"
      class="schooltool.cando.browser.gradebook.StudentCompetencyRecordView"
      permission="schooltool.edit"
      />

  <flourish:viewlet
      name="gradebook-help"
      manager="schooltool.skin.flourish.page.IPageRefineManager"
      class=".gradebook.GradebookHelpLinks"
      view="schooltool.cando.browser.gradebook.StudentCompetencyRecordView"
      title="Help"
      permission="schooltool.view"
      />

  <flourish:viewlet
      name="colorcodeshelp.html"
      class="schooltool.skin.flourish.page.DisabledViewlet"
      manager=".gradebook.GradebookHelpLinks"
      permission="schooltool.view"
      view="schooltool.cando.browser.gradebook.StudentCompetencyRecordView"
      />

</configure>
