Author: jablko
Date: Fri Aug 28 16:42:19 2009
New Revision: 3108

Log:
Take advantage of language and script getters in show pages

Modified:
   trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
   trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
   trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
   trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
   trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php

Modified: 
trunk/apps/qubit/modules/informationobject/actions/showAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/actions/showAction.class.php     
Fri Aug 28 16:37:39 2009        (r3107)
+++ trunk/apps/qubit/modules/informationobject/actions/showAction.class.php     
Fri Aug 28 16:42:19 2009        (r3108)
@@ -53,12 +53,6 @@
     $this->actorEvents = $this->informationObject->getActorEvents();
     $this->creators = $this->informationObject->getCreators();
 
-    // Properties
-    $this->languageCodes = $this->informationObject->getProperties($name = 
'information_object_language');
-    $this->scriptCodes = $this->informationObject->getProperties($name = 
'information_object_script');
-    $this->descriptionLanguageCodes = 
$this->informationObject->getProperties($name = 
'language_of_information_object_description');
-    $this->descriptionScriptCodes = 
$this->informationObject->getProperties($name = 
'script_of_information_object_description');
-
     // Notes
     $this->notes = $this->informationObject->getNotes();
 

Modified: trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Fri Aug 28 16:37:39 2009        (r3107)
+++ trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Fri Aug 28 16:42:19 2009        (r3108)
@@ -130,10 +130,10 @@
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($languageCodes)): ?>
-  <?php foreach ($languageCodes as $languageCode): ?>
+<?php if (0 < count($informationObject->language)): ?>
+  <?php foreach ($informationObject->language as $code): ?>
     <tr><th><?php echo __('language') ?></th><td>
-    <?php echo format_language($languageCode->getValue(array('sourceCulture' 
=> true))) ?>
+    <?php echo format_language($code) ?>
     </td></tr>
   <?php endforeach; ?>
 <?php endif; ?>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Fri Aug 28 16:37:39 2009        (r3107)
+++ trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Fri Aug 28 16:42:19 2009        (r3108)
@@ -205,8 +205,8 @@
 
 <?php if (0 < 
strlen($informationObject->getAccessConditions(array('cultureFallback' => 
true)))
   || 0 < 
strlen($informationObject->getReproductionConditions(array('cultureFallback' => 
true)))
-  || 0 < count($languageCodes)
-  || 0 < count($scriptCodes)
+  || 0 < count($informationObject->language)
+  || 0 < count($informationObject->script)
   || 0 < 
strlen($informationObject->getPhysicalCharacteristics(array('cultureFallback' 
=> true)))
   || 0 < strlen($informationObject->getFindingAids(array('cultureFallback' => 
true)))): ?>
 <tr id="conditionsOfAccessAndUseArea"><td colspan="2" class="subHeaderCell">
@@ -231,28 +231,28 @@
 </tr>
 <?php endif; ?>
 
-<?php if (0 < count($languageCodes)): ?>
+<?php if (0 < count($informationObject->language)): ?>
   <tr>
     <th>
       <?php echo __('language of material') ?>
     </th><td>
       <ul>
-        <?php foreach ($languageCodes as $languageCode): ?>
-          <li><?php echo 
format_language($languageCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->language as $code): ?>
+          <li><?php echo format_language($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($scriptCodes)): ?>
+<?php if (0 < count($informationObject->script)): ?>
   <tr>
     <th>
       <?php echo __('script of material') ?>
     </th><td>
       <ul>
-        <?php foreach ($scriptCodes as $scriptCode): ?>
-          <li><?php echo 
format_script($scriptCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->script as $code): ?>
+          <li><?php echo format_script($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
@@ -407,8 +407,8 @@
   || 0 < strlen($informationObject->getDescriptionStatusId())
   || 0 < strlen($informationObject->getDescriptionDetailId())
   || 0 < strlen($informationObject->getRevisionHistory(array('cultureFallback' 
=> true)))
-  || 0 < count($descriptionLanguageCodes)
-  || 0 < count($descriptionScriptCodes)
+  || 0 < count($informationObject->languageOfDescription)
+  || 0 < count($informationObject->scriptOfDescription)
   || 0 < strlen($informationObject->getSources(array('cultureFallback' => 
true)))): ?>
 <tr id="descriptionControlArea"><td colspan="2" class="subHeaderCell">
   <?php echo __('description control area') ?>
