1. Olemis Lang
  2. bloodhound-trac

Source

bloodhound-trac / trac / templates / preview_file.html

<!--!
Display a div for visualizing a preview of a file content.

Arguments:
 - preview: a preview usually obtained from calling Mimeview.preview_data()
-->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:i18n="http://genshi.edgewall.org/i18n"
      py:strip="">
  ${preview.rendered}
  <py:choose>
    <p py:when="preview.size == 0">
      <strong>(The file is empty)</strong>
    </p>
    <p py:when="not preview.rendered">
      <py:choose>
        <py:when test="preview.max_file_size_reached"><i18n:msg params="size">
          <strong>HTML preview not available</strong>, since the file size exceeds $preview.max_file_size bytes.
        </i18n:msg></py:when>
        <py:otherwise><i18n:msg>
          <strong>HTML preview not available</strong>, since no preview renderer could handle it.
        </i18n:msg></py:otherwise>
      </py:choose>
      <i18n:msg>Try <a href="$preview.raw_href">downloading</a> the file instead.</i18n:msg>
    </p>
  </py:choose>
</html>