<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      xmlns:tal="http://xml.zope.org/namespaces/tal"
>
  <body i18n:domain="ploneintranet">

    <tal:comment condition="nothing">
      <!--
           extracted from prototype/_layouts/document.html
           rendered into workspace/browser/basecontent/templates/document_view.pt
        -->
    </tal:comment>

    <p class="comment-sentinel pat-bumper"
       tal:define="
         num_comments view/num_comments;
         singular python:num_comments==1;
       "
       tal:condition="num_comments"
    >
      <a class="pat-scroll"
         href="#my-comments"
         data-pat-scroll="selector: bottom"
      >
        <span tal:condition="singular"
              tal:omit-tag=""
              i18n:translate="label_there_is_one_comment"
        >There is one comment on this item</span>
        <span tal:condition="not:singular"
              tal:omit-tag=""
              i18n:translate="label_there_are_x_comments"
        >There are
          <span tal:replace="num_comments"
                i18n:name="counter"
          >{{ page.comments.size }}</span>
          comments on this item</span>
      </a>
    </p>

    <div class="comments"
         id="comments-document-comments"
         tal:condition="view/show_stream"
    >

      <tal:comment condition="nothing">
        <!-- A document always has document comments header, displaying the moment of creation of the document and the author.  -->
        <!-- Should there be any comments on the document, then they are shown below. When the document was published, this created a post on the timeline. The comments to this post are the same as the comments here and vice versa.  -->
        <!-- When there are shares of this document, they appear below. Also the comments on the post that was generated by that respective share appear here. -->
      </tal:comment>

      <tal:post repeat="statusupdate_view view/statusupdate_views">
        <tal:statusupdate replace="structure statusupdate_view" />
      </tal:post>

      <tal:commentable tal:condition="view/can_init_comments">
        <div tal:content="structure context/@@first-comment.html"></div>
      </tal:commentable>
    </div><!-- #comments-document-comments -->
  </body>
</html>
