summaryrefslogtreecommitdiff
path: root/modules/organize/views/organize_tree.html.php
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-29 14:02:29 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-29 14:02:29 -0600
commita9fcec755a835e284465bafcc9aba9ec9c2f0f62 (patch)
tree1b6a6029d18ee7cb350f47dd5be54a9bbbbebd17 /modules/organize/views/organize_tree.html.php
parent5db0b68a70434a16d8881a6e560a9526530a8a60 (diff)
parent6b633e87489acbe79d65fc5e089d35cc27ee691c (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/organize/views/organize_tree.html.php')
-rw-r--r--modules/organize/views/organize_tree.html.php53
1 files changed, 40 insertions, 13 deletions
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index 823301fc..36f900ac 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -1,17 +1,44 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<li class="gOrganizeBranch ui-icon-left <?= $can_edit ? "" : "gViewOnly" ?>" ref="<?= $album->id ?>">
- <div id="gOrganizeBranch-<?= $album->id ?>" ref="<?= $album->id ?>"
- class="<?= $selected ? "gBranchSelected" : "" ?>">
- <span id="gOrganizeIcon-<?= $album->id ?>" ref="<?= $album->id ?>"
- class="ui-icon <?= $album_icon ?>">
- </span>
- <span class="gBranchText" ref="<?= $album->id ?>"><?= p::clean($album->title) ?></span>
- </div>
- <ul id="gOrganizeChildren-<?= $album->id ?>"
- class="<?= $album_icon == "ui-icon-plus" ? "gBranchCollapsed" : "" ?>">
- <li style="display:none">&nbsp;</li>
- <? foreach ($children as $child): ?>
- <?= $child ?>
+<? foreach ($parents as $parent): ?>
+<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $parent) ? "" : "gViewOnly" ?>"
+ ref="<?= $parent->id ?>">
+ <span class="ui-icon ui-icon-minus">
+ </span>
+ <span class="gAlbumText" ref="<?= $parent->id ?>">
+ <?= p::clean($parent->title) ?>
+ </span>
+ <ul class="ui-icon-plus">
<? endforeach ?>
+
+ <? foreach ($peers as $peer): ?>
+ <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $peer) ? "" : "gViewOnly" ?>"
+ ref="<?= $peer->id ?>">
+ <span class="ui-icon <?= $peer->id == $album->id ? "ui-icon-minus" : "ui-icon-plus" ?>">
+ </span>
+ <span class="gAlbumText <?= $peer->id == $album->id ? "selected" : "" ?>"
+ ref="<?= $peer->id ?>">
+ <?= p::clean($peer->title) ?>
+ </span>
+
+ <? if ($peer->id == $album->id): ?>
+ <ul class="ui-icon-plus">
+ <? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?>
+ <li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>"
+ ref="<?= $child->id ?>">
+ <span class="ui-icon ui-icon-plus">
+ </span>
+ <span class="gAlbumText"
+ ref="<?= $child->id ?>">
+ <?= p::clean($child->title) ?>
+ </span>
+ </li>
+ <? endforeach ?>
+ </ul>
+ <? endif ?>
+ </li>
+ <? endforeach ?>
+
+ <? foreach ($parents as $parent): ?>
</ul>
</li>
+<? endforeach ?>