Make it easier for folks to show/hide binary file contents in the
markup/annotate views. * templates/file.ezt Add some customizable template logic to hide the contents of file's with non-human-readable file formats. Were Greg Stein dead, he'd be rolling over in his grave right now. git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@2228 8cb11bc2-c004-0410-86c3-e597b4017df7orig-r2243
parent
8df8e878f4
commit
205b3b67e1
|
@ -1,3 +1,13 @@
|
|||
[# ------------------------------------------------------------------------- ]
|
||||
[# CUSTOMIZE ME: To avoid displaying "binary garbage" -- the contents of ]
|
||||
[# files with non-human-readable file formats -- change the value of the ]
|
||||
[# hide_binary_garbage variable below to 1. ]
|
||||
[# ------------------------------------------------------------------------- ]
|
||||
|
||||
[define hide_binary_garbage]0[end]
|
||||
|
||||
[# ------------------------------------------------------------------------- ]
|
||||
|
||||
[# setup page definitions]
|
||||
[define page_title]Contents of /[where][end]
|
||||
[define help_href][docroot]/help_rootview.html[end]
|
||||
|
@ -57,6 +67,14 @@ Revision [if-any revision_href]<a href="[revision_href]"><strong>[rev]</strong><
|
|||
[end]
|
||||
</div>
|
||||
|
||||
[if-any prefer_markup][define hide_binary_garbage]0[end][end]
|
||||
[if-any image_src_href][define hide_binary_garbage]0[end][end]
|
||||
|
||||
[is hide_binary_garbage "1"]
|
||||
<p><strong>This file's contents are not viewable. Please
|
||||
<a href="[download_href]">download</a> this version of the
|
||||
file in order to view it.</strong></p>
|
||||
[else]
|
||||
|
||||
[define last_rev]0[end]
|
||||
[define rowclass]vc_row_even[end]
|
||||
|
@ -99,6 +117,7 @@ Revision [if-any revision_href]<a href="[revision_href]"><strong>[rev]</strong><
|
|||
</div>
|
||||
[end]
|
||||
[end]
|
||||
[end]
|
||||
|
||||
[include "include/props.ezt"]
|
||||
[include "include/footer.ezt"]
|
||||
|
|
Loading…
Reference in New Issue