留言板

Download - toolbar not to show for particular folder PDF

anand gopalan,修改在11 年前。

Download - toolbar not to show for particular folder PDF

Expert 帖子: 442 加入日期: 12-3-2 最近的帖子
Hi,

I have folder name called Polices,Forms & Insurance, and its has different PDF files in each folder.
now, I want to display polices folder PDF files only view, I don't want to show the Download option - I am using Document & Media display portlet

I controlled other action button through with Guest role & only view permission, but it showing download option,

now I want to remove toolbar itself for Guest user. Please see the screenshot. How to implement?
anand gopalan,修改在11 年前。

RE: Download - toolbar not to show for particular folder PDF

Expert 帖子: 442 加入日期: 12-3-2 最近的帖子
Hi All,

i tried with below code in view_file_entry.jsp --> Document & Media Display Portlet

<c:if test="<%= (folderName != "Policies") %>">
<div class="lfr-header-row">
<div class="lfr-header-row-content">
<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "fileEntryToolbar" %>' />
</div>
</div>
</c:if>

Error:
javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
javax.portlet.PortletException: org.apache.jasper.JasperException: java.lang.NullPointerException
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:110)

Any body know how to disable the download option?
anand gopalan,修改在11 年前。

RE: Download - toolbar not to show for particular folder PDF

Expert 帖子: 442 加入日期: 12-3-2 最近的帖子
Hi,

Any body develop the portlet - Read only for PDF.

Regards
Anand
anand gopalan,修改在11 年前。

RE: Download - toolbar not to show for particular folder PDF

Expert 帖子: 442 加入日期: 12-3-2 最近的帖子
Hi,

I modify the below code in (view_file_entry.jsp)not showing the Download option in Document & Media Display, Please let me know is approach is correct?

<c:if test="<%= (folderName != "Policies") %>">
<div class="lfr-header-row">
<div class="lfr-header-row-content">
<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "fileEntryToolbar" %>' />
</div>
</div>
</c:if>

------
----
<c:when test="<%= (folderName != "Policies") %>">

<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
{
handler: function(event) {
location.href = '<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, StringPool.BLANK) %>';
},
icon: 'download',
label: '<%= UnicodeLanguageUtil.get(pageContext, "download") %>'
},
</c:if>
</c:when>
anand gopalan,修改在11 年前。

RE: Download - toolbar not to show for particular folder PDF

Expert 帖子: 442 加入日期: 12-3-2 最近的帖子
Hi,

Below code will disable the Edit bar option (download option), but it disable for all folders. But I want disable only Policies folder.

I have written the code like below,so it will disable Edit bar, only Polices folder. not for other folder. Please let me know what wrong in the code.

[ <c:if test="<%= (folderName != "Policies") %>"> ], [ROOT\html\portlet\document_library\view_file_entry.jsp]
<div class="lfr-header-row">
<div class="lfr-header-row-content">
<aui:button-row cssClass="edit-toolbar" id='<%= renderResponse.getNamespace() + "fileEntryToolbar" %>' />
</div>
</div>
</c:if>
----
---
<c:when test="<%= (folderName != "Policies") %>">

<c:if test="<%= DLFileEntryPermission.contains(permissionChecker, fileEntry, ActionKeys.VIEW) %>">
{
handler: function(event) {
location.href = '<%= DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, StringPool.BLANK) %>';
},
icon: 'download',
label: '<%= UnicodeLanguageUtil.get(pageContext, "download") %>'
},
</c:if>
</c:when>



why condition is not Satisfy. Please see the code.