summaryrefslogtreecommitdiff
path: root/modules/organize/views
diff options
context:
space:
mode:
Diffstat (limited to 'modules/organize/views')
-rw-r--r--modules/organize/views/organize_dialog.html.php1
-rw-r--r--modules/organize/views/organize_tree.html.php46
2 files changed, 13 insertions, 34 deletions
diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php
index b03c066c..d4196460 100644
--- a/modules/organize/views/organize_dialog.html.php
+++ b/modules/organize/views/organize_dialog.html.php
@@ -3,6 +3,7 @@
var move_url = "<?= url::site("organize/move_to/__ALBUM_ID__?csrf=$csrf") ?>";
var rearrange_url = "<?= url::site("organize/rearrange/__TARGET_ID__/__BEFORE__?csrf=$csrf") ?>";
var sort_order_url = "<?= url::site("organize/sort_order/__ALBUM_ID__/__COL__/__DIR__?csrf=$csrf") ?>";
+ var tree_url = "<?= url::site("organize/tree/__ALBUM_ID__") ?>";
</script>
<div id="gOrganize" class="gDialogPanel">
<h1 style="display:none"><?= t("Organize %name", array("name" => p::purify($album->title))) ?></h1>
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index 36f900ac..4677234c 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -1,44 +1,22 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<? foreach ($parents as $parent): ?>
-<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $parent) ? "" : "gViewOnly" ?>"
- ref="<?= $parent->id ?>">
+<li class="gOrganizeAlbum ui-icon-left <?= access::can("edit", $album) ? "" : "gViewOnly" ?>"
+ ref="<?= $album->id ?>">
<span class="ui-icon ui-icon-minus">
</span>
- <span class="gAlbumText" ref="<?= $parent->id ?>">
- <?= p::clean($parent->title) ?>
+ <span class="gAlbumText" ref="<?= $album->id ?>">
+ <?= p::clean($album->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" ?>">
+ <ul>
+ <? 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 <?= $peer->id == $album->id ? "selected" : "" ?>"
- ref="<?= $peer->id ?>">
- <?= p::clean($peer->title) ?>
+ <span class="gAlbumText" ref="<?= $child->id ?>">
+ <?= p::clean($child->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 ?>
+