Author: david
Date: Tue Sep 15 16:28:09 2009
New Revision: 3325

Log:
Clean up action menus for show and edit users.

Modified:
   trunk/apps/qubit/modules/user/templates/editSuccess.php
   trunk/apps/qubit/modules/user/templates/showSuccess.php

Modified: trunk/apps/qubit/modules/user/templates/editSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/user/templates/editSuccess.php     Tue Sep 15 
16:09:18 2009        (r3324)
+++ trunk/apps/qubit/modules/user/templates/editSuccess.php     Tue Sep 15 
16:28:09 2009        (r3325)
@@ -46,6 +46,7 @@
     <?php echo $form->groups->render(array('class' => 'form-autocomplete')) ?>
   </div>
 
+  <?php if (0 < count($permissions)): ?>
   <table class="inline">
     <caption><?php echo __('Existing permissions'); ?></caption>
     <thead>
@@ -84,6 +85,7 @@
       <?php endforeach; ?>
     </tbody>
   </table>
+  <?php endif; ?>
 
   <table class="inline">
     <caption><?php echo __('Add a new permission'); ?></caption>
@@ -124,22 +126,13 @@
 
 <div id="button-block">
   <div class="menu-action">
-    <?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'delete'))): ?>
-      <?php if ($user->getId()): ?>
-      &#160;<?php echo link_to(__('delete'), 'user/delete?id='.$user->getId(), 
'post=true&confirm='.__('are you sure?')) ?>
-      <?php endif; ?>
-    <?php endif; ?>
-    &#160;<?php echo link_to(__('cancel'), 'user/show?id='.$user->getId()) ?>
     <?php if ($user->getId()): ?>
       <?php echo submit_tag(__('save')) ?>
     <?php else: ?>
       <?php echo submit_tag(__('create')) ?>
     <?php endif; ?>
-  </div>
 
-  <div class="menu-extra">
-    <?php echo link_to(__('add new'), 'user/create'); ?>
-    <?php echo link_to(__('list all users'), 'user/list'); ?>
+    <?php echo link_to(__('cancel'), array('module' => 'user', 'action' => 
'show', 'id' => $user->getId())) ?>
   </div>
 </div>
 

Modified: trunk/apps/qubit/modules/user/templates/showSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/user/templates/showSuccess.php     Tue Sep 15 
16:09:18 2009        (r3324)
+++ trunk/apps/qubit/modules/user/templates/showSuccess.php     Tue Sep 15 
16:28:09 2009        (r3325)
@@ -33,15 +33,14 @@
 </tbody>
 </table>
 
-<div class="menu-action">
-<?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'edit'))): ?>
-  <?php echo link_to(__('edit'), 'user/edit?id='.$user->getId()) ?>
-<?php endif; ?>
-</div>
+<ul class="actions">
+  <?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'edit'))): ?>
+    <li><?php echo link_to (__('edit'), array('module' => 'user', 'action' => 
'edit', 'id' => $user->id)) ?></li>
 
-<div class="menu-extra">
-<?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'edit'))): ?>
-  <?php echo link_to(__('add new'), 'user/create'); ?>
-<?php endif; ?>
-  <?php echo link_to(__('list all users'), 'user/list'); ?>
-</div>
\ No newline at end of file
+    <?php if (SecurityCheck::HasPermission($sf_user, array('module' => 'user', 
'action' => 'delete'))): ?>
+    <li><?php echo link_to (__('delete'), array('module' => 'user', 'action' 
=> 'delete', 'id' => $user->id),
+      array('post' => true, 'confirm' => 'are you sure?')) ?></li>
+    <?php endif; ?>
+  <?php endif; ?>
+  <li><?php echo link_to(__('list'), array('module' => 'user', 'action' => 
'list')) ?></li>
+</ul>
\ No newline at end of file

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