Author: thomas.heute(a)jboss.com
Date: 2007-11-30 09:56:51 -0500 (Fri, 30 Nov 2007)
New Revision: 9221
Added:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/portletIcon_Default1.gif
Removed:
branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img/portletIcon_Default1.gif
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
Log:
Add the icons in the portlet instance selection list
Added:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/portletIcon_Default1.gif
===================================================================
(Binary files differ)
Property changes on:
branches/JBoss_Portal_Branch_2_6/core/src/bin/portal-core-war/images/portletIcon_Default1.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2007-11-30
14:33:34 UTC (rev 9220)
+++
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/ui/content/portlet/PortletContentEditorPortlet.java 2007-11-30
14:56:51 UTC (rev 9221)
@@ -55,6 +55,8 @@
public class PortletContentEditorPortlet extends GenericPortlet
{
+ public static final String DEFAULT_PORTLET_ICON =
"/portal-core/images/portletIcon_Default1.gif";
+
/** . */
private final PortletMode EDIT_CONTENT = new PortletMode("edit_content");
Modified:
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp
===================================================================
---
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2007-11-30
14:33:34 UTC (rev 9220)
+++
branches/JBoss_Portal_Branch_2_6/core/src/resources/portal-core-war/WEB-INF/jsp/content/portlet_editor.jsp 2007-11-30
14:56:51 UTC (rev 9221)
@@ -11,6 +11,11 @@
Collection instances = (Collection)request.getAttribute("INSTANCES");
Instance selectedInstance =
(Instance)request.getAttribute("SELECTED_INSTANCE");
%>
+<%@page import="org.jboss.portal.portlet.info.PortletInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.CorePortletInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.PortletInfoInfo"%>
+<%@page import="org.jboss.portal.core.portlet.info.PortletIconInfo"%>
+<%@page
import="org.jboss.portal.core.ui.content.portlet.PortletContentEditorPortlet"%>
<portlet:defineObjects/>
<span class="portlet-font">Portlet instance associated to this
window:</span>
@@ -27,14 +32,33 @@
{
displayName = instance.getId();
}
+
+ PortletInfo info = instance.getPortlet().getInfo();
+
+ String iconLocation = null;
+ if (info instanceof CorePortletInfo)
+ {
+ CorePortletInfo cInfo = (CorePortletInfo)info;
+ PortletInfoInfo portletInfo = cInfo.getPortletInfo();
+ if (portletInfo != null && portletInfo.getPortletIconInfo() !=
null && portletInfo.getPortletIconInfo().getIconLocation(PortletIconInfo.SMALL) !=
null)
+ {
+ iconLocation =
portletInfo.getPortletIconInfo().getIconLocation(PortletIconInfo.SMALL);
+ }
+ }
+ if (iconLocation == null)
+ {
+ iconLocation = PortletContentEditorPortlet.DEFAULT_PORTLET_ICON;
+ }
+
%>
<portlet:actionURL var="url">
<portlet:param name="content.action.select"
value="true"/>
<portlet:param name="content.uri" value="<%=
instance.getId() %>"/>
</portlet:actionURL>
<tr class="<%= rowClass %>">
- <td><a href="<%= url %>"><%= displayName %>
- </a></td>
+ <td>
+ <img src="<%= iconLocation %>" align="middle"
style="margin:0 4px 0 0"/>
+ <a href="<%= url %>"><%= displayName
%></a></td>
</tr>
<%
}
Deleted:
branches/JBoss_Portal_Branch_2_6/core-admin/src/bin/portal-admin-war/img/portletIcon_Default1.gif
===================================================================
(Binary files differ)
Show replies by date