Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Asset publisher : list icons should represent document type
Hello,
I was thinking about a trivial improvement of the Asset publisher.
The icon for a document in the asset publisher is always the same (the "paperclip").
Once you click on the document entry, it displays the icon corresponding to the document type.
I think it should be the case from the beginning, thus permitting the user to see what doc type it is from the list.
Should I make a JIRA ticket ? =)
I was thinking about a trivial improvement of the Asset publisher.
The icon for a document in the asset publisher is always the same (the "paperclip").
Once you click on the document entry, it displays the icon corresponding to the document type.
I think it should be the case from the beginning, thus permitting the user to see what doc type it is from the list.
Should I make a JIRA ticket ? =)
Hi M. García,
That's a very good idea. It might require extending the Asset Framework (AssetRenderer in particular), but I think that's perfectly fine. Please go ahead and create a JIRA ticket for it. Next paste the link in this thread.
BTW, do you want to give it a try and implement it?
That's a very good idea. It might require extending the Asset Framework (AssetRenderer in particular), but I think that's perfectly fine. Please go ahead and create a JIRA ticket for it. Next paste the link in this thread.
BTW, do you want to give it a try and implement it?
Here's the JIRA ticket : http://issues.liferay.com/browse/LPS-19499.
I'm quite busy lately so I can't give it a try at the moment.
If the issue's still there when I'll have more time then yes, I'll give it a try ;-).
(I potentially have a client which will need it soon, in which case I'll handle this, but it really depends on him ;-) )
I'm quite busy lately so I can't give it a try at the moment.
If the issue's still there when I'll have more time then yes, I'll give it a try ;-).
(I potentially have a client which will need it soon, in which case I'll handle this, but it really depends on him ;-) )
Thanks!
I've added it to the Community Backlog so that other community members know they can also work on it.
I've added it to the Community Backlog so that other community members know they can also work on it.
Hello,
I managed to do this in an Asset Publisher Display Style hook.
I copied "title_list.jsp" from Asset Publisher display styles.
I modified it so that it uses document type icon.
It's been done in a simple way, because this display style I created is used for asset publisher displaying documents only.
So I think this is a good start, now it's just adding some asset type test (to determine whether it's a document, a web content, etc.) to perform like this only in the case of documents.
Instead of this :
Use this :
There you go ! =)
I managed to do this in an Asset Publisher Display Style hook.
I copied "title_list.jsp" from Asset Publisher display styles.
I modified it so that it uses document type icon.
It's been done in a simple way, because this display style I created is used for asset publisher displaying documents only.
So I think this is a good start, now it's just adding some asset type test (to determine whether it's a document, a web content, etc.) to perform like this only in the case of documents.
Instead of this :
...
<liferay-ui:icon label="<%= true %>" message="<%= HtmlUtil.escape(title) %>" src="<%= assetRendererFactory.getIconPath(renderRequest) %>" url="<%= viewURL.toString() %>" />
...Use this :
...
<%
long docPK = assetEntry.getClassPK();
DLFileEntry dlFileEntry = DLFileEntryLocalServiceUtil.getFileEntry(docPK);
String iconPath = themeDisplay.getPathThemeImages()+"/file_system/small/"+dlFileEntry.getIcon()+".png";
%>
<liferay-ui:icon label="<%= true %>" message="<%= HtmlUtil.escape(title) %>" src="<%= iconPath %>" url="<%= viewURL.toString() %>" />
...There you go ! =)
Thanks!
Hi M Garcia!
I have just added this improvement to trunk, so you can be proud your contribution has made its way to Liferay 6.1!
Now Liferay is a bit more "yours" than before
Thanks a lot for your contribution!
Juan
I have just added this improvement to trunk, so you can be proud your contribution has made its way to Liferay 6.1!
Now Liferay is a bit more "yours" than before
Thanks a lot for your contribution!
Juan