simplehtml renderer: show toggle after to make elements line up better
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 28 Sep 2010 17:59:15 +0000 (11:59 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 30 Sep 2010 17:47:23 +0000 (11:47 -0600)
framework/Tree/lib/Horde/Tree/Simplehtml.php

index bc23e09..07557a4 100644 (file)
@@ -83,19 +83,20 @@ class Horde_Tree_Simplehtml extends Horde_Tree_Base
         }
         $output .= str_repeat('&nbsp;', $node['indent'] * 2);
 
-        if (isset($node['children'])) {
-            $output .= '[' .
-                $this->_generateUrlTag($node_id) .
-                ($node['expanded'] ? '-' : '+') .
-                '</a>]&nbsp;';
-        }
-
         $output .= empty($node['url'])
             ? $node['label']
             : '<a href="' . strval($node['url']) . '">' . $node['label'] . '</a>';
         if (isset($node['extra'][Horde_Tree::EXTRA_RIGHT])) {
             $output .= implode(' ', $node['extra'][Horde_Tree::EXTRA_RIGHT]);
         }
+
+        if (isset($node['children'])) {
+            $output .= '&nbsp;[' .
+                $this->_generateUrlTag($node_id) .
+                ($node['expanded'] ? '-' : '+') .
+                '</a>]';
+        }
+
         $output .= '</div>';
 
         if (isset($node['children']) && $node['expanded']) {