/** * Makes the code for the foldericon in the top * * @param array $pathInfo Path info array: $pathInfo = tx_dam::path_getInfo($path) * @param boolean $browsable If set the path is browsable to navigate into the folders. * @param string $allowedIcons Comma list that defines the icons to display. * @return string HTML code */ function getFolderNavBar($pathInfo, $browsable = true, $allowedIcons = NULL) { global $BACK_PATH, $LANG; if (is_array($pathInfo)) { $allowedIcons = is_null($allowedIcons) ? 'up,refresh' : $allowedIcons; $allowedIcons = is_array($allowedIcons) ? $allowedIcons : t3lib_div::trimExplode(',', $allowedIcons, TRUE); $allowedIcons = array_diff($allowedIcons, $this->guiCmdIconsDeny); // refresh button if ($browsable and in_array('refresh', $allowedIcons)) { $icon = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/refresh_n.gif', 'width="14" height="14"') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.reload', 1) . '" class="absmiddle" alt="" />'; $elements['refresh'] = '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('unique' => uniqid('tx_dam_scbase')))) . '">' . $icon . '</a>'; //$elements['refreshSpacer'] = '<span class="spacer05em"><span>'; } // folder up button if ($browsable and in_array('up', $allowedIcons) and $pathInfo['mount_id'] and strcmp($pathInfo['mount_path'], $pathInfo['dir_path_absolute'])) { $icon = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/i/folder_up.gif', 'width="18" height="16"') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.upOneLevel', 1) . '" class="absmiddle" alt="" />'; $elements['up'] = '<a href="' . htmlspecialchars(t3lib_div::linkThisScript(array('SET[tx_dam_folder]' => dirname($pathInfo['dir_path_absolute'])))) . '">' . $icon . '</a>'; } $iconFolder = tx_dam::icon_getFolder($pathInfo); $elements['icon'] = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, $iconFolder, 'width="18" height="16"') . ' alt="" />'; $elements['path'] = tx_dam_guiFunc::getPathBreadcrumbMenu($pathInfo, $browsable, $maxLength = 35); $this->markers['REFRESH'] .= $elements['refresh']; $this->markers['LEVEL_UP'] .= $elements['up']; $this->markers['FOLDER_INFO'] .= $elements['path']; $this->markers['PAGE_ICON'] .= $elements['icon']; } return ''; }
/** * Makes the code for the foldericon in the top * * @param array $pathInfo Path info array: $pathInfo = tx_dam::path_getInfo($path) * @param integer $maxLength Maximum Text length * @return string HTML code */ function getFolderInfoBar($pathInfo, $maxLength = 55) { global $BACK_PATH, $LANG; if (is_array($pathInfo)) { $iconFolder = tx_dam::icon_getFolder($pathInfo); $elements['icon'] = '<img' . t3lib_iconWorks::skinImg($BACK_PATH, $iconFolder, 'width="18" height="16"') . ' alt="" />'; $elements['path'] = tx_dam_guiFunc::getPathBreadcrumbMenu($pathInfo, false, $maxLength); $out = ' <!-- Page header for file list --> <table border="0" cellpadding="0" cellspacing="0" id="typo3-pathBreadcrumbBar"> <tr><td>' . implode('</td><td>', $elements) . '</td></tr> </table>'; } return $out; }