Author: peter
Date: 2008-11-05 14:11:56 -0800 (Wed, 05 Nov 2008)
New Revision: 1522

Modified:
   trunk/qubit/apps/qubit/lib/QubitRad.class.php
   
trunk/qubit/apps/qubit/modules/informationobject/actions/createRadAction.class.php
   
trunk/qubit/apps/qubit/modules/informationobject/actions/editRadAction.class.php
   
trunk/qubit/apps/qubit/modules/informationobject/actions/updateRadAction.class.php
   trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
   trunk/qubit/lib/model/QubitTerm.php
Log:
next iteration of the editRad template, including radNotes and radTitleNotes

Modified: trunk/qubit/apps/qubit/lib/QubitRad.class.php
===================================================================
--- trunk/qubit/apps/qubit/lib/QubitRad.class.php       2008-11-05 20:28:06 UTC 
(rev 1521)
+++ trunk/qubit/apps/qubit/lib/QubitRad.class.php       2008-11-05 22:11:56 UTC 
(rev 1522)
@@ -101,4 +101,29 @@
      // return 
$informationObject->getAncestors->andSelf->orderBy('rgt')->getRepository()->getPrimaryContact()->getCountryCode().'
 
'.$informationObject->getAncestors->andSelf()->getRepository()->getIdentifier().'
 '.implode('-', $informationObject->getAncestors()->andSelf()->getIdentifier());
     return $countryCode.$repositoryCode.implode('-', $identifiers);
   }
+
+  public static function getTitleNoteTypes()
+    {
+      $titleNoteTypes = 
QubitTaxonomy::getTermsById(QubitTaxonomy::RAD_TITLE_NOTE_ID);
+      $radTitleNoteTypes = array();
+      foreach ($titleNoteTypes as $titleNoteType)
+      {
+        $radTitleNoteTypes[$titleNoteType->getId()] = 
$titleNoteType->getName();
+      }
+
+      return $radTitleNoteTypes;
+    }
+
+  public static function getNoteTypes()
+  {
+    $noteTypes = QubitTaxonomy::getTermsById(QubitTaxonomy::RAD_NOTE_ID);
+    $radNoteTypes = array();
+    foreach ($noteTypes as $noteType)
+    {
+      $radNoteTypes[$noteType->getId()] = $noteType->getName();
+    }
+
+    return $radNoteTypes;
+  }
+
 }
\ No newline at end of file

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/actions/createRadAction.class.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/actions/createRadAction.class.php
  2008-11-05 20:28:06 UTC (rev 1521)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/actions/createRadAction.class.php
  2008-11-05 22:11:56 UTC (rev 1522)
@@ -37,9 +37,9 @@
 
     // add RAD specific commands
     $this->radNotes = null;
-    $this->newRadNote = new QubitNote;
     $this->radTitleNotes = null;
-    $this->newRadTitleNote = new QubitNote;
+    $this->radTitleNoteTypes = QubitRad::getTitleNoteTypes();
+    $this->radNoteTypes = QubitRad::getNoteTypes();
 
     // overwrite the default create template
     $this->setTemplate('editRad');

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/actions/editRadAction.class.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/actions/editRadAction.class.php
    2008-11-05 20:28:06 UTC (rev 1521)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/actions/editRadAction.class.php
    2008-11-05 22:11:56 UTC (rev 1522)
@@ -36,11 +36,12 @@
     parent::execute($request);
 
     // add RAD specific commands
-    $this->radNotes = $this->informationObject->getNotesByTaxonomy($options = 
array('noteTypeId' => QubitTaxonomy::RAD_NOTE_ID));
-    $this->newRadNote = new QubitNote;
-    $this->radTitleNotes = 
$this->informationObject->getNotesByTaxonomy($options = array('noteTypeId' => 
QubitTaxonomy::RAD_TITLE_NOTE_ID));
-    $this->newRadTitleNote = new QubitNote;
+    $this->radNotes = $this->informationObject->getNotesByTaxonomy($options = 
array('taxonomyId' => QubitTaxonomy::RAD_NOTE_ID));
+    $this->radTitleNotes = 
$this->informationObject->getNotesByTaxonomy($options = array('taxonomyId' => 
QubitTaxonomy::RAD_TITLE_NOTE_ID));
 
