"Fossies" - the Fresh Open Source Software Archive

Member "PURELIB/trac/templates/preview_file.html" (27 Aug 2019, 1274 Bytes) of package /windows/misc/Trac-1.4.win-amd64.exe:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 {#  Copyright (C) 2010-2014 Edgewall Software
    2 
    3   This software is licensed as described in the file COPYING, which
    4   you should have received as part of this distribution. The terms
    5   are also available at https://trac.edgewall.org/wiki/TracLicense.
    6 
    7   This software consists of voluntary contributions made by many
    8   individuals. For the exact contribution history, see the revision
    9   history and logs, available at https://trac.edgewall.org/.
   10 #}
   11 
   12 {# Displays a div for visualizing a preview of a file content.
   13 
   14 Arguments:
   15  - `preview` a preview usually obtained from calling Mimeview.preview_data()
   16 
   17 #}
   18 ${preview.rendered}
   19 
   20 # if preview.size == 0:
   21 <p>
   22   <strong>${_("(The file is empty)")}</strong>
   23 </p>
   24 # elif not preview.rendered:
   25 <p>
   26 #   if preview.max_file_size_reached:
   27 #     set size = pretty_size(preview.max_file_size)
   28 #     trans size
   29 
   30       <strong>HTML preview not available</strong>,
   31       since the file size exceeds ${size}.
   32 
   33 #     endtrans
   34 #   else:
   35 #     trans
   36 
   37       <strong>HTML preview not available</strong>,
   38       since no preview renderer could handle it.
   39 
   40 #     endtrans
   41 #   endif
   42 #   trans url = preview.raw_href
   43 
   44     Try <a href="${url}">downloading</a> the file instead.
   45 
   46 #   endtrans
   47 </p>
   48 # endif