##
##
## Build the list of documents extras to display, if it does not exist (default).
## List format : ["ExtraAnchor",  "ExtraTabText", numberOfItems]
##
#if (!$docextralinks && !$docextras)
  #set($docextralinks = $util.arrayList)
  #if($xcontext.action == 'view' && $viewer != 'content')
    #set ($discard = $docextralinks.add(['content', $msg.get('core.links.content'), -1]))
  #end
  #if($viewer != 'comments' && $showcomments)
    #set ($discard = $docextralinks.add(["comments", $msg.get("docextra.comments"), $doc.getObjects("XWiki.XWikiComments").size()]))
  #end
  #if($viewer != 'attachments' && $showattachments)
    #set ($discard = $docextralinks.add(["attachments", $msg.get("docextra.attachments"), $doc.getAttachmentList().size()]))
  #end
  #if($viewer != 'history' && $showhistory)
    #set ($discard = $docextralinks.add(["history", $msg.get("docextra.history"), -1]))
  #end
  #if($viewer != 'information' && $showinformation)
    #set ($discard = $docextralinks.add(["information", $msg.get("docextra.information"), -1]))
  #end
#end
##
##
##  Display the document title, modification date, and shortcuts to comments/attachments...
##
  <div id="document-info">
    <div class="xdocLastModification"> ## Last modification
      $msg.get('core.footer.modification', [$xwiki.getUserName($tdoc.author), $xwiki.formatDate($tdoc.date)])
    </div>
    <div>
      #foreach($docextralink in $docextralinks)
        #set ($extraAnchor = $docextralink.get(0))
        #set ($extraText = $docextralink.get(1))
        #set ($extraCount = $docextralink.get(2))
        #if($velocityCount > 1) <span class="separator">&#183;</span> #end
        <span id="${escapetool.xml(${extraAnchor})}shortcut"><a href="$doc.getURL('view', "viewer=$!{escapetool.url(${extraAnchor})}")">${escapetool.xml(${extraText})}</a>#if($extraCount != -1) <span class="itemCount">(${escapetool.xml(${extraCount})})</span>#end</span>
      #end
    </div>
    <div class="clearfloats"></div>
  </div>
