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

  <include
      package="ploneintranet.layout"
      file="permissions.zcml"
      />
  <include
      package="ploneintranet.microblog"
      file="permissions.zcml"
      />

  <browser:page
      name="app-notifications"
      for="ploneintranet.layout.app.IApp"
      class=".notifications.NotificationsView"
      template="templates/notifications.pt"
      permission="ploneintranet.viewsite"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="purge-old-notifications"
      for="ploneintranet.layout.app.IApp"
      class=".notifications.PurgeView"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:viewlet
      name="ploneintranet.notifications.notifications"
      manager="plone.app.layout.viewlets.interfaces.IPortalTop"
      template="notificationsviewlet.pt"
      permission="ploneintranet.viewsite"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />


  <browser:page
      name="email-notification-template"
      for="*"
      template="templates/email_notification_template.pt"
      permission="zope.Public"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="notification-counter"
      for="*"
      class=".notifications.NotificationCounter"
      template="templates/notification-counter.pt"
      permission="zope2.View"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="browser_new_notification"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".notifications.DesktopNotifications"
      permission="zope2.View"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:viewlet
      name="ploneintranet.notifications.desktop-notifications"
      manager="plone.app.layout.viewlets.interfaces.IPortalTop"
      class=".notifications.DesktopNotificationsViewlet"
      template="templates/desktop-notifications.pt"
      permission="ploneintranet.viewsite"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="init-notifications-db"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".scheduler.InitDBView"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="schedule-notifications"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".scheduler.SchedulerView"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="dispatch-notifications"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".aggregator.AggregatorView"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="desktop"
      for="ploneintranet.notifications.interfaces.IAggregatedNotifications"
      class=".desktop.AggregatedDesktop"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="email"
      for="ploneintranet.notifications.interfaces.IAggregatedNotifications"
      class=".email.AggregatedEmail"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="digest_daily"
      for="ploneintranet.notifications.interfaces.IAggregatedNotifications"
      class=".email.DigestEmail"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="digest_weekly"
      for="ploneintranet.notifications.interfaces.IAggregatedNotifications"
      class=".email.DigestEmail"
      permission="cmf.ManagePortal"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

  <browser:page
      name="view"
      for="ploneintranet.notifications.sql.saconfig.Notification"
      class=".notification.NotificationView"
      permission="zope.Public"
      layer=".interfaces.IPloneintranetNotificationsLayer"
      />

</configure>
