Author: david
Date: Wed Sep 23 13:05:57 2009
New Revision: 3478

Log:
Add 'delete' button to digitalobject/edit page.  Remove delete icon for master 
image.

Modified:
   trunk/apps/qubit/modules/digitalobject/templates/_editRepresentation.php
   trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php

Modified: 
trunk/apps/qubit/modules/digitalobject/templates/_editRepresentation.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_editRepresentation.php    
Wed Sep 23 12:58:23 2009        (r3477)
+++ trunk/apps/qubit/modules/digitalobject/templates/_editRepresentation.php    
Wed Sep 23 13:05:57 2009        (r3478)
@@ -4,9 +4,11 @@
   <tr>
     <th colspan="2">
       <?php echo __('%1% representation', array('%1%' => 
$representation->getUsage())); ?>
+      <?php if (QubitTerm::MASTER_ID != $representation->usageId): ?>
       <?php echo link_to(
         image_tag('/images/delete.png', array('style'=>'vertical-align: 
middle')),
         'digitalobject/delete?id='.$representation->getId(), 
array('confirm'=>$confirmDeleteString)); ?>
+      <?php endif; ?>
     </th>
   </tr>
   <tr>
@@ -47,4 +49,4 @@
       </table>
     </td>
   </tr>
-</table>
\ No newline at end of file
+</table>

Modified: trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php    Wed Sep 
23 12:58:23 2009        (r3477)
+++ trunk/apps/qubit/modules/digitalobject/templates/editSuccess.php    Wed Sep 
23 13:05:57 2009        (r3478)
@@ -48,6 +48,9 @@
 <?php endif; ?>
 
   <ul class="actions">
+    <?php if (isset($sf_request->id)): ?>
+    <li><?php echo link_to(__('Delete'), array('module' => 'digitalobject', 
'action' => 'delete', 'id' => $digitalObject->id)) ?></li>
+    <?php endif; ?>
     <li><?php echo link_to(__('Cancel'), array('module' => 
'informationobject', 'action' => 'show', 'id' => $informationObject->id)) 
?></li>
     <?php if (isset($sf_request->id)): ?>
       <li><?php echo submit_tag(__('Save')) ?></li>

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