Author: david
Date: Thu Sep  3 14:49:30 2009
New Revision: 3162

Log:
Remove 'delete' button from term edit page.

Modified:
   trunk/apps/qubit/modules/term/actions/editAction.class.php
   trunk/apps/qubit/modules/term/templates/editSuccess.php

Modified: trunk/apps/qubit/modules/term/actions/editAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/editAction.class.php  Thu Sep  3 
14:02:28 2009        (r3161)
+++ trunk/apps/qubit/modules/term/actions/editAction.class.php  Thu Sep  3 
14:49:30 2009        (r3162)
@@ -90,13 +90,6 @@
       {
         $this->relationTypeMatrix[$relation->id] = 
$this->getRelatedTermType($relation);
       }
-
-      // Get related info object count for deletion warning messages
-      $this->relatedObjectCount = $this->term->getRelatedObjectCount();
-
-      // Get a separate count of related events because they will be cascade
-      // deleted!
-      $this->relatedEventCount = $this->term->getRelatedEventCount();
     }
   }
 

Modified: trunk/apps/qubit/modules/term/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/editSuccess.php     Thu Sep  3 
14:02:28 2009        (r3161)
+++ trunk/apps/qubit/modules/term/templates/editSuccess.php     Thu Sep  3 
14:49:30 2009        (r3162)
@@ -142,24 +142,6 @@
 
 <div id="button-block">
   <div class="menu-action">
-  <?php if ($term->getId() && !$term->isProtected()): ?>
-    <?php
-      if($relatedEventCount > 0)
-      {
-        $confirmString = __('WARNING: Deleting this term will DELETE %1% 
events. Are you sure you want to delete these related events forever?', 
array('%1%' => $relatedEventCount));
-      }
-      else if ($relatedObjectCount > 0)
-      {
-        $confirmString = __('This term is linked to %1% other objects, are you 
sure you want to remove this term from *all* of these objects?', array('%1%' => 
$relatedObjectCount));
-      }
-      else
-      {
-        $confirmString = __('Are you sure?');
-      }
-    ?>
-    &nbsp;<?php echo link_to(__('delete'), array('module' => 'term', 'action' 
=> 'delete', 'id' => $term->getId()), array('post' => true, 'confirm' => 
$confirmString)) ?>
-  <?php endif; ?>
-
   <?php if ($term->getId()): ?>
     <?php echo link_to(__('cancel'), array('module' => 'term', 'action' => 
'show', 'id' => $term->id)) ?>
     <?php echo submit_tag(__('save')) ?>

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