Author: sevein
Date: Wed Jul 27 11:56:52 2011
New Revision: 9404
Log:
relatedRight component
Added:
trunk/apps/qubit/modules/right/templates/_relatedRights.php
- copied, changed from r9402,
trunk/apps/qubit/modules/right/templates/_relatedRights.class.php
Deleted:
trunk/apps/qubit/modules/right/templates/_relatedRights.class.php
Modified:
trunk/apps/qubit/modules/right/actions/relatedRightsComponent.class.php
Modified:
trunk/apps/qubit/modules/right/actions/relatedRightsComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/right/actions/relatedRightsComponent.class.php
Wed Jul 27 11:51:39 2011 (r9403)
+++ trunk/apps/qubit/modules/right/actions/relatedRightsComponent.class.php
Wed Jul 27 11:56:52 2011 (r9404)
@@ -21,6 +21,13 @@
{
public function execute($request)
{
- // $this->resource
+ if (isset($this->resource))
+ {
+ $this->rights =
QubitRelation::getRelationsBySubjectId($this->resource->id, array('typeId' =>
QubitTerm::RIGHT_ID));
+ }
+ else
+ {
+ return sfView::NONE;
+ }
}
}
Copied and modified:
trunk/apps/qubit/modules/right/templates/_relatedRights.php (from r9402,
trunk/apps/qubit/modules/right/templates/_relatedRights.class.php)
==============================================================================
--- trunk/apps/qubit/modules/right/templates/_relatedRights.class.php Wed Jul
27 11:36:15 2011 (r9402, copy source)
+++ trunk/apps/qubit/modules/right/templates/_relatedRights.php Wed Jul 27
11:56:52 2011 (r9404)
@@ -0,0 +1,10 @@
+<div class="field">
+ <h3><?php echo __('Related rights') ?></h3>
+ <div>
+ <ul>
+ <?php foreach ($rights as $item): ?>
+ <li><?php echo render_title($item->object) ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div>
--
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.