[Zope-CVS] CVS: Products/ZCTextIndex/dtml - queryLexicon.dtml:1.1 manageLexicon.dtml:1.2 manageZCTextIndex.dtml:1.3

Casey Duncan casey@zope.com
Wed, 5 Jun 2002 16:02:05 -0400

Update of /cvs-repository/Products/ZCTextIndex/dtml
In directory cvs.zope.org:/tmp/cvs-serv31655/dtml

Modified Files:
	manageLexicon.dtml manageZCTextIndex.dtml 
Added Files:
Log Message:
Added management interface to query words in the lexicon and in the process uncovered a BTreeItems bug, whee!

=== Added File Products/ZCTextIndex/dtml/queryLexicon.dtml ===
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<p class="form-help">
  Browse the words in the lexicon or enter the word(s) you are interested in
  below. Globbing characters (*, ?) are supported

<dtml-let words_str="' '.join(REQUEST.get('words',[]))">
  <form action="&dtml-URL;">
    <p class="form-element">
      <span class="form-label">Word(s)</span>
      <input name="words:tokens" size="20"  value="&dtml-words_str;" />
      <input type="submit" value="Query" />

      <span class="form-label">&nbsp;Output Columns:</span>
      <input name="cols:int" size="2" value="&dtml-cols;" />
      <span class="form-label">&nbsp;Rows:</span>
      <input name="rows:int" size="2" value="&dtml-rows;" />
  <hr />
  <form action="&dtml-URL;">
    <table width="100%"  cellpadding="2" cellspacing="0" border="0">

    <tr class="section-bar">
      <td><span class="form-label">
        &dtml-word_count; Words Found<dtml-if word_count>,
        Displaying &dtml-start_word;-&dtml-end_word;

        <dtml-if expr="page_count > 0">
          <td align="right"><span class="form-label">
            <select name="page:int" onchange="this.form.submit()">
              <dtml-in expr="_.range(page_count)" prefix="page">
                <option value="&dtml-page_item;"
                <dtml-if expr="page == page_item">
                  <dtml-var expr="page_item+1">
            of &dtml-page_count;
            <input type="submit" value="Go" />
            <input type="hidden" name="cols:int" value="&dtml-cols;" />
            <input type="hidden" name="rows:int" value="&dtml-rows;" />
            <input type="hidden" name="words:tokens" value="&dtml-words_str;" />

<dtml-if name="page_columns">
  <table width="100%" cellpadding="0" cellspacing="10" border="0">
    <dtml-in name="page_columns" prefix="column">
      <td align="left" valign="top">
        <dtml-var expr="'<br />'.join(column_item)">

<dtml-var manage_page_footer

=== Products/ZCTextIndex/dtml/manageLexicon.dtml 1.1 => 1.2 ===
+<p class="form-help">
   Text indexed through this lexicon is processed by the following pipeline 
+<ol class="form-help">
   <dtml-in name="getPipelineNames">

=== Products/ZCTextIndex/dtml/manageZCTextIndex.dtml 1.2 => 1.3 ===
 <p class="form-help">
-  There is nothing to manage here. Move along.
+  The ZCTextIndex Lexicon in use by this index is: 
+  <em><dtml-var expr="lexicon.getId()"></em>
+<p class="form-help">
+  <em>Note:</em> You cannot change the lexicon assigned to a ZCTextIndex.
+  To use another lexicon, delete this index and create a new one that
+  uses the desired lexicon.
 <dtml-var manage_page_footer>