Exemple #1
0
        $url = JoomDOCRoute::viewDocuments($access->relativePath, $access->alias);
    } elseif ($moduleConfig->link_type == 'download' && $access->canDownload) {
        // download link is displayed only if file can be download in ACL setting
        $url = JoomDOCRoute::download($access->relativePath, $access->alias);
    } else {
        $url = null;
    }
    if ($url) {
        echo '<a href="' . JRoute::_($url) . '" title="">' . ($access->docid ? $item->document->title : $item->getFileName()) . '</a>';
    } else {
        // Name is displayed as document title or file path.
        echo $access->docid ? $item->document->title : $item->getFileName();
    }
    if ($moduleConfig->show_filesize) {
        echo '<strong>' . JText::sprintf('JOOMDOC_MODULE_FILESIZE', JoomDOCFileSystem::getFileSize($access->absolutePath)) . '</strong>';
    }
    if ($moduleConfig->show_listfields) {
        echo '<table class="fields"><tbody>';
        foreach ($listFields as $field) {
            if ($value = JHtml::_('joomdoc.showfield', $field, $item->document)) {
                echo '<tr><th>' . $field->title . ':</th><td>' . $value . '</td></tr>';
            }
        }
        echo '</tbody></table>';
    }
    if ($moduleConfig->show_text && $access->docid && ($description = JString::trim($item->document->description))) {
        echo '<p>' . JoomDOCString::crop($description, $moduleConfig->crop_length) . '</p>';
    }
    echo '</li>';
}
echo '</ul></div>';
Exemple #2
0
             echo '<span class="modified">' . JText::sprintf('JOOMDOC_MODIFIED', JHtml::date($item->document->modified, JText::_('JOOMDOC_UPLOADED_DATE_J16'))) . '</span>';
         }
     }
     if ($config->showHits && !$access->isFolder) {
         echo '<span class="hits">' . JText::sprintf('JOOMDOC_HITS_INFO', JoomDOCHelper::number($item->hits)) . '</span>';
     }
     foreach ($this->listfields as $field) {
         if ($value = JHtml::_('joomdoc.showfield', $field, $item->document)) {
             echo '<span class="field">' . $field->title . ': ' . $value . '</span>';
         }
     }
     echo '<div class="clr"></div>';
     echo '</div>';
 }
 if ($access->docid && ($description = JString::trim($item->document->description)) && ($this->access->canShowAllDesc || $access->isFolder && $config->showFolderDesc || $access->isFile && $config->showFileDesc)) {
     echo '<p>' . JoomDOCString::crop($description, 200) . '</p>';
 }
 if ($config->showLicense && $access->licenseID && $access->isFile) {
     echo '<a class="modal license" rel="{handler: \'iframe\', size: {x: 800, y: 600}, onClose: function() {}}" href="' . JoomDOCRoute::viewLicense($access->licenseID, $access->licenseAlias) . '">' . JText::sprintf('JOOMDOC_ITEM_LICENSE', $access->licenseTitle) . '</a>';
 }
 if ($access->canOpenFolder || $access->canOpenFile || $access->canDeleteDoc || $access->canEdit || $access->canCreate || $access->canDeleteFile || $access->canDownload) {
     echo '<div class="toolbar">';
     if ($config->showOpenFolder && $access->isFolder) {
         echo '<a class="open" href="' . $viewDocuments . '" title="">' . JText::_('JOOMDOC_DISPLAY_FOLDER') . '</a>';
     }
     if ($config->showOpenFile && $access->isFile) {
         echo '<a class="open" href="' . $viewDocuments . '" title="">' . JText::_('JOOMDOC_DISPLAY_FILE') . '</a>';
     }
     if ($config->showDownloadFile && $access->canDownload) {
         if ($access->licenseID) {
             echo '<a class="modal download" rel="{handler: \'iframe\', size: {x: ' . JOOMDOC_LIGHTBOX_WIDTH . ', y: ' . JOOMDOC_LIGHTBOX_HEIGHT . '}, onClose: function() {}}" href="' . JoomDOCRoute::viewLicense($access->licenseID, $access->licenseAlias, $access->relativePath, $access->alias) . '">' . JText::_('JOOMDOC_DOWNLOAD_FILE') . '</a>';