Author: david
Date: Wed Oct  7 15:34:24 2009
New Revision: 3685

Log:
Add 'edit' credential check to term/show 'delete' button. Fixes issue #1051.

Modified:
   trunk/apps/qubit/modules/term/templates/showSuccess.php

Modified: trunk/apps/qubit/modules/term/templates/showSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/term/templates/showSuccess.php     Wed Oct  7 
15:19:21 2009        (r3684)
+++ trunk/apps/qubit/modules/term/templates/showSuccess.php     Wed Oct  7 
15:34:24 2009        (r3685)
@@ -162,16 +162,15 @@
 ?>
 
 <ul class="actions">
-  <?php if (SecurityPriviliges::editCredentials($sf_user, 'term')): ?>
+  <?php if ($editCredentials): ?>
     <li><?php echo link_to (__('Edit'), array('module' => 'term', 'action' => 
'edit', 'id' => $term->id)) ?></li>
   <?php endif; ?>
-  <?php if (!$term->isProtected()): ?>
+  <?php if ($editCredentials && !$term->isProtected()): ?>
     <li><?php echo link_to (__('Delete'), array('module' => 'term', 'action' 
=> 'delete', 'id' => $term->id), array('post' => true, 'confirm' => 
$deleteConfirm)) ?></li>
   <?php endif; ?>
-  <br /><div class="menu-extra">
-  <?php if (SecurityPriviliges::editCredentials($sf_user, 'term')): ?>
+  <div class="menu-extra">
+  <?php if ($editCredentials): ?>
     <li><?php echo link_to(__('Add New'), array('module' => 'term', 'action' 
=> 'create', 'taxonomyId' => $term->getTaxonomy()->id)) ?></li><?php endif; ?>
   <li><?php echo link_to(__('List all'), array('module' => 'term', 'action' => 
'list', 'taxonomyId' => $term->getTaxonomy()->id)) ?></li>
   </div>
-
 </ul>

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