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

  <include
      package="Products.CMFCore"
      file="permissions.zcml"
      />
  <include
      package="ploneintranet.layout"
      file="permissions.zcml"
      />
  <include package=".sync" />
  <include package=".tiles" />

  <browser:page
      name="view"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.WorkGroupView"
      template="templates/group_view.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <!-- This tells anonymous users that a mail has been sent to they so they can authenticate -->
  <browser:page
      name="email-verification-sent"
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      class=".email_verification.EmailVerificationSentView"
      template="templates/email_verification_sent.pt"
      permission="zope.Public"
      />

  <browser:page
      name="email-verification-send-token"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".email_verification.EmailVerificationSendTokenView"
      template="templates/email_verification.pt"
      permission="zope.Public"
      />

  <browser:page
      name="email-verification-check-token"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".email_verification.EmailVerificationCheckToken"
      permission="zope.Public"
      />

  <browser:page
      name="all-users"
      for="ploneintranet.layout.app.IApp"
      class=".workgroup.AllUsersView"
      template="templates/group_view.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="group-more-menu"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.WorkGroupView"
      template="templates/group_more_menu.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="group-more-menu"
      for="ploneintranet.layout.app.IApp"
      template="templates/all_contacts_more_menu.pt"
      permission="cmf.ModifyPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="workgroup-membership-report.xlsx"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.WorkGroupMembershipReportXLSX"
      permission="cmf.ModifyPortalContent"
      />

  <browser:page
      name="membership-report.xlsx"
      for="ploneintranet.layout.app.IApp"
      class=".workgroup.AllUsersMembershipReportXLSX"
      permission="cmf.ModifyPortalContent"
      />

  <browser:page
      name="workgroup-membership-report.csv"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.WorkGroupMembershipReportCSV"
      permission="cmf.ModifyPortalContent"
      />

  <browser:page
      name="delete_confirmation"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.GroupDeleteConfirmationForm"
      permission="zope2.DeleteObjects"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.userprofile.content.workgroupcontainer.IWorkgroupContainer"
      class=".workgroupcontainer.WorkGroupContainerView"
      template="templates/groups_view.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="edit"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.WorkGroupView"
      template="templates/group_edit.pt"
      permission="cmf.ModifyPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="principal-in-sidebar"
      for="*"
      template="templates/principal_in_sidebar.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-view"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileView"
      template="templates/userprofile.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-documents"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabView"
      template="templates/userprofile_documents.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-followers"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabFollowersView"
      allowed_attributes="available label"
      template="templates/userprofile_followers.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-following"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabFollowingView"
      allowed_attributes="available label"
      template="templates/userprofile_following.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-group"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabView"
      template="templates/userprofile_group.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-info"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabView"
      template="templates/userprofile.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-posts"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabView"
      template="templates/userprofile_posts.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="userprofile-workspaces"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.UserProfileTabView"
      template="templates/userprofile_workspaces.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <!-- This edit page is linked to the INoBarcelonetaLayer
       so that CMS editors get the default edit page instead -->
  <browser:page
      name="edit"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".forms.UserProfileEditView"
      template="templates/userprofile-edit.pt"
      permission="cmf.ModifyPortalContent"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="author"
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      class=".userprofile.AuthorView"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="my-profile"
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      class=".userprofile.MyProfileView"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="import-avatars"
      for="plone.dexterity.interfaces.IDexterityContainer"
      class=".user_import.ImportAvatarsView"
      permission="membrane.ManageUsers"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.userprofile.content.userprofilecontainer.IUserProfileContainer"
      class=".userprofilecontainer.View"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="import-users"
      for="ploneintranet.userprofile.content.userprofilecontainer.IUserProfileContainer"
      class=".user_import.CSVImportView"
      permission="membrane.ManageUsers"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="export-users"
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      class=".user_export.CSVExportView"
      permission="membrane.ManageUsers"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="avatars"
      for="Products.CMFPlone.interfaces.IPloneSiteRoot"
      class=".userprofile.AvatarsView"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="avatar.jpg"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.MyAvatar"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="logo.jpg"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".workgroup.LogoJPGView"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="avatar_profile.jpg"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".userprofile.MyAvatar"
      attribute="avatar_profile"
      permission="ploneintranet.viewsite"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="workspace-group-view"
      for="*"
      class=".groups.WorkspaceGroupView"
      template="templates/group.pt"
      permission="zope2.View"
      layer="ploneintranet.layout.interfaces.INoBarcelonetaLayer"
      />

  <browser:page
      name="pas-graph-init"
      for="*"
      class=".pas_graph.InitPASGraphView"
      permission="cmf.ManagePortal"
      />

  <browser:page
      name="pas-graph"
      for="ploneintranet.userprofile.content.userprofile.IUserProfile"
      class=".pas_graph.UserprofileGraphView"
      permission="zope2.View"
      />

  <browser:page
      name="pas-graph"
      for="ploneintranet.userprofile.content.workgroup.IWorkGroup"
      class=".pas_graph.WorkgroupGraphView"
      permission="zope2.View"
      />

  <browser:page
      name="pas_view"
      for="*"
      class=".pas_view.View"
      permission="zope.Public"
      />

  <browser:page
      name="group_picker.json"
      for="*"
      class=".json.GroupPicker"
      permission="zope2.View"
      />

</configure>
