[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndexNG/dtml - addTextIndexNG.dtml:1.1.2.1 manageTextIndexNG.dtml:1.1.2.1

Andreas Jung andreas@zope.com
Fri, 4 Jan 2002 11:52:15 -0500


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndexNG/dtml
In directory cvs.zope.org:/tmp/cvs-serv1438/lib/python/Products/PluginIndexes/TextIndexNG/dtml

Added Files:
      Tag: ajung-textindexng-branch
	addTextIndexNG.dtml manageTextIndexNG.dtml 
Log Message:
added


=== Added File Zope/lib/python/Products/PluginIndexes/TextIndexNG/dtml/addTextIndexNG.dtml ===
<dtml-var manage_page_header>

<dtml-var "manage_form_title(this(), _,
           form_title='Add TextIndexNG',
	   )">


<p class="form-help">
<strong>Text Indexes</strong> break text up into individual words, and 
are often referred to as full-text indexes. Text indexes 
sort results by score meaning they return hits in order 
from the most relevant to the lest relevant.
</p>

<form action="manage_addTextIndexNG" method="post" enctype="multipart/form-data">
<table cellspacing="0" cellpadding="2" border="0">
  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Id
    </div>
    </td>
    <td align="left" valign="top">
    <input type="text" name="id" size="40" />
    </td>
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Vocabulary
    </div>
    </td>
    <td>

    <select name="extra.lexicon:record">  
      <option value="None">None</option>
      <dtml-in "this().aq_parent.objectItems('Vocabulary')">
        <option value="&dtml-sequence-key;">&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">)
      </dtml-in>
    </select>
    
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Stemmer 
    </div>
    </td>
    <td>

    <select name="extra.useStemmer:record:string">  
      <dtml-in "['None','danish', 'dutch', 'english', 'french', 'german', 'italian', 'norwegian', 'porter', 'portuguese', 'russian', 'spanish', 'swedish']">

        <option value="&dtml-sequence-item;">&dtml-sequence-item; 
      </dtml-in>
    </select>
    
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Splitter 
    </div>
    </td>
    <td>

    <select name="extra.useSplitter:record:string">  
      <dtml-in "availableSplitters()">
        <option value="&dtml-sequence-key;">&dtml-sequence-key; 
      </dtml-in>
    </select>
    
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Globbing
    </div>
    </td>
    <td>

    <select name="extra.useGlobbing:record:int">  
      <option value="1">enabled</option>
      <option value="0">disabled</option>
    </select>
    
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Near search
    </div>
    </td>
    <td>

    <select name="extra.useNearSearch:record:int">  
      <option value="1">enabled</option>
      <option value="0">disabled</option>
    </select>
    
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    Near search distance
    </div>
    </td>
    <td>
    <select name="extra.nearDistance:record:int">  
      <dtml-in "_.range(1,10)">
        <option value="&dtml-sequence-item;">&dtml-sequence-item;</option>
      </dtml-in>
    </select>
    </td> 
  </tr>

  <tr>
    <td align="left" valign="top">
    <div class="form-label">
    default operator
    </div>
    </td>
    <td>
    <select name="extra.useOperator:record:string">  
      <option value="and">and</option>
      <option value="or">or</option>
    </select>
    </td> 
  </tr>


  <tr>
    <td align="left" valign="top">
    <div class="form-optional">
    Type
    </div>
    </td>
    <td align="left" valign="top">
    TextIndexNG
    </td>
  </tr>


  <tr>
    <td align="left" valign="top">
    </td>
    <td align="left" valign="top">
    <div class="form-element">
    <input class="form-element" type="submit" name="submit" 
     value=" Add " /> 
    </div>
    </td>
  </tr>
</table>
</form>

<dtml-var manage_page_footer>


=== Added File Zope/lib/python/Products/PluginIndexes/TextIndexNG/dtml/manageTextIndexNG.dtml ===
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<p class="form-help">

<form method="post" action="manage_setPreferences">

<table border="0" cellspacing="2" cellpadding="2">

<tr>
  <th align="left" width="20%">Vocabulary to use</th>

  <td align="left">
    <select name="vocabulary">  
      <dtml-in "aq_parent.aq_parent.objectItems('Vocabulary')">
        <dtml-if "_['sequence-key']==vocabulary_id">
          <option value="&dtml-sequence-key;" selected>&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">) 
        <dtml-else>
          <option value="&dtml-sequence-key;">&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">)
        </dtml-if>
      </dtml-in>
    </select>
    
 </td>

 <td>
   <em>Warning:</em> changing the vocabulary makes only sense when after 
   creating the index and before indexing any objects. The index will be cleared
   when you change the vocabulary after indexing objects.
 </td>
</tr> 

<dtml-comment>
<tr>
  <th align="left">Splitter</th>
  <td>
    <select name="splitter"> 
      <dtml-in availableSplitters>
        <dtml-if "_.getitem('sequence-key')==useSplitter"> 
           <option value="&dtml-sequence-key;" selected>&dtml-sequence-item;
        <dtml-else>
           <option value="&dtml-sequence-key;">&dtml-sequence-item;
        </dtml-if>
      </dtml-in>
    </select>
  </td>
</tr>

<tr>
  <th align="left">Default text operator</th>
  <td>
    <select name="text_operator"> 
      <dtml-in "operators.keys()">
        <dtml-if "_.getitem('sequence-item')==useOperator"> 
           <option value="&dtml-sequence-item;" selected>&dtml-sequence-item;
        <dtml-else>
           <option value="&dtml-sequence-item;">&dtml-sequence-item;
        </dtml-if>
      </dtml-in>
    </select>
  </td>
</tr>
</dtml-comment>

<tr>
  <td colspan="3">
    <input type="submit" value="Save changes">
  </td>
</tr>

</table>

</form>

<dtml-var manage_page_footer>