+    $this->radTitleNoteTypes = QubitRad::getTitleNoteTypes();
+    $this->radNoteTypes = QubitRad::getNoteTypes();
+
    // overwrite the default edit template
    $this->setTemplate('editRad');
   }

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/actions/updateRadAction.class.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/actions/updateRadAction.class.php
  2008-11-05 20:28:06 UTC (rev 1521)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/actions/updateRadAction.class.php
  2008-11-05 22:11:56 UTC (rev 1522)
@@ -35,8 +35,17 @@
     // run the core informationObject update action commands
     parent::execute($request);
 
-    // add RAD specific commands
+    // update RAD notes
+    if ($this->getRequestParameter('rad_title_note'))
+    {
+      $this->informationObject->setNote($options = array('userId' => 
$this->getUser()->getAttribute('user_id'), 'note' => 
$this->getRequestParameter('rad_title_note'), 'noteTypeId' => 
$this->getRequestParameter('rad_title_note_type')));
+    }
 
+    if ($this->getRequestParameter('rad_note'))
+    {
+      $this->informationObject->setNote($options = array('userId' => 
$this->getUser()->getAttribute('user_id'), 'note' => 
$this->getRequestParameter('rad_note'), 'noteTypeId' => 
$this->getRequestParameter('rad_note_type')));
+    }
+
     // update informationObject in the search index
     if (!$this->foreignKeyUpdate)
     {

Modified: 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php
===================================================================
--- 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php   
    2008-11-05 20:28:06 UTC (rev 1521)
+++ 
trunk/qubit/apps/qubit/modules/informationobject/templates/editRadSuccess.php   
    2008-11-05 22:11:56 UTC (rev 1522)
@@ -51,25 +51,36 @@
     
     <div class="form-item">
       <label for="other title information"><?php echo __('other title 
information'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 'other_title_information'</strong>
     </div>        
 
     <div class="form-item">
       <label for="statements of responsibility"><?php echo __('statements of 
responsibility'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 
'title_statement_of_responsibility'</strong>
     </div>  
     
     <div class="form-item">
-      <label for="new_title_note"><?php echo __('title note'); ?></label>
-
-      <?php if ($titleNotes): ?>
-        <?php foreach ($titleNotes as $titleNote): ?>
-          <?php echo $titleNote->getContent(array('cultureFallback' => 
'true')) ?>
-          <?php echo link_to(image_tag('delete', 'align=top'), 
'informationobject/deleteNote?noteId='.$titleNote->getId().'&returnTemplate=editRad')
 ?><br />
-        <?php endforeach; ?>
-      <?php endif; ?>
-
-      <?php echo input_tag('new_title_note') ?>
+      <label for="notes"><?php echo __('title notes'); ?></label>
+      <table class="inline">
+        <tr>
+          <td class="headerCell" style="width: 65%;"><?php echo __('note'); 
?></td>
+          <td class="headerCell" style="width: 30%"><?php echo __('title note 
type'); ?></td>
+          <td class="headerCell" style="width: 5%;"></td>
+        </tr>
+        <?php if ($radTitleNotes): ?>
+          <?php foreach ($radTitleNotes as $note): ?>
+            <tr>
+            <td><?php echo $note->getContent(array('cultureFallback' => 
'true')) ?><br/><span class="note"><?php echo $note->getUser() ?>, <?php echo 
$note->getUpdatedAt() ?></span></td>
+            <td><?php echo $note->getType() ?></td>
+            <td style="text-align: center;"><?php echo 
link_to(image_tag('delete', 'align=top'), 
'informationobject/deleteNote?noteId='.$note->getId().'&returnTemplate=editRad')
 ?></td>
+            </tr>
+          <?php endforeach; ?>
+        <?php endif; ?>
+        <tr valign="top">
+          <td><?php echo input_tag('rad_title_note')?></td>
+          <td><?php echo select_tag('rad_title_note_type', 
options_for_select($radTitleNoteTypes))?></td>
+        </tr>
+      </table>
     </div>
 
     <table style="border: 0; width: 98%; margin: 0; padding: 0;"><tr><td 
style="width: 150px;">
@@ -121,7 +132,7 @@
     
     <div class="form-item">
       <label for="statements of responsibility"><?php echo __('statements of 
responsibility'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 
'edition_statement_of_responsibility'</strong>
     </div> 
   
    </fieldset>
@@ -131,50 +142,35 @@
 
     <div class="form-item">
       <label for="statement of scale (cartographic)"><?php echo __('statement 
of scale (cartographic)'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 
'statement_of_scale_cartographic'</strong>
     </div> 
     
     <div class="form-item">
       <label for="statement of projection"><?php echo __('statement of 
projection'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 'statement_of_projection'</strong>
     </div> 
     
     <div class="form-item">
       <label for="statement of coordinates"><?php echo __('statement of 
coordinates'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 'statement_of_coordinates'</strong>
     </div>
     
     <div class="form-item">
       <label for="statement of scale (architectural)"><?php echo __('statement 
of scale (architectural)'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 
'statement_of_scale_architectural'</strong>
     </div>  
     
     <div class="form-item">
       <label for="issuing jurisdiction and denomination"><?php echo 
__('issuing jursdiction and denomination'); ?></label>
-      <strong>TODO: add QubitProperty</strong>
+      <strong>TODO: add QubitProperty 
'issuing_jursidiction_and_denomination'</strong>
     </div>     
   
    </fieldset>
    
-   
-   <fieldset class="collapsible collapsed">
-    <legend><?php echo __('1.5 Physical description area'); ?></legend>
 
-    <div class="form-item">
-      <label for="extent_and_medium"><?php echo __('extent and medium'); 
?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getExtentAndMedium(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
-      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
-      <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getExtentAndMedium', 
array('size' => '30x3')) ?>
-    </div>
-  
-   </fieldset>
 
-   
-
-
   <fieldset class="collapsible collapsed">
-    <legend><?php echo __('context area'); ?></legend>
+    <legend><?php echo __('1.4 Dates of creation area'); ?></legend>
     
     
     <div class="form-item">
@@ -225,84 +221,111 @@
         </div>
         <?php endforeach; ?>
      <?php endif; ?>
+   </fieldset>
+   
+   <fieldset class="collapsible collapsed">
+    <legend><?php echo __('1.5 Physical description area'); ?></legend>
 
-
-
     <div class="form-item">
-      <label for="acquisition"><?php echo __('immediate source of 
acquisition'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getAcquisition(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="extent_and_medium"><?php echo __('extent of descriptive 
unit, other physical details, dimensions, and accompanying material'); 
?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getExtentAndMedium(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getAcquisition', 
array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 'getExtentAndMedium', 
array('size' => '30x3')) ?>
     </div>
+  
+   </fieldset>
 
+  <fieldset class="collapsible collapsed">
+    <legend><?php echo __("1.6 Publisher's series area"); ?></legend>
+
     <div class="form-item">
-      <label for="archival_history"><?php echo __('archival history'); 
?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getArchivalHistory(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
-      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
-      <?php endif; ?>
-       <?php echo object_textarea_tag($informationObject, 
'getArchivalHistory', array('size' => '30x3')) ?>
+      <label for="Title proper of publisher's series"><?php echo __("Title 
proper of publisher's series"); ?></label>
+      <strong>TODO: add QubitProperty 
'title_proper_of_publishers_series'</strong>
+    </div> 
+    
+    <div class="form-item">
+      <label for="Parallel titles of publisher's series"><?php echo 
__("Parallel titles of publisher's series"); ?></label>
+      <strong>TODO: add QubitProperty 
'parallel_titles_of_publishers_series'</strong>
+    </div> 
+    
+    <div class="form-item">
+      <label for="Other title information of publisher's series"><?php echo 
__("Other title information of publisher's series"); ?></label>
+      <strong>TODO: add QubitProperty 
'other_title_information_of_publishers_series'</strong>
     </div>
+    
+    <div class="form-item">
+      <label for="Statement of responsibility relating to publisher's 
series"><?php echo __("Statement of responsibility relating to publisher's 
series"); ?></label>
+      <strong>TODO: add QubitProperty 
'statement_of_responsibility_relating_to_publishers_series'</strong>
+    </div>    
 
-  </fieldset>
+    <div class="form-item">
+      <label for="Numbering within publisher's series"><?php echo 
__("Numbering within publisher's series"); ?></label>
+      <strong>TODO: add QubitProperty 
'numbering_within_publishers_series'</strong>
+    </div> 
+    
+     <div class="form-item">
+      <label for="Note on publisher's series"><?php echo __("Note on 
publisher's series"); ?></label>
+      <strong>TODO: add QubitProperty 'note_on_publishers_series'</strong>
+    </div> 
+    </fieldset>   
 
+  
   <fieldset class="collapsible collapsed">
-    <legend><?php echo __('content and structure area'); ?></legend>
+    <legend><?php echo __('1.7 Archival description area'); ?></legend>
 
+   <div class="form-item">
+      <label for="Administrative history / biographical sketch"><?php echo 
__('Administrative history / biographical sketch'); ?></label>
     <div class="form-item">
-      <label for="scope_and_content"><?php echo __('scope and content'); 
?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getScopeAndContent(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
-      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
-      <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getScopeAndContent', 
array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="appraisal"><?php echo __('appraisal, destruction and 
scheduling'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getAppraisal(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="Archival history"><?php echo __('custodial history'); 
?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getArchivalHistory(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getAppraisal', 
array('size' => '30x3')) ?>
+       <?php echo object_textarea_tag($informationObject, 
'getArchivalHistory', array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="accruals"><?php echo __('accruals'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getAccruals(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="scope_and_content"><?php echo __('scope and content'); 
?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getScopeAndContent(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getAccruals', 
array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 'getScopeAndContent', 
array('size' => '30x3')) ?>
     </div>
+  </fieldset>  
+  
+  
+  <fieldset class="collapsible collapsed">
+    <legend><?php echo __('1.8 Notes area'); ?></legend>  
 
     <div class="form-item">
-      <label for="arrangement"><?php echo __('system of arrangement'); 
?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getArrangement(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="physical_characteristics"><?php echo __('physical 
condition'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getPhysicalCharacteristics(array('sourceCulture' => 
'true'))) > 0 && $sf_user->getCulture() != 
$informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getArrangement', 
array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 
'getPhysicalCharacteristics', array('size' => '30x3')) ?>
     </div>
-  </fieldset>
 
-  <fieldset class="collapsible collapsed">
-    <legend><?php echo __('conditions of access and use area'); ?></legend>
-
     <div class="form-item">
-      <label for="access_conditions"><?php echo __('conditions governing 
access'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getAccessConditions(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="acquisition"><?php echo __('immediate source of 
acquisition'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getAcquisition(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 
'getAccessConditions', array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 'getAcquisition', 
array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="reproduction_conditions"><?php echo __('conditions governing 
reproduction'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getReproductionConditions(array('sourceCulture' => 
'true'))) > 0 && $sf_user->getCulture() != 
$informationObject->getSourceCulture()): ?>
+      <label for="arrangement"><?php echo __('arrangement'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getArrangement(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 
'getReproductionConditions', array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 'getArrangement', 
array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="language_of_material"><?php echo __('language of material'); 
?></label>
+      <label for="language_of_material"><?php echo __('language'); ?></label>
       <?php if ($languageCodes): ?>
         <?php foreach ($languageCodes as $languageCode): ?>
           <div style="margin-top: 5px; margin-bottom: 5px;">
@@ -314,7 +337,7 @@
      </div>
 
     <div class="form-item">
-      <label for="script_of_material"><?php echo __('script of material'); 
?></label>
+      <label for="script_of_material"><?php echo __('script'); ?></label>
       <?php if ($scriptCodes): ?>
         <?php foreach ($scriptCodes as $scriptCode): ?>
           <div style="margin-top: 5px; margin-bottom: 5px;">
@@ -326,42 +349,40 @@
     </div>
 
     <div class="form-item">
-      <label for="physical_characteristics"><?php echo __('physical 
characteristics'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getPhysicalCharacteristics(array('sourceCulture' => 
'true'))) > 0 && $sf_user->getCulture() != 
$informationObject->getSourceCulture()): ?>
+      <label for="location_of_originals"><?php echo __('location of 
originals'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getLocationOfOriginals(array('sourceCulture' => 'true'))) > 
0 && $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 
'getPhysicalCharacteristics', array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 
'getLocationOfOriginals', array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="finding_aids"><?php echo __('finding aids'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getFindingAids(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="location_of_copies"><?php echo __('availability of other 
formats'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getLocationOfCopies(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 'getFindingAids', 
array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 
'getLocationOfCopies', array('size' => '30x3')) ?>
     </div>
- </fieldset>
 
- <fieldset class="collapsible collapsed">
-    <legend><?php echo __('allied materials area'); ?></legend>
+
     <div class="form-item">
-      <label for="location_of_originals"><?php echo __('location of 
originals'); ?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getLocationOfOriginals(array('sourceCulture' => 'true'))) > 
0 && $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="access_conditions"><?php echo __('restrictions on access'); 
?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getAccessConditions(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 
'getLocationOfOriginals', array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 
'getAccessConditions', array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="location_of_copies"><?php echo __('location of copies'); 
?></label>
-      <?php if (strlen($sourceCultureValue = 
$informationObject->getLocationOfCopies(array('sourceCulture' => 'true'))) > 0 
&& $sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <label for="reproduction_conditions"><?php echo __('terms governing use, 
reproduction, and publication'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getReproductionConditions(array('sourceCulture' => 
'true'))) > 0 && $sf_user->getCulture() != 
$informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-      <?php echo object_textarea_tag($informationObject, 
'getLocationOfCopies', array('size' => '30x3')) ?>
+      <?php echo object_textarea_tag($informationObject, 
'getReproductionConditions', array('size' => '30x3')) ?>
     </div>
 
     <div class="form-item">
-      <label for="related_units_of_description"><?php echo __('related units 
of description'); ?></label>
+      <label for="related_units_of_description"><?php echo __('associated 
material, related groups of records in different fonds, related groups of 
records in the same fonds'); ?></label>
       <?php if (strlen($sourceCultureValue = 
$informationObject->getRelatedUnitsOfDescription(array('sourceCulture' => 
'true'))) > 0 && $sf_user->getCulture() != 
$informationObject->getSourceCulture()): ?>
       <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
@@ -369,31 +390,23 @@
     </div>
 
     <div class="form-item">
-      <label for="new_title_note"><?php echo __('publication note'); ?></label>
-
-      <?php if ($publicationNotes): ?>
-        <?php foreach ($publicationNotes as $publicationNote): ?>
-          <?php echo $publicationNote->getContent(array('cultureFallback' => 
'true')) ?>
-          <?php echo link_to(image_tag('delete', 'align=top'), 
'informationobject/deleteNote?noteId='.$publicationNote->getId().'&returnTemplate=editRad')
 ?><br />
-        <?php endforeach; ?>
+      <label for="accruals"><?php echo __('accruals'); ?></label>
+      <?php if (strlen($sourceCultureValue = 
$informationObject->getAccruals(array('sourceCulture' => 'true'))) > 0 && 
$sf_user->getCulture() != $informationObject->getSourceCulture()): ?>
+      <div class="default-translation"><?php echo nl2br($sourceCultureValue) 
?></div>
       <?php endif; ?>
-
-      <?php echo textarea_tag('new_publication_note', '', 'size=30x3') ?>
+      <?php echo object_textarea_tag($informationObject, 'getAccruals', 
array('size' => '30x3')) ?>
     </div>
-  </fieldset>
-
-  <fieldset class="collapsible collapsed">
-    <legend><?php echo __('notes area'); ?></legend>
+    
     <div class="form-item">
-      <label for="notes"><?php echo __('notes'); ?></label>
+      <label for="notes"><?php echo __('other notes'); ?></label>
       <table class="inline">
         <tr>
           <td class="headerCell" style="width: 65%;"><?php echo __('note'); 
?></td>
           <td class="headerCell" style="width: 30%"><?php echo __('note 
type'); ?></td>
           <td class="headerCell" style="width: 5%;"></td>
         </tr>
-        <?php if ($notes): ?>
-          <?php foreach ($notes as $note): ?>
+        <?php if ($radNotes): ?>
+          <?php foreach ($radNotes as $note): ?>
             <tr>
             <td><?php echo $note->getContent(array('cultureFallback' => 
'true')) ?><br/><span class="note"><?php echo $note->getUser() ?>, <?php echo 
$note->getUpdatedAt() ?></span></td>
             <td><?php echo $note->getType() ?></td>
@@ -402,12 +415,23 @@
           <?php endforeach; ?>
         <?php endif; ?>
         <tr valign="top">
-          <td><?php echo object_textarea_tag($newNote, 'getContent', 
array('size' => '10x1', 'class'=>'multiInstance')) ?></td>
-          <td><?php echo object_select_tag($newNote, 'getTypeId', array('name' 
=> 'note_type_id', 'id' => 'note_type_id', 'related_class' => 'QubitTerm', 
'include_blank' => true, 'peer_method' => 'getNoteTypes', 'style' => 'width: 
120px;')) ?></td>
+          <td><?php echo input_tag('rad_note')?></td>
+          <td><?php echo select_tag('rad_note_type', 
options_for_select($radNoteTypes))?></td>
         </tr>
       </table>
-    </div>
+    </div>    
+  
   </fieldset>
+  
+  <fieldset class="collapsible collapsed">
+  <legend><?php echo __('1.9 Standard number area'); ?></legend>
+      
+   <div class="form-item">
+      <label for="statement of coordinates"><?php echo __('standard number'); 
?></label>
+      <strong>TODO: add QubitProperty 'standard_number'</strong>
+   </div>
+  
+  </fieldset>
 
   <fieldset class="collapsible collapsed">
     <legend><?php echo __('access points'); ?></legend>

Modified: trunk/qubit/lib/model/QubitTerm.php
===================================================================
--- trunk/qubit/lib/model/QubitTerm.php 2008-11-05 20:28:06 UTC (rev 1521)
+++ trunk/qubit/lib/model/QubitTerm.php 2008-11-05 22:11:56 UTC (rev 1522)
@@ -110,19 +110,19 @@
            $this->getId() == QubitTerm::ARTEFACT_ID ||
            $this->getId() == QubitTerm::HAS_PHYSICAL_OBJECT_ID;
   }
-  
-  
+
+
   public function __toString()
   {
     if (!$this->getName())
       {
       return (string) $this->getName(array('sourceCulture' => true));
       }
-  
+
     return (string) $this->getName();
   }
-  
-  
+
+
   public function setNote($userId, $note, $noteTypeId)
   {
     $newNote = new QubitNote;
@@ -150,9 +150,9 @@
 
     return QubitNote::get($criteria);
   }
-  
-  
 
+
+
   public static function getLevelsOfDescription($options = array())
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::LEVEL_OF_DESCRIPTION_ID, 
$options);
@@ -217,22 +217,22 @@
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::DIGITAL_OBJECT_USAGE_ID, 
$options);
   }
-  
+
   public static function getMaterialTypes($options = array())
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::MATERIAL_TYPE_ID, 
$options);
   }
-  
+
   public static function getRADNotes($options = array())
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::RAD_NOTE_ID, $options);
   }
-  
+
   public static function getRADTitleNotes($options = array())
   {
-    return QubitTaxonomy::getTermsById(QubitTaxonomy::RAD_TITLE_NOTES_ID, 
$options);
-  }  
-  
+    return QubitTaxonomy::getTermsById(QubitTaxonomy::RAD_TITLE_NOTE_ID, 
$options);
+  }
+
   /**
    * Return a list of all Physical Object terms
    *
@@ -243,8 +243,8 @@
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::PHYSICAL_OBJECT_TYPE_ID, 
$options);
   }
-  
-  
+
+
   /**
    * Return a list of all Relation Type terms
    *
@@ -255,8 +255,8 @@
   {
     return QubitTaxonomy::getTermsById(QubitTaxonomy::RELATION_TYPE_ID, 
$options);
   }
-  
-  
+
+
   /**
    * Return a list of all Physical object container types
    *
@@ -267,8 +267,8 @@
     $containerTerm = QubitTerm::getById(QubitTerm::CONTAINER_ID);
     return $containerTerm->getDescendants();
   }
-  
-  
+
+
   /**
    * Get a list of child terms of $parentTermId. Prefix $indentStr * depth of 
child
    * relative to parent
@@ -278,60 +278,60 @@
    * 
    * @return mixed  false on failure, else array of children formatted for 
select box
    */
-  public static function getIndentedChildTree($parentTermId, 
$indentStr="&nbsp;")
+  public static function getIndentedChildTree($parentTermId, 
$indentStr='&nbsp;')
   {
-    if (!$parentTerm = QubitTerm::getById($parentTermId)) 
+    if (!$parentTerm = QubitTerm::getById($parentTermId))
     {
 
       return false;
     }
-    
+
     $parentDepth = count($parentTerm->getAncestors());
-    
+
     foreach ($parentTerm->getDescendants()->orderBy('lft') as $i => $node)
     {
       $relativeDepth = intval(count($node->getAncestors()) - $parentDepth - 1);
       $tree[$node->getId()] = str_repeat($indentStr, 
$relativeDepth).$node->getName(array('cultureFallback' => 'true'));
     }
-    
+
     return $tree;
   }
-  
-   
+
+
   protected $CountryHitCount = null;
   protected $LanguageHitCount = null;
   protected $SubjectHitCount = null;
-  
+
   public function setCountryHitCount($count)
   {
     $this->CountryHitCount = $count;
   }
-  
+
   public function getCountryHitCount()
   {
     return $this->CountryHitCount;
   }
-  
+
   public function setLanguageHitCount($count)
   {
     $this->LanguageHitCount = $count;
   }
-  
+
   public function getLanguageHitCount()
   {
     return $this->LanguageHitCount;
   }
-  
+
   public function setSubjectHitCount($count)
   {
     $this->SubjectHitCount = $count;
   }
-  
+
   public function getSubjectHitCount()
   {
     return $this->SubjectHitCount;
   }
-  
+
   /**
    * Get a sorted, localized list of terms for the"term/browse" action
    * with an option for culture fallback values in list.
@@ -345,17 +345,17 @@
   {
     $sort = (isset($options['sort'])) ? $options['sort'] : 'termNameUp';
     $cultureFallback = (isset($options['cultureFallback'])) ? 
$options['cultureFallback'] : false;
-    
+
     if (isset($options['taxonomyId']))
     {
       $criteria->add(QubitTerm::TAXONOMY_ID, $options['taxonomyId']);
     }
-    
+
     // Add join to get count of related objects
     $criteria->addJoin(QubitTerm::ID, QubitObjectTermRelation::TERM_ID, 
Criteria::LEFT_JOIN);
     $criteria->addAsColumn('hits', 
'COUNT('.QubitObjectTermRelation::OBJECT_ID.')');
     $criteria->addGroupByColumn(QubitObjectTermRelation::TERM_ID);
-    
+
     switch($sort)
     {
       case 'hitsUp' :
@@ -371,7 +371,7 @@
       default :
         $criteria->addAscendingOrderByColumn('name');
     }
-    
+
     // Do source culture fallback
     if ($cultureFallback === true)
     {
@@ -385,10 +385,10 @@
       $criteria->addJoin(QubitTerm::ID, QubitTermI18n::ID);
       $criteria->add(QubitTermI18n::CULTURE, $culture);
     }
-    
+
     return QubitTerm::get($criteria);
   }
-  
+
   /**
    * Get a count of objects related to this term
    *
@@ -398,14 +398,14 @@
   {
     $sql = 'SELECT COUNT(*) FROM '.QubitObjectTermRelation::TABLE_NAME.'
       WHERE '.QubitObjectTermRelation::TERM_ID.' = '.$this->getId().';';
-    
+
     $conn = Propel::getConnection();
     $stmt = $conn->prepareStatement($sql);
     $rs = $stmt->executeQuery(ResultSet::FETCHMODE_NUM);
     $rs->next();
-    
+
     return $rs->getInt(1);
-  }  
+  }
 }
 
 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to