Author: sevein
Date: Wed Aug 17 16:12:37 2011
New Revision: 9528

Log:
Restore reference to object providing rights by inheritance

Modified:
   trunk/apps/qubit/modules/right/templates/_relatedRights.php
   trunk/apps/qubit/modules/right/templates/_right.php

Modified: trunk/apps/qubit/modules/right/templates/_relatedRights.php
==============================================================================
--- trunk/apps/qubit/modules/right/templates/_relatedRights.php Wed Aug 17 
15:51:55 2011        (r9527)
+++ trunk/apps/qubit/modules/right/templates/_relatedRights.php Wed Aug 17 
16:12:37 2011        (r9528)
@@ -1,5 +1,8 @@
 <?php foreach ($ancestor->getRights() as $item): ?>
 
-  <?php echo get_partial('right/right', array('resource' => $item->object)) ?>
+  <?php echo get_partial('right/right',
+    array(
+      'resource' => $item->object,
+      'inherit' => 0 == count($resource->getRights()) ? $resource : null)) ?>
 
 <?php endforeach; ?>

Modified: trunk/apps/qubit/modules/right/templates/_right.php
==============================================================================
--- trunk/apps/qubit/modules/right/templates/_right.php Wed Aug 17 15:51:55 
2011        (r9527)
+++ trunk/apps/qubit/modules/right/templates/_right.php Wed Aug 17 16:12:37 
2011        (r9528)
@@ -2,9 +2,9 @@
   <h3><?php echo __('Related right') ?></h3>
   <div>
 
-    <?php // if (0 == count($resource->getRights())): ?>
-      <?php // echo link_to(render_title($item->subject), 
array($item->subject, 'module' => 'informationobject'), array('title' => 
__('Inherited from %1%', array('%1%' => $ancestor)))) ?>
-    <?php // endif; ?>
+    <?php if (isset($inherit)): ?>
+      <?php echo link_to(render_title($inherit), array($inherit, 'module' => 
'informationobject'), array('title' => __('Inherited from %1%', array('%1%' => 
$inherit)))) ?>
+    <?php endif; ?>
 
     <?php echo render_show(__('Act'), render_value($resource->act)) ?>
 

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

Reply via email to