[CMF-checkins] CVS: CMF - full_metadata_edit_form.dtml:1.2 metadata_edit_form.dtml:1.2

tseaver@digicool.com tseaver@digicool.com
Tue, 29 May 2001 14:59:54 -0400 (EDT)


Update of /cvs-repository/CMF/CMFDefault/skins/content
In directory korak.digicool.com:/tmp/cvs-serv6294/CMFDefault/skins/content

Modified Files:
	full_metadata_edit_form.dtml metadata_edit_form.dtml 
Log Message:


 - Expose controlled vocabulary (from 'portal_metadata') for Subject.



--- Updated File full_metadata_edit_form.dtml in package CMF --
--- full_metadata_edit_form.dtml	2001/02/23 14:24:09	1.1
+++ full_metadata_edit_form.dtml	2001/05/29 18:59:54	1.2
@@ -42,16 +42,41 @@
              cols="65">&dtml-Description;</textarea>
   </td>
  </tr>
+
  <tr valign="top">
-  <th align="right"> Subject
-  </th>
+  <th align="right"> Subject </th>
   <td>
-   <textarea name="subject:lines" rows="5"
-             cols="30"><dtml-in Subject><dtml-var sequence-item>
-</dtml-in></textarea>
+   <dtml-let contentSubject=Subject
+             allowedSubjects="portal_metadata.listAllowedSubjects( this() )"
+   >
+   <dtml-comment>
+       Comment out / delete this to enforce that Subject is drawn from
+       a controlled vocabulary.
+   </dtml-comment>
+     <textarea name="subject:lines" rows="3"
+               cols="20"><dtml-in Subject
+                ><dtml-let item=sequence-item
+                ><dtml-unless expr="item in allowedSubjects"
+                ><dtml-var sequence-item>
+                </dtml-unless></dtml-let></dtml-in></textarea>
+   <dtml-comment>
+       Comment out / delete this to ignore controlled vocabulary 
+       for Subject.
+   </dtml-comment>
+   <br>
+    <select name="subject:list" multiple>
+     <dtml-in allowedSubjects>
+     <dtml-let item=sequence-item
+               sel="item in contentSubject and 'selected' or ''"
+     >
+      <option value="&dtml-sequence-item;"
+              &dtml-sel;> &dtml-sequence-item; </option>
+     </dtml-let>
+     </dtml-in>
+    </select>
+   </dtml-let>
   </td>
-  <th align="right"> Contributors
-  </th>
+  <th align="right"> Contributors </th>
   <td>
    <textarea name="contributors:lines" rows="5"
              cols="30"><dtml-in Contributors><dtml-var sequence-item>

--- Updated File metadata_edit_form.dtml in package CMF --
--- metadata_edit_form.dtml	2001/02/23 14:24:09	1.1
+++ metadata_edit_form.dtml	2001/05/29 18:59:54	1.2
@@ -13,50 +13,86 @@
 
 <form action="metadata_edit" method="post">
 <table class="FormLayout">
+
  <tr valign="top">
-  <th align="right"> Identifier
-  </th>
-  <td>
-   <dtml-var Identifier>
-  </td>
+
+  <th align="right"> Identifier </th>
+  <td> <dtml-var Identifier> </td>
+
   <td colspan="2" align="right">
    <a href="full_metadata_edit_form"> Edit all metadata </a>
   </td>
+
  </tr>
+
  <tr valign="top">
-  <th align="right"> Title
-  </th>
+
+  <th align="right"> Title </th>
   <td colspan="3">
    <input type="text"
           name="title"
           value="&dtml-Title;"
           size="65">
   </td>
+
  </tr>
+
  <tr valign="top">
-  <th align="right"> Description
-  </th>
+
+  <th align="right"> Description </th>
   <td colspan="3">
    <textarea name="description:text" rows="5"
              cols="65">&dtml-Description;</textarea>
   </td>
+
  </tr>
+
  <tr valign="top">
-  <th align="right"> Subject
-  </th>
+
+  <th align="right"> Subject </th>
   <td>
-   <textarea name="subject:lines" rows="5"
-             cols="30"><dtml-in Subject><dtml-var sequence-item>
-</dtml-in></textarea>
+   <dtml-let contentSubject=Subject
+             allowedSubjects="portal_metadata.listAllowedSubjects( this() )"
+   >
+   <dtml-comment>
+       Comment out / delete this to enforce that Subject is drawn from
+       a controlled vocabulary.
+   </dtml-comment>
+     <textarea name="subject:lines" rows="3"
+               cols="20"><dtml-in Subject
+                ><dtml-let item=sequence-item
+                ><dtml-unless expr="item in allowedSubjects"
+                ><dtml-var sequence-item>
+                </dtml-unless></dtml-let></dtml-in></textarea>
+   <dtml-comment>
+       Comment out / delete this to ignore controlled vocabulary 
+       for Subject.
+   </dtml-comment>
+   <br>
+    <select name="subject:list" multiple>
+     <dtml-in allowedSubjects>
+     <dtml-let item=sequence-item
+               sel="item in contentSubject and 'selected' or ''"
+     >
+      <option value="&dtml-sequence-item;"
+              &dtml-sel;> &dtml-sequence-item; </option>
+     </dtml-let>
+     </dtml-in>
+    </select>
+   </dtml-let>
   </td>
-  <th align="right"> Format
-  </th>
+
+  <th align="right"> Format </th>
   <td> <input type="text" name="format" value="&dtml-Format;">
+  <br> <input type="submit" name="change" value=" Change ">
   <br> <input type="submit" name="change_and_edit" value=" Change & Edit ">
   <br> <input type="submit" name="change_and_view" value=" Change & View ">
   </td>
+
  </tr>
+
 </table>
+
 </form>
 
 </div>