예제 #1
0
 /**
  * Create new subfolder in current parent folder.
  *
  * @return void
  */
 public function newFolder()
 {
     $app = JFactory::getApplication();
     $success = JoomDOCFileSystem::newFolder();
     if ($success && JRequest::getInt('doccreate')) {
         $this->setRedirect(JoomDOCRoute::addDocument($app->getUserState('com_joomdoc.new.folder')));
     } else {
         $this->setRedirect(JoomDOCRoute::viewDocuments(JoomDOCRequest::getPath(), false));
     }
 }
예제 #2
0
            } else {
                echo $item->document->ordering;
            }
            echo '</td>';
            echo '<td class="center">' . $this->escape($item->document->access_title) . '</td>';
            echo '<td class="center">' . JoomDOCHelper::number($item->document->id) . '</td>';
        } else {
            echo '<td colspan="6">';
            if ($access->canCreate && !$access->isTrashed) {
                if (JOOMDOC_ISJ3) {
                    //jui button
                    echo '<a href="' . JRoute::_(JoomDOCRoute::addDocument($access->relativePath)) . '" class="hasTip " style="display:block; width: 100%; text-align: center;" title="' . $this->getTooltip('JOOMDOC_ADD_DOCUMENT') . '">
        				<span class="btn btn-smaller" style="float:left"><i class="icon-plus-2"></i></span>
        				' . JText::_('JOOMDOC_NO_METADATA') . '</a>';
                } else {
                    echo '<a href="' . JRoute::_(JoomDOCRoute::addDocument($access->relativePath)) . '" class="hasTip addDocument" style="padding-left: 23px; padding-right: 0px; width: 100%; text-align: center;" title="' . $this->getTooltip('JOOMDOC_ADD_DOCUMENT') . '">' . JText::_('JOOMDOC_NO_METADATA') . '</a>';
                }
            }
            echo '</td>';
        }
        echo '<td class="center">' . JoomDOCHelper::number($item->hits) . '</td>';
        echo '</tr>';
        $i++;
    }
    if (empty($files) && empty($folders)) {
        echo '<tr><td colspan="20">' . JText::_('JOOMDOC_EMPTY_FOLDER') . '</td></tr>';
    }
    echo '</tbody>';
    echo '</table>';
} elseif ($config->docLayout == 1) {
    // Simple list layout.