mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-22 15:53:50 -04:00
Precalculate the organize tree based on the selected album and render
it right away while still allowing incremental tree loading.
This commit is contained in:
@@ -3,11 +3,17 @@
|
||||
ref="<?= $album->id ?>">
|
||||
<span class="ui-icon ui-icon-minus">
|
||||
</span>
|
||||
<span class="gAlbumText" ref="<?= $album->id ?>">
|
||||
<span class="gAlbumText
|
||||
<?= $album->id == $selected->id ? "selected" : "" ?>
|
||||
"
|
||||
ref="<?= $album->id ?>">
|
||||
<?= p::clean($album->title) ?>
|
||||
</span>
|
||||
<ul>
|
||||
<? foreach ($album->children(null, 0, array("type" => "album")) as $child): ?>
|
||||
<? if ($child->is_descendant($selected)): ?>
|
||||
<?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?>
|
||||
<? else: ?>
|
||||
<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $child) ? "" : "gViewOnly" ?>"
|
||||
ref="<?= $child->id ?>">
|
||||
<span class="ui-icon ui-icon-plus">
|
||||
@@ -16,6 +22,7 @@
|
||||
<?= p::clean($child->title) ?>
|
||||
</span>
|
||||
</li>
|
||||
<? endif ?>
|
||||
<? endforeach ?>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user