summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Staudacher <andy.st@gmail.com>2010-02-18 17:54:29 -0800
committerAndy Staudacher <andy.st@gmail.com>2010-02-18 17:54:29 -0800
commitf116af5287f7809e907ee56dbfa582f474738ae6 (patch)
treef35be9ddc367fffe56b3b293ad23ad4205f253b1
parent8f39e6844914f4c12c9f7309bd4d04584b02a611 (diff)
Fix for tickets #1024 and #1025: Fix formatting of album tree list in the organize dialog, and (magically) drag and drop move to another album works as well again. Tested in FF3.5, Chrome5 on Ubuntu Linux.
-rw-r--r--modules/organize/views/organize_tree.html.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index 33d7b4c9..044b6858 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -3,24 +3,27 @@
ref="<?= $album->id ?>">
<span class="ui-icon ui-icon-minus g-left">
</span>
- <span class="g-organize-album-text g-left <?= $selected && $album->id == $selected->id ? "ui-state-focus" : "" ?>"
+ <span class="g-organize-album-text <?= $selected && $album->id == $selected->id ? "ui-state-focus" : "" ?>"
ref="<?= $album->id ?>">
<?= html::clean($album->title) ?>
</span>
- <ul class="g-left">
- <? foreach ($album->children(null, null, array(array("type", "=", "album"))) as $child): ?>
+ <? $child_albums = $album->viewable()->children(null, null, array(array("type", "=", "album"))); ?>
+ <? if (!empty($child_albums)): ?>
+ <ul>
+ <? foreach ($child_albums as $child): ?>
<? if ($selected && $child->contains($selected)): ?>
<?= View::factory("organize_tree.html", array("selected" => $selected, "album" => $child)); ?>
<? else: ?>
<li class="g-organize-album ui-icon-left <?= access::can("edit", $child) ? "" : "g-view-only" ?>"
ref="<?= $child->id ?>">
<span class="ui-icon ui-icon-plus g-left"></span>
- <span class="g-organize-album-text g-left <?= $selected && $child->id == $selected->id ? "ui-state-focus" : "" ?>" ref="<?= $child->id ?>">
+ <span class="g-organize-album-text <?= $selected && $child->id == $selected->id ? "ui-state-focus" : "" ?>" ref="<?= $child->id ?>">
<?= html::clean($child->title) ?>
</span>
</li>
<? endif ?>
<? endforeach ?>
</ul>
+ <? endif ?>
</li>