Author: sevein
Date: Sun Sep 27 13:30:39 2009
New Revision: 3552
Log:
Make taxonomy treeview to show all the broad terms as Evelyn suggested.
Modified:
trunk/apps/qubit/modules/term/actions/contextMenuComponent.class.php
Modified: trunk/apps/qubit/modules/term/actions/contextMenuComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/term/actions/contextMenuComponent.class.php
Sun Sep 27 13:15:34 2009 (r3551)
+++ trunk/apps/qubit/modules/term/actions/contextMenuComponent.class.php
Sun Sep 27 13:30:39 2009 (r3552)
@@ -47,11 +47,8 @@
$lineage[] = $node->id;
}
- // Add root term (but not it's children) to term tree
- $this->termTree = array($ancestors->offsetGet(0));
-
- // Add ancestors and their siblings
- $this->buildTermTree($ancestors->offsetGet(1), $lineage);
+ // Add root term, ancestors and their siblings
+ $this->buildTermTree($ancestors->offsetGet(0), $lineage);
if (0 < count($this->termTree))
{
@@ -86,6 +83,13 @@
{
foreach ($children as $child)
{
+ // Omit children from different taxonomies
+ // TODO: Is there a better way to get children filtering by taxonomy?
+ if ($this->term->taxonomy->id != $child->taxonomy->id)
+ {
+ continue;
+ }
+
// Recurse
if (in_array($child->id, $lineage))
{
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---