2009-04-03 00:50:43 +00:00
|
|
|
<?php defined("SYSPATH") or die("No direct script access.") ?>
|
2009-08-29 10:00:47 -07:00
|
|
|
<? 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">
|
2009-08-06 06:33:17 -07:00
|
|
|
<? endforeach ?>
|
2009-08-29 10:00:47 -07:00
|
|
|
|
|
|
|
|
<? if ($parent->id == $album->parent_id): ?>
|
|
|
|
|
<? foreach ($parent->children(null, 0, array("type" => "album")) 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 ?>
|
|
|
|
|
<? endif ?>
|
|
|
|
|
|
|
|
|
|
<? foreach ($parents as $parent): ?>
|
2009-08-06 06:33:17 -07:00
|
|
|
</ul>
|
2009-08-05 10:26:11 -07:00
|
|
|
</li>
|
2009-08-29 10:00:47 -07:00
|
|
|
<? endforeach ?>
|