Author: peter
Date: Thu Sep 24 16:02:09 2009
New Revision: 3521

Log:
improve consistency and organization of Event data in DC, MODS and RAD 
templates.

Modified:
   trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
   trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
   trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php

Modified: trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Thu Sep 24 15:51:36 2009        (r3520)
+++ trunk/apps/qubit/modules/informationobject/templates/showDcSuccess.php      
Thu Sep 24 16:02:09 2009        (r3521)
@@ -48,7 +48,7 @@
   <tr>
   <th><?php echo __('creator') ?></th>
   <td><?php echo link_to(render_title($creator), array('module' => 'actor', 
'action' => 'show', 'id' => $creator->id)) ?>
-    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
+    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?><span 
class="note2"> (<?php echo $existence ?>)</span><?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
@@ -57,7 +57,7 @@
   <tr>
   <th><?php echo __('publisher') ?></th>
   <td><?php echo link_to(render_title($publisher), array('module' => 'actor', 
'action' => 'show', 'id' => $publisher->id)) ?>
-    <?php if ($existence = 
$publisher->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>) <?php endif; ?>
+    <?php if ($existence = 
$publisher->getDatesOfExistence(array('cultureFallback' => true))): ?><span 
class="note2"> (<?php echo $existence ?>)</span><?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
@@ -66,21 +66,34 @@
   <tr>
   <th><?php echo __('contributor') ?></th>
   <td><?php echo link_to(render_title($contributor), array('module' => 
'actor', 'action' => 'show', 'id' => $contributor->id)) ?>
-    <?php if ($existence = 
$contributor->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
+    <?php if ($existence = 
$contributor->getDatesOfExistence(array('cultureFallback' => true))): ?><span 
class="note2"> (<?php echo $existence ?>)</span><?php endif; ?>
   </td>
   </tr>
 <?php endforeach; ?>
 
 <?php if (0 < count($informationObject->getDates())): ?>
-<?php foreach ($informationObject->getDates() as $date): ?>
-<tr>
-  <th><?php echo __('date') ?></th>
-  <td>
-    <?php echo date_display($date) ?>
-    (<?php echo $date->getType() ?>)
-  </td>
-</tr>
-<?php endforeach; ?>
+  <?php foreach ($informationObject->getDates() as $date): ?>
+    <tr>
+      <th>
+        <?php echo __('date') ?>
+      </th>
+      <td>
+        <?php echo date_display($date) ?> 
+        <div style="margin-left: 10px;">
+        <span class="note2"><?php echo __('Type').': '.$date->getType() 
?></span><br />
+        <?php if (($date->getActorId()) & ($role = 
$date->getType()->getRole())): ?>
+        <span class="note2"><?php echo $role.': '.$date->getActor() ?></span>
+        <?php endif; ?>
+        <?php if ($place=$date->getPlace()): ?>
+          <span class="note2"><?php echo __('Place') ?>: <?php echo $place 
?></span><br />
+        <?php endif; ?>
+        <?php if ($note=$date->getDescription()): ?>
+          <span class="note2"><?php echo __('Note').': '.$note ?></span>
+        <?php endif; ?>
+        </div>
+      </td>
+    </tr>
+  <?php endforeach; ?>
 <?php endif; ?>
 
 <?php if (0 < count(QubitDc::getTypes($informationObject))): ?>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Thu Sep 24 15:51:36 2009        (r3520)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Thu Sep 24 16:02:09 2009        (r3521)
@@ -48,7 +48,7 @@
   <?php foreach ($nameAccessPoints as $name): ?>
     <tr><th><?php echo __('name') ?></th>
       <td>
-        <?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?> (<?php echo 
$name->getType()->getRole() ?>)
+        <?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?> <?php if($role = 
$name->getType()->getRole()): ?><span class="note2">(<?php echo $role 
?>)</span><?php endif; ?>
       </td>
     </tr>
   <?php endforeach; ?>
@@ -58,23 +58,24 @@
   <?php foreach ($informationObject->getDates() as $date): ?>
     <tr>
       <th>
-      <?php if ($date->getTypeId() == QubitTerm::CREATION_ID): ?>
-        <?php echo __('date (Created)') ?>
-      <?php elseif ($date->getTypeId() == QubitTerm::PUBLICATION_ID): ?>
-        <?php echo __('date (Issued)') ?>
-      <?php else: ?>
-        <?php echo __('date (Other)') ?>
-      <?php endif; ?>
+        <?php echo __('date') ?>
       </th>
       <td>
-        <?php echo date_display($date) ?> (<?php echo $date->getType() ?>)
+        <?php echo date_display($date) ?> 
+        <div style="margin-left: 10px;">
+        <span class="note2"><?php echo __('Type').': '.$date->getType() 
?></span><br />
+        <?php if (($date->getActorId()) & ($role = 
$date->getType()->getRole())): ?>
+        <span class="note2"><?php echo $role.': '.$date->getActor() ?></span>
+        <?php endif; ?>
+        <?php if ($place=$date->getPlace()): ?>
+          <span class="note2"><?php echo __('Place') ?>: <?php echo $place 
?></span><br />
+        <?php endif; ?>
+        <?php if ($note=$date->getDescription()): ?>
+          <span class="note2"><?php echo __('Note').': '.$note ?></span>
+        <?php endif; ?>
+        </div>
       </td>
     </tr>
-
-    <?php if ($place = $date->getPlace()): ?>
-      <tr><th><?php echo __('place') ?></th>
-      <td><?php echo $place ?></td></tr>
-    <?php endif; ?>
   <?php endforeach; ?>
 <?php endif; ?>
 

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Thu Sep 24 15:51:36 2009        (r3520)
+++ trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Thu Sep 24 16:02:09 2009        (r3521)
@@ -108,34 +108,35 @@
 
 <!-- Dates of creation area -->
 <?php if (0 < count($informationObject->getDates())): ?>
-  <tr>
-    <th><?php echo __('dates') ?></th>
-    <td>
-    <?php foreach ($informationObject->getDates() as $date): ?>
-      <?php echo date_display($date) ?> (<?php echo $date->getType() ?>)
-      <?php if ($actor = $date->getActor()): ?>
-        <?php echo link_to(render_title($actor), array('module' => 'actor', 
'action' => 'show', 'id' => $actor->id)) ?>
-      <?php endif; ?><br />
-        <?php if (($date->getPlace()) || ($date->getDescription())): ?>
-        <div style="margin-left: 30px; color: #999999;">
+  <?php foreach ($informationObject->getDates() as $date): ?>
+    <tr>
+      <th>
+        <?php echo __('date') ?>
+      </th>
+      <td>
+        <?php echo date_display($date) ?> 
+        <div style="margin-left: 10px;">
+        <span class="note2"><?php echo __('Type').': '.$date->getType() 
?></span><br />
+        <?php if (($date->getActorId()) & ($role = 
$date->getType()->getRole())): ?>
+        <span class="note2"><?php echo $role.': '.$date->getActor() ?></span>
+        <?php endif; ?>
         <?php if ($place=$date->getPlace()): ?>
-          <?php echo __('Place') ?>: <?php echo $place ?><br />
+          <span class="note2"><?php echo __('Place') ?>: <?php echo $place 
?></span><br />
         <?php endif; ?>
         <?php if ($note=$date->getDescription()): ?>
-          <?php echo __('Note') ?>: <?php echo $note ?><br />
+          <span class="note2"><?php echo __('Note').': '.$note ?></span>
         <?php endif; ?>
         </div>
-      <?php endif; ?>
-    <?php endforeach; ?>
-    </td>
-  </tr>
+      </td>
+    </tr>
+  <?php endforeach; ?>
 <?php endif; ?>
 
 <?php  foreach ($informationObject->getCreators() as $creator): ?>
   <tr>
   <th><?php echo __('name of creator') ?></th>
   <td><?php echo link_to(render_title($creator), array('module' => 'actor', 
'action' => 'show', 'id' => $creator->id)) ?>
-    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?> (<?php 
echo $existence ?>)<?php endif; ?>
+    <?php if ($existence = 
$creator->getDatesOfExistence(array('cultureFallback' => true))): ?><span 
class="note2"> (<?php echo $existence ?>)</span><?php endif; ?>
   <?php if ($history = $creator->getHistory(array('cultureFallback' => 
true))): ?>
     <table class="detail" style="margin-top: 5px;">
       <tr><th style="text-align: left; padding: 1px;">
@@ -356,7 +357,7 @@
     </th><td>
       <ul>
         <?php foreach ($nameAccessPoints as $name): ?>
-          <?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?> (<?php echo 
$name->getType()->getRole() ?>)</li>
+          <li><?php echo link_to(render_title($name->actor), array('module' => 
'actor', 'action' => 'show', 'id' => $name->actor->id)) ?><?php if($role = 
$name->getType()->getRole()): ?><span class="note2"> (<?php echo $role 
?>)</span><?php endif; ?></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