Author: david
Date: Thu Oct 15 17:00:45 2009
New Revision: 3760

Log:
Show actors linked via event as 'name access points'. Fixes issue #1060.

Modified:
   trunk/apps/qubit/modules/informationobject/actions/showAction.class.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     
Thu Oct 15 15:47:07 2009        (r3759)
+++ trunk/apps/qubit/modules/informationobject/actions/showAction.class.php     
Thu Oct 15 17:00:45 2009        (r3760)
@@ -50,6 +50,13 @@
 
     // Access points
     $this->nameAccessPoints = array();
+    foreach ($this->informationObject->getActorEvents() as $event)
+    {
+      if (isset($event->actorId))
+      {
+        $this->nameAccessPoints[] = $event;
+      }
+    }
     foreach ($this->informationObject->relationsRelatedBysubjectId as 
$relation)
     {
       if (QubitTerm::NAME_ACCESS_POINT_ID == $relation->typeId)

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Thu Oct 15 15:47:07 2009        (r3759)
+++ trunk/apps/qubit/modules/informationobject/templates/showIsadSuccess.php    
Thu Oct 15 17:00:45 2009        (r3760)
@@ -359,7 +359,14 @@
     </th><td>
       <ul>
         <?php foreach ($nameAccessPoints as $relation): ?>
-          <li><?php echo link_to(render_title($relation->object), 
array('module' => 'actor', 'action' => 'show', 'id' => $relation->object->id)) 
?></li>
+          <?php if ('QubitEvent' == get_class($relation)): ?>
+          <li>
+            <?php echo link_to(render_title($relation->actor), array('module' 
=> 'actor', 'action' => 'show', 'id' => $relation->actorId)) ?>
+            <span class="note2">(<?php echo 
$relation->type->getRole()?>)</span>
+          </li>
+          <?php else: ?>
+          <li><?php echo link_to(render_title($relation->object), 
array('module' => 'actor', 'action' => 'show', 'id' => $relation->objectId)) 
?></li>
+          <?php endif; ?>
         <?php endforeach; ?>
       </ul>
     </td>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Thu Oct 15 15:47:07 2009        (r3759)
+++ trunk/apps/qubit/modules/informationobject/templates/showModsSuccess.php    
Thu Oct 15 17:00:45 2009        (r3760)
@@ -43,7 +43,14 @@
     </th><td>
       <ul>
         <?php foreach ($nameAccessPoints as $relation): ?>
+          <?php if ('QubitEvent' == get_class($relation)): ?>
+          <li>
+            <?php echo link_to(render_title($relation->actor), array('module' 
=> 'actor', 'action' => 'show', 'id' => $relation->actorId)) ?>
+            <span class="note2">(<?php echo 
$relation->type->getRole()?>)</span>
+          </li>
+          <?php else: ?>
           <li><?php echo link_to(render_title($relation->object), 
array('module' => 'actor', 'action' => 'show', 'id' => $relation->object->id)) 
?></li>
+          <?php endif; ?>
         <?php endforeach; ?>
       </ul>
     </td>

Modified: 
trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Thu Oct 15 15:47:07 2009        (r3759)
+++ trunk/apps/qubit/modules/informationobject/templates/showRadSuccess.php     
Thu Oct 15 17:00:45 2009        (r3760)
@@ -349,7 +349,14 @@
     </th><td>
       <ul>
         <?php foreach ($nameAccessPoints as $relation): ?>
+          <?php if ('QubitEvent' == get_class($relation)): ?>
+          <li>
+            <?php echo link_to(render_title($relation->actor), array('module' 
=> 'actor', 'action' => 'show', 'id' => $relation->actorId)) ?>
+            <span class="note2">(<?php echo 
$relation->type->getRole()?>)</span>
+          </li>
+          <?php else: ?>
           <li><?php echo link_to(render_title($relation->object), 
array('module' => 'actor', 'action' => 'show', 'id' => $relation->object->id)) 
?></li>
+          <?php endif; ?>
         <?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