Author: david
Date: Mon Sep 28 14:42:59 2009
New Revision: 3570

Log:
Fix digital object reference display on digitalobject/edit. Fix paging for 
compound objects.

Modified:
   
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
   trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php

Modified: 
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php
==============================================================================
--- 
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php  
    Mon Sep 28 14:33:21 2009        (r3569)
+++ 
trunk/apps/qubit/modules/digitalobject/actions/showCompoundComponent.class.php  
    Mon Sep 28 14:42:59 2009        (r3570)
@@ -83,7 +83,14 @@
     }
 
     // Link for prev/next page
-    $this->currentObjectRoute = array('module' => 'informationobject', 
'action' => 'show', 'id' => $this->informationObject->id);
+    if ('informationobject' == sfContext::getInstance()->getModuleName())
+    {
+      $this->currentObjectRoute = array('module' => 'informationobject', 
'action' => 'show', 'id' => $this->informationObject->id);
+    }
+    else if ('digitalobject' == sfContext::getInstance()->getModuleName())
+    {
+      $this->currentObjectRoute = array('module' => 'digitalobject', 'action' 
=> 'edit', 'id' => $this->digitalObject->id);
+    }
 
     $this->pager = $pager;
   }

Modified: trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php    Mon Sep 
28 14:33:21 2009        (r3569)
+++ trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php    Mon Sep 
28 14:42:59 2009        (r3570)
@@ -2,26 +2,12 @@
 
 <div class="headerCell"><?php if (0 < (strlen($label = 
$informationObject->getLabel()))): ?><?php echo $label ?><?php endif; ?></div>
 
-<div class="form-item" style="text-align: center">
-<?php if 
($digitalObject->showAsCompoundDigitalObject(QubitTerm::REFERENCE_ID)): ?>
-  <tr>
-    <td colspan="2">
-      <div style="text-align: center">
-      <?php include_component('digitalobject', 'showCompound', 
array('informationObject' => $informationObject)) ?>
-      </div>
-    </td>
-  </tr>
-<?php elseif (null !== $digitalObject->id): ?>
-  <tr>
-    <td colspan="2">
-      <div style="text-align: center">
-      <?php include_component('digitalobject', 'show', array(
-        'digitalObject' => $digitalObject, 'usageType' => 
QubitTerm::REFERENCE_ID, 'link' => $digitalObjectLink)) ?>
-      </div>
-    </td>
-  </tr>
+<?php if (null !== $digitalObject): ?>
+  <div class="form-item" style="text-align: center">
+    <?php include_component('digitalobject', 'show', array(
+      'digitalObject' => $digitalObject, 'usageType' => 
QubitTerm::REFERENCE_ID)) ?>
+  </div>
 <?php endif; ?>
-</div>
 
 <?php echo $form->renderFormTag(url_for(array('module' => 'digitalobject', 
'action' => 'edit', 'id' => $sf_request->id))) ?>
 <?php echo $form->renderHiddenFields() ?>

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