W.r.t Customization of atreal.richfile.preview in plone, for file preview, there is a template called viewlet.pt, it contains a TAL statement which displays the controls to activate/update, refresh and collapse the Actions menu: . The full code snippet:
<dl class="richfile portlet"
tal:condition="view/available"
tal:attributes="id view/plugin_id"
i18n:domain="atreal.richfile.preview">
<dt tal:attributes="id string:${view/plugin_id}Header" class="rfheader portletHeader">
<span class="portletTopLeft"></span>
<!--tal:block tal:replace="structure view/controls" -->
<span class="title" style="font-weight:bold"
i18n:translate="">
Preview
</span>
<span class="portletTopRight"> <span>
</dt>
<dd tal:content="structure view/getPreview" >
<!--Your specific code here-->
<IFRAME src="http://somesite.com"
tal:attributes="src string:${here/absolute_url}/rfpreview"
ondragstart="false" onselectstart="false"
width="100%" height="400" scrolling="auto" frameborder="0"> </IFRAME>
<!--End of specific code-->
</dd>
</dl>
If I remove the <tal:block tal:replace="structure view/controls" >
, I can view the doc, xls, odt file formats correctly. But for pdf files all the content is jumbled up. If I keep the above statement as it is, it opens another window when I click the action controls activate/update or refresh and is viewed correctly, BUT it downloads the doc xls and other files (which is not expected due to the hyperlink)
Also note after changing the default <dd>
attributes to <dd tal:content="structure view/getPreview">
allows to view the pdf files without the background image.
If the statement is left as it is, a new window is opened where there are icons to zoom, print, save as. I wish to disable these in this window.
Also I wish to prevent copy_paste from this new window.(The disabling copy paste I can do with javascript in the viewlet) but it doesn't happen in the new window.I am unable to detect the template for this new window.
Main aim is to prevent any kind of copy/paste/download of any file from the plone site but should allow file preview.
Can anybody guide correctly as to the exact location in ZMI and how to customize it? Plone 4.1