function _localDrawLevel($items, $depth) { global $bigtree, $module_page, $permission, $admin; foreach ($items as $item) { $expanded = !empty($_COOKIE["bigtree_admin"]["nested_views"][$bigtree["view"]["id"]][$item["id"]]) ? true : false; $children = BigTreeAutoModule::getViewDataForGroup($bigtree["view"], $item["id"], "position DESC, id ASC", "both"); // Stop the item status notice if (!isset($item["status"])) { $item["status"] = false; } if ($item["status"] == "p") { $status = "Pending"; $status_class = "pending"; } elseif ($item["status"] == "c") { $status = "Changed"; $status_class = "pending"; } else { $status = "Published"; $status_class = "published"; } if ($expanded) { $status_class .= " expanded"; } ?> <li id="row_<?php echo $item["id"]; ?> " class="<?php echo $status_class; ?> "> <span class="depth" style="width: <?php echo $depth * 24; ?> px;"> <?php if ($permission == "p") { ?> <span class="icon_sort"></span> <?php } ?> </span> <?php $x = 0; $depth_minus = ceil((24 * $depth + 1) / count($bigtree["view"]["fields"])); foreach ($bigtree["view"]["fields"] as $key => $field) { $x++; $value = $item["column{$x}"]; if ($x == 1) { $field["width"] -= 20; } ?> <section class="view_column<?php if ($x == 1 && !count($children)) { ?> disabled<?php } ?> " style="width: <?php echo $field["width"] - $depth_minus; ?> px;"><?php echo $value; ?> </section> <?php } ?> <section class="view_status status_<?php echo $status_class; ?> "><?php echo $status; ?> </section> <?php $iperm = $permission == "p" ? "p" : $admin->getCachedAccessLevel($bigtree["module"], $item, $bigtree["view"]["table"]); foreach ($bigtree["view"]["actions"] as $action => $data) { if ($data == "on") { if (($action == "delete" || $action == "approve" || $action == "feature" || $action == "archive") && $iperm != "p") { if ($action == "delete" && $item["pending_owner"] == $admin->ID) { $class = "icon_delete"; } else { $class = "icon_disabled"; } } else { $class = $admin->getActionClass($action, $item); } if ($action == "preview") { $link = rtrim($bigtree["view"]["preview_url"], "/") . "/" . $item["id"] . '/" target="_preview'; } elseif ($action == "edit") { $link = $bigtree["view"]["edit_url"] . $item["id"] . "/" . $edit_append; } else { $link = "#" . $item["id"]; } ?> <section class="view_action action_<?php echo $action; ?> "><a href="<?php echo $link; ?> " class="<?php echo $class; ?> "></a></section> <?php } else { $data = json_decode($data, true); $link = $module_page . $data["route"] . "/" . $item["id"] . "/"; if ($data["function"]) { $link = call_user_func($data["function"], $item); } ?> <section class="view_action"><a href="<?php echo $link; ?> " class="<?php echo $data["class"]; ?> "></a></section> <?php } } if (count($children)) { if ($expanded) { echo "<ul>"; } else { echo '<ul style="display: none;">'; } _localDrawLevel($children, $depth + 1); echo "</ul>"; } ?> </li> <?php } }
Click and drag the light gray area of an item to sort the images. <?php } if (isset($view["actions"]["edit"])) { ?> Click an image to edit it.<?php } ?> </p> </summary> <?php } $y = 0; foreach ($groups as $group => $title) { $y++; $items = BigTreeAutoModule::getViewDataForGroup($bigtree["view"], $group, $order, "active"); $pending_items = BigTreeAutoModule::getViewDataForGroup($bigtree["view"], $group, $order, "pending"); ?> <header class="group"><?php echo isset($group_title_overrides[$title]) ? $group_title_overrides[$title] : $title; ?> </header> <section> <?php if (count($items)) { ?> <ul id="image_list_<?php echo $y; ?> "> <?php foreach ($items as $item) {