     <div class="document-modal-header">
       <div class="document-modal-title left white-text">
         <%= MTL.fileIcon(filename, { class: 'left' }) %>
-        <%- filename %>
+        <%- title %>
       </div>
       <div class="document-modal-toolbar right">
         <a href="<%- url %>" target="_blank">

isPDF = (filename) ->
  fileExtension(filename) == 'pdf'

createPreview = ($container, filename, url) ->
  switch
    when isImage(filename)
      $container.append($('<img/>', { src: url, alt: filename }))
    when isPDF(filename) && PDFObject.supportsPDFs
      PDFObject.embed(url, $container, { width: '800px', height: $(window).height() + 'px' })
    else
      $container.append(MTL.renderTemplate('no_preview', { filename: filename, url: url }))

findOrCreateDocumentModal = ->
  return $('<div/>').appendTo('body') unless $('body > .document-modal').first().length

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