@@ -462,28 +462,28 @@
   </td></tr>
 <?php endif; ?>
 
-<?php if (0 < count($descriptionLanguageCodes)): ?>
+<?php if (0 < count($informationObject->languageOfDescription)): ?>
   <tr>
     <th>
       <?php echo __('language of description')?>
     </th><td>
       <ul>
-        <?php foreach ($descriptionLanguageCodes as $languageCode): ?>
-          <li><?php echo 
format_language($languageCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->languageOfDescription as $code): ?>
+          <li><?php echo format_language($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($descriptionScriptCodes)): ?>
+<?php if (0 < count($informationObject->scriptOfDescription)): ?>
   <tr>
     <th>
       <?php echo __('script of description')?>
     </th><td>
       <ul>
-        <?php foreach ($descriptionScriptCodes as $scriptCode): ?>
-          <li><?php echo 
format_script($scriptCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->scriptOfDescription as $code): ?>
+          <li><?php echo format_script($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 16:37:39 2009        (r3107)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Fri Aug 28 16:42:19 2009        (r3108)
@@ -94,10 +94,10 @@
 <?php endforeach; ?>
 <?php endif; ?>
 
-<?php if (0 < count($languageCodes)): ?>
-  <?php foreach ($languageCodes as $languageCode): ?>
+<?php if (0 < count($informationObject->language)): ?>
+  <?php foreach ($informationObject->language as $code): ?>
     <tr><th><?php echo __('language') ?></th><td>
-    <?php echo format_language($languageCode->getValue(array('sourceCulture' 
=> true))) ?>
+    <?php echo format_language($code) ?>
     </td></tr>
   <?php endforeach; ?>
 <?php endif; ?>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Fri Aug 28 16:37:39 2009        (r3107)
+++ trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Fri Aug 28 16:42:19 2009        (r3108)
@@ -317,28 +317,28 @@
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($languageCodes)): ?>
+<?php if (0 < count($informationObject->language)): ?>
   <tr>
     <th>
       <?php echo __('language of material') ?>
     </th><td>
       <ul>
-        <?php foreach ($languageCodes as $languageCode): ?>
-          <li><?php echo 
format_language($languageCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->language as $code): ?>
+          <li><?php echo format_language($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($scriptCodes)): ?>
+<?php if (0 < count($informationObject->script)): ?>
   <tr>
     <th>
       <?php echo __('script of material') ?>
     </th><td>
       <ul>
-        <?php foreach ($scriptCodes as $scriptCode): ?>
-          <li><?php echo 
format_script($scriptCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->script as $code): ?>
+          <li><?php echo format_script($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
@@ -502,29 +502,29 @@
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($descriptionLanguageCodes)): ?>
+<?php if (0 < count($informationObject->languageOfDescription)): ?>
   <tr>
     <th>
       <?php echo __('language of description')?>
     </th><td>
       <ul>
-        <?php foreach ($descriptionLanguageCodes as $languageCode): ?>
-          <li><?php echo 
format_language($languageCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->languageOfDescription as $code): ?>
+          <li><?php echo format_language($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>
   </tr>
 <?php endif; ?>
 
-<?php if (0 < count($descriptionScriptCodes)): ?>
+<?php if (0 < count($informationObject->scriptOfDescription)): ?>
   <tr>
     <th>
       <?php echo __('script of description')?>
     </th>
     <td>
       <ul>
-        <?php foreach ($descriptionScriptCodes as $scriptCode): ?>
-          <li><?php echo 
format_script($scriptCode->getValue(array('sourceCulture' => true))) ?></li>
+        <?php foreach ($informationObject->scriptOfDescription as $code): ?>
+          <li><?php echo format_script($code) ?></li>
         <?php endforeach; ?>
       </ul>
     </td>

--~--~---------~--~----~------------~-------~--~----~
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