[Yanel-commits] rev 27117 - in public/yanel/trunk/src/realms/welcome-admin/yanel: data/xslt resources/show-realms/src/java/org/wyona/yanel/impl/resources resources/show-realms/xslt

josias at wyona.com josias at wyona.com
Mon Sep 3 11:33:59 CEST 2007


Author: josias
Date: 2007-09-03 11:33:58 +0200 (Mon, 03 Sep 2007)
New Revision: 27117

Modified:
   public/yanel/trunk/src/realms/welcome-admin/yanel/data/xslt/welcome.xsl
   public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
   public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/xslt/info2xhtml.xsl
Log:
adds icons and docu to the list of registered resources. see bug #5466, thanks to simon

Modified: public/yanel/trunk/src/realms/welcome-admin/yanel/data/xslt/welcome.xsl
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/data/xslt/welcome.xsl	2007-09-03 09:32:24 UTC (rev 27116)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/data/xslt/welcome.xsl	2007-09-03 09:33:58 UTC (rev 27117)
@@ -4,7 +4,7 @@
   xmlns="http://www.w3.org/1999/xhtml"
   >
   
-  <xsl:output method="html"/>
+  <xsl:output method="xhtml" encoding="UTF-8" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"/>
   
 <!--
   <xsl:param name="servlet.context"/>
@@ -95,8 +95,8 @@
   
   <xsl:template match="resourcetype">
     <li>
-      <xsl:value-of select="./localname"/>
-      (<xsl:value-of select="./description"/>)
+      <img src="{icon}" alt="{./icon/@alt}"/> &#160; <xsl:value-of select="./localname"/>
+      (<xsl:value-of select="./description"/>)&#160;<a href="{./docu}">docu</a>
     </li>
   </xsl:template>
 

Modified: public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java	2007-09-03 09:32:24 UTC (rev 27116)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/src/java/org/wyona/yanel/impl/resources/ShowRealms.java	2007-09-03 09:33:58 UTC (rev 27117)
@@ -107,9 +107,11 @@
         for (int i = 0; i < rtds.length; i++) {
             sb.append("<resourcetype>");
             try {
-                Resource resource = rtr.newResource(rtds[i].getResourceTypeUniversalName());
+                String rtYanelHtdocPath = PathUtil.getGlobalHtdocsPath(this) + yanel.getReservedPrefix() + "/resource-types/" + rtds[i].getResourceTypeNamespace() + "::" + rtds[i].getResourceTypeLocalName() + "/" + yanel.getReservedPrefix() + "/";
                 sb.append("<localname>" + rtds[i].getResourceTypeLocalName() + "</localname>");
                 sb.append("<description>" + rtds[i].getResourceTypeDescription() + "</description>");
+                sb.append("<icon alt=\"" + rtds[i].getResourceTypeLocalName() + " resource-type\">" + rtYanelHtdocPath + "icons/32x32/rt-icon.png" + "</icon>");
+                sb.append("<docu>" + rtYanelHtdocPath + "doc/index.html" + "</docu>");
             } catch(Exception e) {
                 log.error(e);
             }

Modified: public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/xslt/info2xhtml.xsl
===================================================================
--- public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/xslt/info2xhtml.xsl	2007-09-03 09:32:24 UTC (rev 27116)
+++ public/yanel/trunk/src/realms/welcome-admin/yanel/resources/show-realms/xslt/info2xhtml.xsl	2007-09-03 09:33:58 UTC (rev 27117)
@@ -5,7 +5,7 @@
   xmlns="http://www.w3.org/1999/xhtml"
   >
   
-  <xsl:output method="html"/>
+  <xsl:output method="xhtml"/>
   
 <!--
   <xsl:param name="servlet.context"/>  
@@ -53,7 +53,7 @@
   
   <xsl:template match="resourcetype">
     <li>
-      <xsl:value-of select="./localname"/>
+      <img src="{icon}" alt="{./icon/@alt}"/> &#160;<xsl:value-of select="./localname"/>&#160;<a href="{./docu}">docu</a>
     </li>
   </xsl:template>
 



More information about the Yanel-commits mailing list