You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2007/01/18 15:59:42 UTC

svn commit: r497454 - in /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html: solr-actionbar.ft solrbar.vt.xml

Author: thorsten
Date: Thu Jan 18 06:59:41 2007
New Revision: 497454

URL: http://svn.apache.org/viewvc?view=rev&rev=497454
Log:
removing context parameter since  is doing the same job better.

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-actionbar.ft
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solrbar.vt.xml

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-actionbar.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-actionbar.ft?view=diff&rev=497454&r1=497453&r2=497454
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-actionbar.ft (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-actionbar.ft Thu Jan 18 06:59:41 2007
@@ -37,23 +37,15 @@
   </description>
   <usage><![CDATA[<forrest:contract name="solr-actionbar">
   <forrest:property name="request">#{$getRequest}</forrest:property>
-  <forrest:property name="contextPath">#{$contextPath}</forrest:property>
 </forrest:contract>]]></usage>
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
     name="solr-actionbar" inputFormat="xsl">
     <xsl:stylesheet version="1.1" 
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:param name="request" />
-      <xsl:param name="contextPath" />
+      <xsl:param name="defaultVariables" select="'test.html'"/>
+      <xsl:variable name="root" select="$defaultVariables/*/*[@name='root']/@value"/>
       <xsl:template match="/">
-        <xsl:variable name="context">
-          <xsl:choose>
-            <xsl:when test="$contextPath!='' and $contextPath!=' '">       
-              /<xsl:value-of select="$contextPath"/>/
-            </xsl:when>
-            <xsl:otherwise>/</xsl:otherwise>
-          </xsl:choose>
-        </xsl:variable>
         <forrest:content>
           <forrest:part>Apache Solr Server commands: 
             <xsl:choose>
@@ -67,7 +59,7 @@
                   </xsl:when>
                   <xsl:when test="contains($request,'solr-search') or contains($request,'solr.commit') or contains($request,'solr.delete.do') or contains($request,'solr.optimize')"/>
                   <xsl:otherwise>
-                    <a href="{normalize-space($context)}{$request}.solr.add.do.html"> add document </a>
+                    <a href="{normalize-space($root)}{$request}.solr.add.do.html"> add document </a>
                   </xsl:otherwise>
                 </xsl:choose>
               </li>
@@ -78,15 +70,15 @@
                   </xsl:when>
                   <xsl:when test="contains($request,'solr-search') or contains($request,'solr.commit') or contains($request,'solr.add.do') or contains($request,'solr.optimize')"/>
                   <xsl:otherwise>
-                    <a href="{normalize-space($context)}{$request}.solr.delete.do.html"> delete document</a>
+                    <a href="{normalize-space($root)}{$request}.solr.delete.do.html"> delete document</a>
                   </xsl:otherwise>
                 </xsl:choose>
               </li>
               <li>
-                <a href="{normalize-space($context)}solr.commit.do.html"> commit </a>
+                <a href="{normalize-space($root)}solr.commit.do.html"> commit </a>
               </li>
               <li>
-                <a href="{normalize-space($context)}solr.optimize.do.html"> optimize </a>
+                <a href="{normalize-space($root)}solr.optimize.do.html"> optimize </a>
               </li>
             </ul>
               </xsl:otherwise>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solrbar.vt.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solrbar.vt.xml?view=diff&rev=497454&r1=497453&r2=497454
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solrbar.vt.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solrbar.vt.xml Thu Jan 18 06:59:41 2007
@@ -17,7 +17,6 @@
       <!--Search interface (solr-search contract) to
         search your solr server. -->
         <forrest:contract name="solr-search">
-          <forrest:property name="contextPath">#{$contextPath}</forrest:property>
           <forrest:property name="hidden">
             <input name="hl" type="hidden" value="true"/>
             <input name="hl.fl" type="hidden" value="content"/>
@@ -37,8 +36,6 @@
         <!-- GUI to manage your project in solr. -->
           <forrest:contract name="solr-actionbar">
             <forrest:property name="request">#{$getRequest}</forrest:property>
-            <forrest:property name="contextPath">
-              #{$contextPath}</forrest:property>
           </forrest:contract>
         </forrest:hook>
       </jx:if>