论坛

主页 » Liferay Portal » English » 3. Development

组合视图 统一视图 树状图
讨论主题 [ 上一个 | 下一个 ]
toggle
a g
Download - toolbar not to show for particular folder PDF
2013年3月7日 上午2:01
答复

a g

等级: Expert

帖子: 409

加入日期: 2012年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?
附件

附件: Download_Screenshot1.jpg (92.6k)
a g
RE: Download - toolbar not to show for particular folder PDF
2013年3月7日 上午3:41
答复

a g

等级: Expert

帖子: 409

加入日期: 2012年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?
a g
RE: Download - toolbar not to show for particular folder PDF
2013年3月7日 下午10:30
答复

a g

等级: Expert

帖子: 409

加入日期: 2012年3月2日

最近的帖子

Hi,

Any body develop the portlet - Read only for PDF.

Regards
Anand
a g
RE: Download - toolbar not to show for particular folder PDF
2013年3月11日 上午12:27
答复

a g

等级: Expert

帖子: 409

加入日期: 2012年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>
a g
RE: Download - toolbar not to show for particular folder PDF
2013年3月12日 上午12:11
答复

a g

等级: Expert

帖子: 409

加入日期: 2012年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.