Author: jablko
Date: Tue Sep 15 11:51:37 2009
New Revision: 3312
Log:
Take advantage of link_to_if() helper, like revision 3121
Modified:
trunk/apps/qubit/modules/actor/actions/showAction.class.php
trunk/apps/qubit/modules/actor/templates/showIsaarSuccess.php
trunk/apps/qubit/modules/repository/actions/showAction.class.php
trunk/apps/qubit/modules/repository/templates/showIsdiahSuccess.php
Modified: trunk/apps/qubit/modules/actor/actions/showAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/showAction.class.php Tue Sep 15
11:43:30 2009 (r3311)
+++ trunk/apps/qubit/modules/actor/actions/showAction.class.php Tue Sep 15
11:51:37 2009 (r3312)
@@ -34,12 +34,5 @@
//Actor Relations
$this->actorRelations = $this->actor->getActorRelations();
-
- //determine if user has edit priviliges
- $this->editCredentials = false;
- if (SecurityPriviliges::editCredentials($this->getUser(), 'actor'))
- {
- $this->editCredentials = true;
- }
}
}
Modified: trunk/apps/qubit/modules/actor/templates/showIsaarSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/actor/templates/showIsaarSuccess.php Tue Sep
15 11:43:30 2009 (r3311)
+++ trunk/apps/qubit/modules/actor/templates/showIsaarSuccess.php Tue Sep
15 11:51:37 2009 (r3312)
@@ -3,16 +3,9 @@
<table class="detail">
<tbody>
-<?php $name =
render_title($actor->getAuthorizedFormOfName(array('cultureFallback' => true)))
?>
-<?php if ($editCredentials): ?>
<tr><td colspan="2" class="headerCell">
- <?php echo link_to($name, array('module' => 'actor', 'action' => 'edit',
'id' => $actor->getId())) ?>
+ <?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user,
'actor'), render_title($actor), array('module' => 'actor', 'action' => 'edit',
'id' => $actor->id)) ?>
</td></tr>
-<?php else: ?>
- <tr><td colspan="2" class="headerCell">
- <?php echo $name ?>
- </td></tr>
-<?php endif; ?>
<?php if ($actor->getEntityTypeId()): ?>
<tr><th><?php echo __('type of entity') ?></th><td>
Modified: trunk/apps/qubit/modules/repository/actions/showAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/repository/actions/showAction.class.php Tue Sep
15 11:43:30 2009 (r3311)
+++ trunk/apps/qubit/modules/repository/actions/showAction.class.php Tue Sep
15 11:51:37 2009 (r3312)
@@ -33,12 +33,5 @@
$this->notes = $this->repository->getRepositoryNotes();
$this->contactInformation = $this->repository->getContactInformation();
-
- // Determine if user has edit priviliges
- $this->editCredentials = false;
- if (SecurityPriviliges::editCredentials($this->getUser(), 'repository'))
- {
- $this->editCredentials = true;
- }
}
}
Modified: trunk/apps/qubit/modules/repository/templates/showIsdiahSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/repository/templates/showIsdiahSuccess.php Tue Sep
15 11:43:30 2009 (r3311)
+++ trunk/apps/qubit/modules/repository/templates/showIsdiahSuccess.php Tue Sep
15 11:51:37 2009 (r3312)
@@ -3,15 +3,9 @@
<table class="detail">
<tbody>
-<?php if ($editCredentials): ?>
- <tr><td colspan="2" class="headerCell">
- <?php echo link_to(render_title($repository), array('module' =>
'repository', 'action' => 'edit', 'id' => $repository->getId())) ?>
- </td></tr>
-<?php else: ?>
<tr><td colspan="2" class="headerCell">
- <?php echo $repository ?>
+ <?php echo link_to_if(SecurityPriviliges::editCredentials($sf_user,
'repository'), render_title($repository), array('module' => 'repository',
'action' => 'edit', 'id' => $repository->id)) ?>
</td></tr>
-<?php endif; ?>
<?php if ($repository->getIdentifier()): ?>
<tr><th><?php echo __('identifier')?></th>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---