Author: david
Date: Thu Dec 3 10:30:50 2009
New Revision: 4047
Log:
Update permission checks to ACL. Changes to text.
Modified:
trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php
Modified: trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php Thu Dec
3 10:22:16 2009 (r4046)
+++ trunk/apps/qubit/modules/function/templates/showIsdfSuccess.php Thu Dec
3 10:30:50 2009 (r4047)
@@ -1,11 +1,13 @@
-<div class="pageTitle"><?php echo __('view authority record') ?></div>
+<div class="pageTitle"><?php echo __('view ISDF function') ?></div>
<table class="detail">
<tbody>
- <tr><td colspan="2" class="headerCell">
- <?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user,
'actor'), render_title($func), array('module' => 'actor', 'action' => 'edit',
'id' => $func->id), array('title' => __('Edit authority record'))) ?>
- </td></tr>
+<tr>
+ <td colspan="2" class="headerCell">
+ <?php echo link_to_if(QubitAcl::check($func, QubitAclAction::UPDATE_ID),
render_title($func), array('module' => 'function', 'action' => 'edit', 'id' =>
$func->id), array('title' => __('Edit function'))) ?>
+ </td>
+</tr>
<?php if (isset($errorSchema)): ?>
<tr>
@@ -47,7 +49,7 @@
<?php if (0 < strlen($value = $func->getClassification(array('cultureFallback'
=> true)))): ?>
<tr><th><?php echo __('classification') ?></th><td>
- <?php echo $value; ?>
+ <?php echo $value; ?>
</td></tr>
<?php endif; ?>
@@ -206,12 +208,16 @@
</table>
<ul class="actions">
- <?php if (SecurityPriviliges::editCredentials($sf_user, 'function')): ?>
- <li><?php echo link_to(__('Edit'), array('module' => 'function', 'action'
=> 'edit', 'id' => $func->id), array('title' => __(''))) ?></li><?php endif; ?>
- <?php if (SecurityPriviliges::editCredentials($sf_user, 'function')): ?>
- <li><?php echo link_to(__('Delete'), array('module' => 'function',
'action' => 'delete', 'id' => $func->id), array('title' => __('')))
?></li><?php endif; ?>
- <br /><div class="menu-extra">
- <?php if (SecurityPriviliges::editCredentials($sf_user, 'function')): ?>
- <li><?php echo link_to(__('Add new'), array('module' => 'function',
'action' => 'create'), array('title' => __(''))) ?></li><?php endif; ?>
- <li><?php echo link_to(__('List all'), array('module' => 'function',
'action' => 'list'), array('title' => __(''))) ?></li>
+ <?php if (QubitAcl::check($func, QubitAclAction::UPDATE_ID)): ?>
+ <li><?php echo link_to(__('Edit'), array('module' => 'function', 'action'
=> 'edit', 'id' => $func->id), array('title' => __('edit this function')))
?></li>
+ <?php endif; ?>
+ <?php if (QubitAcl::check($func, QubitAclAction::DELETE_ID)): ?>
+ <li><?php echo link_to(__('Delete'), array('module' => 'function',
'action' => 'delete', 'id' => $func->id), array('title' => __('delete this
function'))) ?></li>
+ <?php endif; ?>
+ <div class="menu-extra">
+ <?php if (QubitAcl::check($func, QubitAclAction::CREATE_ID)): ?>
+ <li><?php echo link_to(__('Add new'), array('module' => 'function',
'action' => 'create'), array('title' => __('add new function'))) ?></li>
+ <?php endif; ?>
+ <li><?php echo link_to(__('List all'), array('module' => 'function',
'action' => 'list'), array('title' => __('list all functions'))) ?></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.com/group/qubit-commits?hl=en.