[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex/dtml - addTextIndex.dtml:1.4 manageTextIndex.dtml:1.3
Casey Duncan
casey@zope.com
Tue, 11 Jun 2002 16:20:42 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex/dtml
In directory cvs.zope.org:/tmp/cvs-serv28876/lib/python/Products/PluginIndexes/TextIndex/dtml
Modified Files:
addTextIndex.dtml manageTextIndex.dtml
Log Message:
Removed vocabulary management from catalog/ZCatalog. They now have no awareness of vocabularies.
The only API change was the removal of the getVocabulary method from ZCatalog.
Old-style TextIndexes can now acquire a Vocabulary from anywhere.
No Indexes, metadata or vocabulary objects are created automatically by ZCatalog.
=== Zope/lib/python/Products/PluginIndexes/TextIndex/dtml/addTextIndex.dtml 1.3 => 1.4 ===
<p class="form-help">
+ <strong>Note:</strong>
+ TextIndex is deprecated. It has been replaced by ZCTextIndex. Consider
+ using it instead
+</p>
+
+<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
@@ -33,12 +39,20 @@
</div>
</td>
<td>
-
- <select name="extra.vocabulary:record">
- <dtml-in "this().aq_parent.objectItems('Vocabulary')">
- <option value="&dtml-sequence-key;">&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">)
- </dtml-in>
- </select>
+
+ <dtml-let vocabs="superValues('Vocabulary')">
+ <dtml-if vocabs>
+ <select name="extra.vocabulary:record">
+ <dtml-in expr="superValues('Vocabulary')">
+ <option value="&dtml-id;">
+ &dtml-id; <dtml-var title fmt="(%s)" null>
+ </option>
+ </dtml-in>
+ </select>
+ <dtml-else>
+ <em class="std-text">Create a Vocabulary object first.</em>
+ </dtml-if>
+ </dtml-let>
</td>
</tr>
=== Zope/lib/python/Products/PluginIndexes/TextIndex/dtml/manageTextIndex.dtml 1.2 => 1.3 ===
<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-in "superValues('Vocabulary')">
+ <dtml-if "getId()==vocabulary_id">
+ <option value="&dtml-id;" selected>
+ &dtml-id; <dtml-var title fmt="(%s)" null>
+ </option>
<dtml-else>
- <option value="&dtml-sequence-key;">&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">)
+ <option value="&dtml-id;">
+ &dtml-id; <dtml-var title fmt="(%s)" null>
+ </option>
</dtml-if>
</dtml-in>
</select>