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.php5
-rw-r--r--modules/organize/views/organize_thumb_grid.html.php8
-rw-r--r--modules/organize/views/organize_tree.html.php53
3 files changed, 26 insertions, 40 deletions
diff --git a/modules/organize/views/organize_dialog.html.php b/modules/organize/views/organize_dialog.html.php
index 857499aa..cbc2e4f9 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" => html::purify($album->title))) ?></h1>
@@ -22,9 +23,9 @@
</ul>
</div>
<div id="gOrganizeDetail" class="yui-u">
- <div id="gMicroThumbPanel"
+ <div id="gOrganizeMicroThumbPanel"
ref="<?= url::site("organize/album/__ITEM_ID__/__OFFSET__") ?>">
- <ul id="gMicroThumbGrid">
+ <ul id="gOrganizeMicroThumbGrid">
<?= $micro_thumb_grid ?>
</ul>
</div>
diff --git a/modules/organize/views/organize_thumb_grid.html.php b/modules/organize/views/organize_thumb_grid.html.php
index 31dc9af5..929d9ec3 100644
--- a/modules/organize/views/organize_thumb_grid.html.php
+++ b/modules/organize/views/organize_thumb_grid.html.php
@@ -1,8 +1,8 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<? foreach ($album->children(25, $offset) as $child): ?>
-<li class="gMicroThumbGridCell" ref="<?= $child->id ?>">
- <div id="gMicroThumb_<?= $child->id ?>"
- class="gMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>">
+<li class="gOrganizeMicroThumbGridCell" ref="<?= $child->id ?>">
+ <div id="gOrganizeMicroThumb_<?= $child->id ?>"
+ class="gOrganizeMicroThumb <?= $child->is_album() ? "gAlbum" : "gPhoto" ?>">
<?= $child->thumb_img(array("class" => "gThumbnail", "ref" => $child->id), 90, true) ?>
</div>
</li>
@@ -13,7 +13,7 @@
setTimeout(function() {
$.get("<?= url::site("organize/content/$album->id/" . ($offset + 25)) ?>",
function(data) {
- $("#gMicroThumbGrid").append(data);
+ $("#gOrganizeMicroThumbGrid").append(data);
$.organize.set_handlers();
}
);
diff --git a/modules/organize/views/organize_tree.html.php b/modules/organize/views/organize_tree.html.php
index 5b676889..50c202b0 100644
--- a/modules/organize/views/organize_tree.html.php
+++ b/modules/organize/views/organize_tree.html.php
@@ -1,44 +1,29 @@
<?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 ?>">
- <?= html::clean($parent->title) ?>
+ <span class="gOrganizeAlbumText
+ <?= $selected && $album->id == $selected->id ? "selected" : "" ?>
+ "
+ ref="<?= $album->id ?>">
+ <?= html::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): ?>
+ <? if ($selected && $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">
</span>
- <span class="gAlbumText <?= $peer->id == $album->id ? "selected" : "" ?>"
- ref="<?= $peer->id ?>">
- <?= html::clean($peer->title) ?>
+ <span class="gOrganizeAlbumText" ref="<?= $child->id ?>">
+ <?= html::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 ?>">
- <?= html::clean($child->title) ?>
- </span>
- </li>
- <? endforeach ?>
- </ul>
- <? endif ?>
</li>
+ <? endif ?>
<? endforeach ?>
-
- <? foreach ($parents as $parent): ?>
</ul>
</li>
-<? endforeach ?>
+