Ejemplo n.º 1
0
</h1>

<div id="ContentMap" class="Body">
<ol class='Tree'>
<?php 
$FirstDepth = $this->Tree->FirstRow()->Depth;
$CurrentDepth = $FirstDepth;
$Counter = 0;
if ($this->AddHomeTreeNode) {
    echo "<li>", Anchor(T('Home'), '/', '', array('WithDomain' => True)), '</li>';
}
foreach ($this->Tree as $Node) {
    if ($Node->Depth > $CurrentDepth) {
        echo "<ul>";
    } elseif ($Node->Depth < $CurrentDepth) {
        echo str_repeat("</li></ul>", $CurrentDepth - $Node->Depth), '</li>';
    } else {
        if ($Counter > 0) {
            echo "</li>";
        }
    }
    $CurrentDepth = $Node->Depth;
    ++$Counter;
    $ItemAttribute = array('id' => 'Tree_' . $Node->SectionID);
    echo "\n<li" . Attribute($ItemAttribute) . '>';
    echo SectionAnchor($Node, array('WithDomain' => True, 'NoFollowExternal' => True));
}
echo str_repeat("</li></ul>", $Node->Depth - $FirstDepth) . '</li>';
?>
</ol>
</div>
Ejemplo n.º 2
0
            $Options[] = Anchor(T('Add'), 'candy/section/add/' . $Node->SectionID, '');
        }
        if (IsContentOwner($Node, 'Candy.Sections.Edit')) {
            $Options[] = Anchor(T('Edit'), 'candy/section/edit/' . $Node->SectionID, '');
        }
        if ($Node->Depth == 0) {
            // This is root
            //$Options[] = Anchor('Properties', 'candy/content/properties/'.$Node->ContentID, '');
        } else {
            if ($PermissionSwap) {
                $Options[] = Anchor(T('Swap'), 'candy/section/swap/' . $Node->SectionID, '');
            }
            if ($PermissionMove) {
                $Options[] = Anchor(T('Move'), 'candy/section/move/' . $Node->SectionID, '');
            }
            if ($PermissionDelete) {
                $Options[] = Anchor(T('Delete'), 'candy/section/delete/' . $Node->SectionID, 'PopConfirm');
            }
            //$Options[] = Anchor('Properties', 'candy/section/properties/'.$Node->SectionID, '');
        }
        echo "\n<li" . Attribute($ItemAttribute) . '>';
        echo '<div>';
        echo SectionAnchor($Node);
        if (count($Options) > 0) {
            echo Wrap(implode(', ', $Options), 'span', array('class' => 'Options'));
        }
        echo '</div>';
    }
    echo str_repeat("</li></ul>", $Node->Depth) . '</li>';
    echo "</ol>";
}
Ejemplo n.º 3
0
?>


<div class="Box BoxSections">
	<?php 
/*<h4><?php echo Anchor(T('Sections'), 'content/map'); ?></h4>*/
?>
	<ul class="PanelInfo">

<?php 
$MaxDepth = -1;
// TODO: MaxDepth SET TO CONFIG
foreach ($this->Data('Items') as $Section) {
    $ViewDepth = $Section->Depth - $this->RootNodeDepth;
    if ($MaxDepth > 0 && $ViewDepth > $MaxDepth) {
        continue;
    }
    $CssClass = 'Depth' . $ViewDepth . ($ViewingSectionID == $Section->SectionID ? ' Active' : '');
    echo '<li class="' . $CssClass . '">';
    //echo Wrap(Anchor(($ViewDepth > 1 ? '↳ ' : '').Gdn_Format::Text($Section->Name), '/categories/'.rawurlencode($Category->UrlCode)), 'strong');
    //echo ($ViewDepth > 1 ? '↳ ' : '');
    echo SectionAnchor($Section);
    //echo '<span class="Count">?</span>';
    //echo "&#160;</li>\n";
    echo "</li>\n";
}
?>

</ul>
</div>