portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html lucene-search.vm
Date Tue, 20 May 2003 07:17:10 GMT
taylor      2003/05/20 00:17:10

  Added:       webapp/WEB-INF/templates/vm/portlets/html lucene-search.vm
  Log:
  First go at Lucene Search Portlet
  It ain't exactly working (ahem) - it seems it can only find strings that are equal to "jetspeed"
:-/
  To test this out, run the "lucene-create-indices" target first, then add the Lucene Search
portlet to a page
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/lucene-search.vm
  
  Index: lucene-search.vm
  ===================================================================
  
  <form action="$jslink.setAction('portlets.LuceneSearchAction')" method="POST">
  <INPUT TYPE='hidden' VALUE='' NAME='listIndex'>
  
  <table border="0" cellpadding="0" cellspacing="0" width="75%">
    <tr>
      <td><font size="-2">&nbsp;</font></td>
      <td class="blackline">
        <table border="0" cellpadding="0" cellspacing="1" width="100%">
          <tr>
            <td>
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr><td class="$!{skin.ContentStyleClass}" colspan="4" align="right">&nbsp;</td></tr>
                <tr>
                      <td width="5%" class="$!{skin.ContentStyleClass}" align="left">&nbsp;</td>
                      <td class="$!{skin.ContentStyleClass}" align="left">Search Content:</td>
                      <td class="$!{skin.ContentStyleClass}" align="left">
                        <input tabindex='1' id="lucene_search" type="text" name="lucene_search"
size="50" value="$!lucene_search"/>
                        &nbsp;<input type="submit" 
                                     border="0" alt="Search" value="Search" name="eventSubmit_doSearch"/>
                      </td>
                      <td width="5%" class="$!{skin.ContentStyleClass}" align="left">&nbsp;</td>
                </tr>
                <tr><td class="$!{skin.ContentStyleClass}" colspan="4" align="right">&nbsp;</td></tr>
                <tr><td colspan="4" class="blackline"/></tr>
                <tr>
                  <td colspan="4">
                  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="80%" class="$!{skin.HighlightTitleStyleClass}" align="left">&nbsp;URL</td>
                    </tr>
                    #set ($listIndex = 1)
                    #foreach ($result in $lucene_results)
                      <tr><td colspan="5" class="blackline"/></tr>
                      <tr>
                        <td class="$!{skin.ContentStyleClass}" align="left">
                          <a id="preview_$listIndex" 
                             href="$result.DocumentURL" target="_blank">
                             <span class="$!{skin.ContentStyleClass}">$result.DocumentURL</span>
                          </a>
                        </td>
                      </tr>
                      #set ($listIndex = $listIndex + 1)
                    #end
                    #if ($!lucene_resultsize == 0)
                    <tr>
                      <td class="$!{skin.ContentStyleClass}" align="left">No matching
hits found for given search criteria</td>
                    </tr>
                    #end
                    <tr><td colspan="5" class="blackline"/></tr>
                    <tr><td class="$!{skin.ContentStyleClass}" colspan="5" align="right">&nbsp;</td></tr>
                    </table>
                    </td>
                    </tr>                  
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  </form>
  <br/>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message