Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
lou cat
document library display: disable comments and preview?
November 21, 2012 4:25 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

Hello,

In 6.0.6, is there a way to disable comments for document library display? I find the settings for every portlet but this emoticon
It seems disabled for guest users but I'd need it for everyone.

Also, would it be possible to have a direct download of the document instead of opening the page with the information about the document itself?
Not only I don't need and don't like that the user could see URL, status, version etc of the document, but if I try to download a document which is at the bottom of the page, it opens this "preview" of the document but it goes up to the top of the page, thus hiding it!

please is there anyone who can give suggestions on this?
thank you emoticon
Hitoshi Ozawa
RE: document library display: disable comments and preview?
November 24, 2012 6:01 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

would it be possible to have a direct download of the document instead of opening the page with the information about the document itself?


Almost everybody I know is asking the same thing. You'll have to create a hook to modify the jsp page. I think there were several files I had to modify because several pages such as search result was doing the same thing.
lou cat
RE: document library display: disable comments and preview?
November 26, 2012 1:20 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

ok, thank you Hitoshi.
If also the new Document and Media Library has this characteristics, is there a place where we can vote for adding a configuration file to remove this?
Not planning to upgrade soon at all, but better think about the future anyway emoticon
lou cat
RE: document library display: disable comments and preview?
December 6, 2012 8:13 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

Isn't there a way to differentiate the code for document library and document library display?
I'd like to have a direct download link only in document library display, it is fine for me if it's control panel and document library people will see a "preview" of the file with all the information.

I just don't understand if there is a clear distinction in the code between the 2 portlets...

I'm trying to customize view_file_entries.jspf but with no success at the moment emoticon
lou cat
RE: document library display: disable comments and preview?
December 7, 2012 1:36 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

Ok, I guess there's no easy way to separate document library and document library display, but it's ok, I managed to do it and will keep this behaviour everywhere.
I just modified view_file_entries.jspf assigning to rowHREF the direct link of the document:

rowHREF=themeDisplay.getPortalURL()+ themeDisplay.getPathContext()+ "/documents/"+ themeDisplay.getScopeGroupId() + StringPool.SLASH + fileEntry.getFolderId() + StringPool.SLASH + HttpUtil.encodeURL(HtmlUtil.unescape(fileEntry.getTitle()));

I honestly didn't find other files that need to be changed, search.jsp works as usual, but we'll see.