/** * Render control */ public function render() { $this->template->setFile(__DIR__ . "/Clipboard.latte"); $this->template->setTranslator($this->system->translator); $this->template->clipboard = $this->system->session->get("clipboard"); $this->template->rootname = FileSystem::getRootName(); $this->template->render(); }
/** * Create navigation structure * * @param string $dir Source directory in relative format * * @return array */ protected function getNav($dir) { $var = array(); $rootname = FileSystem::getRootName(); if ($dir === $rootname) { $var[] = array("name" => $rootname, "link" => $this->link("openDir", $rootname)); } else { $nav = explode("/", $dir); $path = "/"; foreach ($nav as $item) { if ($item) { $path .= "{$item}/"; $var[] = array("name" => $item, "link" => $this->link("openDir", $path)); } } } return $var; }
/** * Generate treeview html * * @return string */ private function generateTreeview() { $dirs = $this->getDirTree($this->system->parameters["dataDir"]); $rootname = FileSystem::getRootName(); $output = '<ul class="filetree">'; $output .= '<span class="fm-droppable" data-move-url="' . $this->getComponent("control-Content")->link("move") . '" data-targetdir="' . $rootname . '">'; $output .= '<a href="' . $this->link("openDir", $rootname) . '" class="ajax treeview-directory fm-root-icon" title="' . $rootname . '">'; $output .= $rootname; $output .= '</a></span>'; $output .= $this->generateTree($dirs, null); $output .= '</ul>'; return $output; }
/** * Render control */ public function render() { $this->template->setFile(__DIR__ . "/{$this->view}.latte"); $this->template->setTranslator($this->system->translator); $this->template->files = $this->loadData($this->getActualDir(), $this->system->session->get("mask"), $this->view, $this->system->session->get("order")); $this->template->actualdir = $this->getActualDir(); $this->template->rootname = FileSystem::getRootName(); $this->template->view = $this->view; $this->template->resUrl = $this->system->parameters["resUrl"]; $this->template->resDir = $this->system->parameters["resDir"]; $this->template->timeFormat = $this->system->translator->getTimeFormat(); // Load plugins if ($this->system->parameters["plugins"]) { $this->template->plugins = array(); foreach ($this->system->parameters["plugins"] as $plugin) { if (in_array("context", $plugin["integration"])) { $this->template->plugins[] = $plugin; } } } $this->template->render(); }