Index: openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl,v diff -u -r1.27.8.24 -r1.27.8.25 --- openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 14 Sep 2014 09:02:41 -0000 1.27.8.24 +++ openacs-4/packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl 18 Sep 2014 07:10:07 -0000 1.27.8.25 @@ -161,7 +161,13 @@ append out "
DB Query file
\n" return $out } elseif { [file extension $path] ne ".tcl" } { - append out "
Delivered as [ns_guesstype $path]
\n" + set mime_type [ns_guesstype $path] + if {[string match image/* $mime_type] && [regexp {packages/(.*)/www/resources/(.*)$} $path . pkg name]} { + set preview "

" + } else { + set preview "" + } + append out "

Delivered as $mime_type$preview
\n" return $out } Index: openacs-4/packages/acs-api-browser/www/content-page-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/content-page-view.adp,v diff -u -r1.10.16.2 -r1.10.16.3 --- openacs-4/packages/acs-api-browser/www/content-page-view.adp 10 Sep 2014 20:19:26 -0000 1.10.16.2 +++ openacs-4/packages/acs-api-browser/www/content-page-view.adp 18 Sep 2014 07:10:08 -0000 1.10.16.3 @@ -13,6 +13,7 @@ +

[ show source ] @@ -33,4 +34,4 @@

@file_contents;literal@
- + Index: openacs-4/packages/acs-api-browser/www/content-page-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/content-page-view.tcl,v diff -u -r1.5.4.10 -r1.5.4.11 --- openacs-4/packages/acs-api-browser/www/content-page-view.tcl 16 Sep 2014 22:37:06 -0000 1.5.4.10 +++ openacs-4/packages/acs-api-browser/www/content-page-view.tcl 18 Sep 2014 07:10:08 -0000 1.5.4.11 @@ -66,6 +66,13 @@ return } +set mime_type [ns_guesstype $path] +if {![string match "text/*" $mime_type]} { + set source_p 0 + set source_link 0 +} else { + set source_link 1 +} if { $source_p } { set file_contents [template::util::read_file $::acs::rootdir/$path] set file_contents [apidoc::tclcode_to_html $file_contents]