 
 initDocumentModal = ($fileCard) ->
   filename = $fileCard.data('mtl-document-name')
+  title = $fileCard.prop('title')
   url = $fileCard.prop('href')
   $modal = $(
     MTL.renderTemplate(
       'document_modal',
       filename: filename,
+      title: title,
       url: url,
       hasNext: hasNextFileCard($fileCard),
       hasPrev: hasPrevFileCard($fileCard)

    </p>
    <a href="<%- url %>" target="_blank" class="btn btn-primary truncate">
      <%= MTL.icon('file_download', { class: 'left' }) %>
      <%- filename %>
    </a>
  </div>
"""

  )
  $modal.find('.document-modal-next').on('click', -> initDocumentModal(nextFileCard($fileCard)))
  $modal.find('.document-modal-prev').on('click', -> initDocumentModal(prevFileCard($fileCard)))
  createPreview($modal.find('.document-modal-content'), title, filename, url)
  findOrCreateDocumentModal().replaceWith($modal)
  $('body').addClass('no-scroll')

