<?php if(!empty($treeList)) { ?>
<ul class="unstyled">
<?php foreach ($treeList as $list) { ?>
    <li id="<?= htmlspecialchars($list['id']) ?>" data-name="<?= htmlspecialchars($list['name']) ?>" data-sharedFrom="<?= htmlspecialchars($list['username']) ?>">
        <?= htmlspecialchars($list['name']) ?> by <span class="text-info"><?= htmlspecialchars($list['username']) ?></span>

        <div class="unsubscribe-panel <?php if($list['shared'] == false){ echo "hide"; } ?>">
            <button class="nav-tree-unsubscribe btn btn-large">Unsubscribe</button>
        </div>
        <div class="subscribe-panel <?php if($list['shared'] == true){ echo "hide"; } ?>">
            <button class="nav-tree-subscribe btn btn-large">Subscribe</button>
            <button class="nav-tree-copylocal btn btn-large">copy as local tree</button>
        </div>
    </li>
<?php } ?>
 </ul>
<?php } else { ?>
<div class="alert alert-info">No trees available for subscription.</div>
<?php } ?>
