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

  <include
      package="ploneintranet.microblog"
      file="permissions.zcml"
      />
  <include
      package="plone.tiles"
      file="meta.zcml"
      />

  <!-- the backend enforces additional permission filtering -->
  <plone:tile
      name="activitystream.tile"
      title="Activity stream tile"
      description="Provides an activity stream as a tile"
      for="*"
      class=".stream.StreamTile"
      permission="zope2.View"
      add_permission="cmf.ManagePortal"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <plone:tile
      name="activitystream.portlet.tile"
      title="Activity stream portlet tile"
      description="Provides an activity stream as a tile for use in the dashboard portlet"
      for="*"
      class=".stream.PortletStreamTile"
      permission="zope2.View"
      add_permission="cmf.ManagePortal"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="tagstream"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".stream.TagStream"
      template="templates/tag-stream.html"
      permission="ploneintranet.microblog.ViewStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="comment.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateView"
      template="templates/comment.html"
      permission="ploneintranet.microblog.AddStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="subcomment"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateView"
      template="templates/subcomment.pt"
      permission="ploneintranet.microblog.AddStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post_inner"
      for="plone.app.contenttypes.interfaces.IDocument"
      class=".statusupdate.StatusUpdateView"
      template="templates/post_inner_document.pt"
      permission="zope2.View"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post_inner"
      for="plone.event.interfaces.IEvent"
      class=".statusupdate.StatusUpdateView"
      template="templates/post_inner_event.pt"
      permission="zope2.View"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateView"
      template="templates/post.html"
      permission="ploneintranet.microblog.AddStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post-comments"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".post_comments.PostComments"
      template="templates/post_comments.pt"
      permission="ploneintranet.microblog.ViewStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="content-stream.html"
      for="*"
      class=".content_stream.ContentStreamView"
      template="templates/content-stream.html"
      permission="ploneintranet.microblog.ViewStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="content-share.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateView"
      template="templates/content-share.html"
      permission="ploneintranet.microblog.ViewStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <!-- edit/delete actions via traversal views -->

  <browser:page
      name="statusupdate"
      for="plone.app.layout.navigation.interfaces.INavigationRoot"
      class=".statusupdate_traverse.StatusUpdateTraverse"
      permission="ploneintranet.microblog.ViewStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post-menu.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateView"
      template="templates/post-menu.html"
      permission="ploneintranet.microblog.AddStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="panel-delete-post.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateDeletePanel"
      template="templates/panel-delete-post.html"
      permission="ploneintranet.microblog.DeleteOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="panel-edit-post.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateEditPanel"
      template="templates/panel-edit-post.html"
      permission="ploneintranet.microblog.ModifyOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <!-- special modify views handle POST -->
  <browser:page
      name="post-edited.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateModify"
      template="templates/post.html"
      permission="ploneintranet.microblog.ModifyOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="post-deleted.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateModify"
      template="templates/post-deleted.html"
      permission="ploneintranet.microblog.DeleteOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="comment-edited.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateModify"
      template="templates/comment.html"
      permission="ploneintranet.microblog.ModifyOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

  <browser:page
      name="comment-deleted.html"
      for="ploneintranet.microblog.interfaces.IStatusUpdate"
      class=".statusupdate.StatusUpdateModify"
      template="templates/comment-deleted.html"
      permission="ploneintranet.microblog.DeleteOwnStatusUpdate"
      layer=".interfaces.IPloneIntranetActivitystreamLayer"
      />

</configure>
