<section class="changes_action"><a href="#<?php echo $change["id"]; ?> " data-module="Pages" class="icon_deny"></a></section> </li> <?php } ?> </ul> </div> <?php } foreach ($modules as $mod) { $view = BigTreeAutoModule::getViewForTable($mod["table"]); if ($view) { $view_data = BigTreeAutoModule::getViewData($view); } else { $view_data = false; } ?> <a name="<?php echo $mod["id"]; ?> "></a> <div class="table"> <summary> <h2 class="full"> <span class="modules"></span> <?php echo $mod["name"]; ?>
$permission = $admin->getAccessLevel($bigtree["module"]["id"]); // Setup defaults $draggable = isset($bigtree["view"]["options"]["draggable"]) && $bigtree["view"]["options"]["draggable"] ? true : false; $prefix = isset($bigtree["view"]["options"]["prefix"]) && $bigtree["view"]["options"]["prefix"] ? $bigtree["view"]["options"]["prefix"] : ""; $items = array(); if ($draggable) { $order = "position DESC, CAST(id AS UNSIGNED) ASC"; } else { if ($bigtree["view"]["options"]["sort"] && ($bigtree["view"]["options"]["sort"] == "ASC" || $bigtree["view"]["options"]["sort"] == "DESC")) { $order = "CAST(id AS UNSIGNED) " . $bigtree["view"]["options"]["sort"]; } else { $order = "CAST(id AS UNSIGNED) DESC"; } } $items = BigTreeAutoModule::getViewData($bigtree["view"], $order, "active"); $pending_items = BigTreeAutoModule::getViewData($bigtree["view"], $order, "pending"); ?> <div class="table auto_modules image_list"> <summary> <p><?php if ($permission == "p" && $draggable) { ?> Click and drag the light gray area of an item to sort the images. <?php } ?> Click an image to edit it.</p> </summary> <?php if (count($pending_items)) { ?> <header><span>Active</span></header>
$bigtree["module"] = $admin->getModule(BigTreeAutoModule::getModuleForView($bigtree["view"])); } $permission = $admin->getAccessLevel($bigtree["module"]["id"]); // Setup the preview action if we have a preview URL and field. if ($bigtree["view"]["preview_url"]) { $bigtree["view"]["actions"]["preview"] = "on"; } $module_page = ADMIN_ROOT . $bigtree["module"]["route"] . "/"; // Retrieve our results. if (isset($_POST["search"]) && $_POST["search"] || isset($_GET["search"]) && $_GET["search"]) { $search = isset($_GET["search"]) ? $_GET["search"] : $_POST["search"]; $bigtree["view"]["options"]["per_page"] = 10000000; $r = BigTreeAutoModule::getSearchResults($bigtree["view"], 1, $search, "column1 ASC", false); $items = $r["results"]; } else { $items = BigTreeAutoModule::getViewData($bigtree["view"], "position DESC, CAST(id AS UNSIGNED) ASC", "both"); $search = ""; } // We're going to append information to the end of an edit string so that we can return to the same page / set of search results after submitting a form. $edit_append = "?view_data=" . base64_encode(serialize(array("view" => $bigtree["view"]["id"], "search" => $search))); foreach ($items as $item) { // 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";