protected function _setBreadcrumb() { $app = JFactory::getApplication(); $pathway = $app->getPathway(); $pathwayArray = array(); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::getRootPathway(); $linkLicense = JRoute::_(JUDownloadHelperRoute::getLicenseRoute($this->item->id)); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->item->title, $linkLicense); $pathway->setPathway($pathwayArray); }
protected function _setBreadcrumb() { $app = JFactory::getApplication(); $pathway = $app->getPathway(); $pathwayArray = array(); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::getRootPathway(); $linkTopComments = JRoute::_(JUDownloadHelperRoute::getTopCommentsRoute()); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->getName(), $linkTopComments); $pathway->setPathway($pathwayArray); }
protected function _setBreadcrumb() { $app = JFactory::getApplication(); $pathway = $app->getPathway(); $pathwayArray = array(); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::getRootPathway(); $linkMaintenance = JRoute::_(JUDownloadHelperRoute::getMaintenanceRoute(true), false); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->getName(), $linkMaintenance); $pathway->setPathway($pathwayArray); }
public function search() { JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); $app = JFactory::getApplication(); $searchWord = $app->input->post->getString('searchword', ''); $cat_id = $app->input->post->getInt('cat_id', 0); $sub_cat = $app->input->post->getInt('sub_cat', 0); $searchWord = JUDownloadFrontHelper::UrlEncode($searchWord); $this->setRedirect(JRoute::_(JUDownloadHelperRoute::getSearchRoute($cat_id, $sub_cat, $searchWord), false)); }
protected function _prepareDocument() { $uri = clone JUri::getInstance(); $domain = $uri->toString(array('scheme', 'host', 'port')); $canonicalLink = $domain . JRoute::_(JUDownloadHelperRoute::getDownloadErrorRoute(true, $this->_layout), false); JUDownloadFrontHelper::setCanonical($canonicalLink); $seoData = array( "metatitle" => JText::_('COM_JUDOWNLOAD_SEO_TITLE_DOWNLOAD_ERROR'), "metadescription" => "", "metakeyword" => "" ); JUDownloadFrontHelperSeo::seo($this, $seoData); }
public function display($cachable = false, $urlparams = false) { $app = JFactory::getApplication(); $cachable = true; $id = $app->input->getInt('id', 0); $vName = $app->input->getCmd('view', 'categories'); $app->input->set('view', $vName); $user = JFactory::getUser(); if ($user->get('id') || ($_SERVER['REQUEST_METHOD'] == 'POST' && (($vName == 'category' && $app->input->get('layout') != 'blog') || $vName == 'archive')) ) { $cachable = false; } $safeurlparams = array('catid' => 'INT', 'id' => 'INT', 'cid' => 'ARRAY', 'year' => 'INT', 'month' => 'INT', 'limit' => 'UINT', 'limitstart' => 'UINT', 'showall' => 'INT', 'return' => 'BASE64', 'filter' => 'STRING', 'filter_order' => 'CMD', 'filter_order_Dir' => 'CMD', 'filter-search' => 'STRING', 'print' => 'BOOLEAN', 'lang' => 'CMD', 'Itemid' => 'INT'); $params = JUDownloadHelper::getParams(); if (!$user->authorise('core.admin', 'com_judownload') && $params->get('activate_maintenance', 0) && $app->input->getString('view', '') != 'maintenance') { $this->setRedirect(JUDownloadHelperRoute::getMaintenanceRoute()); } if ($vName == 'form' && $id > 0 && !$this->checkEditId('com_judownload.edit.document', $id)) { return JError::raiseError(403, JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); } parent::display($cachable, $safeurlparams); return $this; }
protected function _setBreadcrumb() { $categoryId = JUDownloadFrontHelperCategory::getMainCategoryId($this->item->id); $app = JFactory::getApplication(); $pathway = $app->getPathway(); $pathwayArray = array(); if ($categoryId) { $pathwayArray = JUDownloadFrontHelperBreadcrumb::getBreadcrumbCategory($categoryId); } else { $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::getRootPathway(); } $linkDocument = JRoute::_(JUDownloadHelperRoute::getDocumentRoute($this->item->id)); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->item->title, $linkDocument); if ($this->_layout == 'changelogs') { $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem('CHANGELOGS'); } elseif ($this->_layout == 'versions') { $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem('VERSIONS'); } elseif ($this->_layout == 'print') { $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem('PRINT'); $document = JFactory::getDocument(); $document->setMetaData('robots', 'noindex, nofollow'); } $pathway->setPathway($pathwayArray); }
public static function parsePagination(&$vars, $segments, $params) { $endSegment = end($segments); $isPaged = preg_match('/' . preg_quote(JApplication::stringURLSafe($params->get('sef_page', 'page')) . '-') . '[0-9]*+/', $endSegment); if ($isPaged) { $limit = JUDownloadHelperRoute::getLimit($vars['view']); $page = $endSegment; $pageNumber = substr($page, strlen(JApplication::stringURLSafe($params->get('sef_page', 'page')) . '-')); $vars['limitstart'] = $limit * ($pageNumber - 1); return true; } return false; }
<?php /** * ------------------------------------------------------------------------ * JUDownload for Joomla 2.5, 3.x * ------------------------------------------------------------------------ * * @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author JoomUltra Co., Ltd * @website http://www.joomultra.com * @----------------------------------------------------------------------@ */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); $html = array(); foreach ($value AS $category) { $html[] = '<a href="' . JRoute::_(JUDownloadHelperRoute::getCategoryRoute($category->id)) . '">' . $category->title . '</a>'; } $this->setAttribute("style", "display: inline;", "output"); echo '<div ' . $this->getAttribute(null, null, "output") . '>'; echo implode("<span>, </span>", $html); echo '</div>'; ?>
<div class="display-number"><?php echo JText::_('COM_JUDOWNLOAD_PAGINATION_DISPLAY'); ?></div> <?php echo $this->pagination->getLimitBox(); ?> </div> </div> </div> </div> <div class="container-fluid"> <div class="row"> <?php foreach ($this->items AS $key => $item) { ?> <div class="col-md-6"> <i class="fa fa-tag"></i> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getTagRoute($item->id)); ?>"> <?php echo $item->title; ?><span> (<?php echo $item->total_documents; ?>)</span></a> </div> <?php $key++; if (($key % 2) == 0 && $key < count($this->items)) { ?> </div> <div class="row"> <?php } ?> <?php } ?> </div>
defined('_JEXEC') or die('Restricted access'); $this->setAttribute("src", $icon_src, "output"); $this->setAttribute("alt", $this->doc->title, "output"); $this->setAttribute("title", $this->doc->title, "output"); if ($isDetailsView) { if ($this->params->get("details_view_set_icon_dimension", 1)) { $this->setAttribute("style", 'display: block; max-width:' . $this->params->get("details_view_icon_width", 100) . 'px; max-height:' . $this->params->get("details_view_icon_height", 100) . 'px;', "output"); } $html = '<img ' . $this->getAttribute(null, null, "output") . ' />'; echo $html; } else { $html = '<a href="' . JRoute::_(JUDownloadHelperRoute::getDocumentRoute($this->doc->id)) . '">'; if ($this->params->get("list_view_set_icon_dimension", 1)) { $this->setAttribute("style", 'display: block; max-width:' . $this->params->get("details_view_icon_width", 100) . 'px; max-height:' . $this->params->get("details_view_icon_height", 100) . 'px;', "output"); } $html .= '<img ' . $this->getAttribute(null, null, "output") . ' />'; $html .= '</a>'; echo $html; } ?>
<div class="display-number"><?php echo JText::_('COM_JUDOWNLOAD_PAGINATION_DISPLAY'); ?></div> <?php echo $this->pagination->getLimitBox(); ?> </div> </div> </div> </div> <div class="container-fluid"> <div class="row-fluid"> <?php foreach ($this->items AS $key => $item) { ?> <div class="span6"> <i class="fa fa-tag"></i> <a href="<?php echo JRoute::_('index.php?option=com_judownload&view=tag&id=' . $item->id . '&Itemid=' . JUDownloadHelperRoute::findItemId(array('tag' => array($item->id)))); ?>"> <?php echo $item->title; ?><span> (<?php echo $item->total_documents; ?>)</span></a> </div> <?php $key++; if (($key % 2) == 0 && $key < count($this->items)) { ?> </div> <div class="row-fluid"> <?php } ?> <?php } ?> </div>
} } ?> <a href="<?php echo JRoute::_('index.php?option=com_judownload&task=modpendingcomment.edit&id=' . $item->id); ?>"> <?php echo $item->title; ?> </a> </td> <td> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->doc_id)); ?>"> <?php echo $item->document_title; ?></a> <?php if ($item->level > 1) { ?> <span class="divider"> > </span> <a target="_blank" href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->doc_id)) . "#comment-item-" . $item->parent_id; ?>"> <?php echo $item->parent_title; ?></a> <?php } ?> </td> <td> <?php if ($item->user_id > 0) { $userComment = JFactory::getUser($item->user_id); echo $userComment->get('name'); } else { echo $item->guest_name; }
public function getDisqus($doc_id, $short_name = '') { if ($short_name == '') { $params = JUDownloadHelper::getParams(null, $doc_id); $short_name = $params->get('disqus_username', ''); } $documentObj = JUDownloadHelper::getDocumentById($doc_id); $documentUrl = JUDownloadHelperRoute::getDocumentRoute($doc_id); $script = " var disqus_shortname = '{$short_name}'; var disqus_identifier = 'id={$doc_id}'; var disqus_title = '{$documentObj->title}'; var disqus_url = '{$documentUrl}'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();"; $document = JFactory::getDocument(); $document->addScriptDeclaration($script); }
</a> <?php } else { ?> <?php echo str_repeat('<span class="gi">—</span>', $item->level); ?> <?php echo $item->title; ?> <?php } ?> <?php if ($item->level == 1 && JUDownloadHelperRoute::findItemId(array('tree' => array($item->id)))) { ?> <span class="btn btn-mini"><i class="icon-home"></i></span> <?php } if ($item->level == 1 && $item->config_params) { ?> <span class="btn btn-mini"><i class="icon-cog hasTooltip" title="<?php echo JText::_('COM_JUDOWNLOAD_OVERRIDE_CONFIG'); ?> "></i></span> <?php } ?> <p class="small"><?php
public function delete() { JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); $cid = JFactory::getApplication()->input->get('id', array(), 'array'); if (!is_array($cid) || count($cid) < 1) { JError::raiseWarning(500, JText::_('COM_JUDOWNLOAD_NO_ITEM_SELECTED')); $this->setRedirect($this->getReturnPage()); } else { $model = $this->getModel(); jimport('joomla.utilities.arrayhelper'); JArrayHelper::toInteger($cid); if ($model->delete($cid)) { $this->setMessage(JText::plural($this->text_prefix . '_N_ITEMS_DELETED', count($cid))); } else { $this->setMessage($model->getError()); } $isDocumentPublished = JUDownloadFrontHelperDocument::isDocumentPublished($cid[0]); if ($isDocumentPublished) { $mainCategoryId = JUDownloadFrontHelperCategory::getMainCategoryId($cid[0]); $this->setRedirect(JRoute::_(JUDownloadHelperRoute::getCategoryRoute($mainCategoryId), false)); } else { $this->setRedirect($this->getReturnPage()); } } }
public static function getRootPathway() { $app = JFactory::getApplication(); $menus = $app->getMenu('site'); $categoryRoot = JUDownloadFrontHelperCategory::getRootCategory(); $needles = array( 'tree' => array((int) $categoryRoot->id) ); $findMenuTreeRoot = JUDownloadHelperRoute::findItemId($needles, true); $rootPathway = new stdClass; if ($findMenuTreeRoot) { $menuTreeRoot = $menus->getItem($findMenuTreeRoot); $rootPathway->name = $menuTreeRoot->title; $rootPathway->link = JRoute::_($menuTreeRoot->link); } else { $rootPathway->name = html_entity_decode(JText::_('COM_JUDOWNLOAD_ROOT'), ENT_COMPAT, 'UTF-8'); $rootPathway->link = JUDownloadHelperRoute::getTreeRoute($categoryRoot->id); } return $rootPathway; }
public function updateComment() { JSession::checkToken() or die(JText::_('JINVALID_TOKEN')); $user = JFactory::getUser(); $model = $this->getModel(); $app = JFactory::getApplication(); $data = $app->input->getArray($_POST); $documentId = $data['doc_id']; $commentId = $data['comment_id']; $canEditComment = JUDownloadFrontHelperPermission::canEditComment($commentId); $redirectUrl = JRoute::_(JUDownloadHelperRoute::getDocumentRoute($documentId) . '#comment-item-' . $commentId); if (!$canEditComment) { $this->setMessage(JText::_('COM_JUDOWNLOAD_UPDATE_COMMENT_ERROR')); $this->setRedirect($redirectUrl); return false; } $params = JUDownloadHelper::getParams(null, $documentId); $ratingValue = $this->validateCriteria($data); if ($ratingValue) { $data = array_merge($data, $ratingValue); } else { $this->setMessage(JText::_('COM_JUDOWNLOAD_UPDATE_COMMENT_ERROR')); $this->setRedirect($redirectUrl); return false; } JUDownloadHelper::obCleanData(); if ($model->updateComment($data, $params)) { $logData = array( 'user_id' => $user->id, 'event' => 'comment.edit', 'item_id' => $commentId, 'doc_id' => $documentId, 'value' => 0, 'reference' => '', ); JUDownloadFrontHelperLog::addLog($logData); $this->setMessage(JText::_('COM_JUDOWNLOAD_UPDATE_COMMENT_SUCCESSFULLY')); $this->setRedirect($redirectUrl); return true; } else { $this->setMessage(JText::_('COM_JUDOWNLOAD_UPDATE_COMMENT_ERROR')); $this->setRedirect($redirectUrl); return false; } }
public function getSubCategories($parentId, $ordering = 'title', $direction = 'ASC') { $params = $this->getState('params'); $showEmptyCategory = $params->get('show_empty_subcategory', 1); $user = JFactory::getUser(); $levels = $user->getAuthorisedViewLevels(); $levelsStr = implode(',', $levels); $db = JFactory::getDbo(); $nullDate = $db->getNullDate(); $nowDate = JFactory::getDate()->toSql(); $query = $db->getQuery(true); $query->select('*'); $query->from('#__judownload_categories'); $query->where('parent_id=' . $parentId); $query->where('published = 1'); $query->where('(publish_up = ' . $db->quote($nullDate) . ' OR publish_up <= ' . $db->quote($nowDate) . ')'); $query->where('(publish_down = ' . $db->quote($nullDate) . ' OR publish_down >= ' . $db->quote($nowDate) . ')'); $query->where('access IN (' . $levelsStr . ')'); $app = JFactory::getApplication(); $tag = JFactory::getLanguage()->getTag(); if ($app->getLanguageFilter()) { $query->where('language IN (' . $db->quote($tag) . ',' . $db->quote('*') . ',' . $db->quote('') . ')'); } $query->order($ordering . ' ' . $direction); $db->setQuery($query); $subCategoriesBefore = $db->loadObjectList(); $subCategoriesAfter = array(); foreach ($subCategoriesBefore AS $category) { $showTotalSubCats = $params->get('show_total_subcats_of_subcat', 0); $showTotalChildDocs = $params->get('show_total_docs_of_subcat', 0); $nestedCategories = null; if ($showTotalChildDocs || $showTotalSubCats) { $nestedCategories = JUDownloadFrontHelperCategory::getCategoriesRecursive($category->id, true, true, true, false, false, true); if ($showTotalChildDocs) { $category->total_documents = JUDownloadFrontHelperCategory::getTotalDocumentsInCategory($category->id, $nestedCategories); } if ($showTotalSubCats) { $category->total_nested_categories = JUDownloadFrontHelperCategory::getTotalSubCategoriesInCategory($category->id, $nestedCategories); } } $registry = new JRegistry; $registry->loadString($category->images); $category->images = $registry->toObject(); $category->link = JRoute::_(JUDownloadHelperRoute::getCategoryRoute($category->id)); if (!$showEmptyCategory) { if (is_null($nestedCategories)) { $nestedCategories = JUDownloadFrontHelperCategory::getCategoriesRecursive($category->id, true, true, true, false, false, true); } if (!isset($category->total_nested_categories)) { $category->total_nested_categories = JUDownloadFrontHelperCategory::getTotalSubCategoriesInCategory($category->id, $nestedCategories); } if (!isset($category->total_documents)) { $category->total_documents = JUDownloadFrontHelperCategory::getTotalDocumentsInCategory($category->id, $nestedCategories); } if (($category->total_nested_categories > 0) || ($category->total_documents > 0)) { $subCategoriesAfter[] = $category; } } else { $subCategoriesAfter[] = $category; } } return $subCategoriesAfter; }
protected function _prepareDocument() { $uri = clone JUri::getInstance(); $domain = $uri->toString(array('scheme', 'host', 'port')); $canonicalLink = $domain . JRoute::_(JUDownloadHelperRoute::getCategoryRoute($this->category->id, null, false, $this->_layout), false); JUDownloadFrontHelper::setCanonical($canonicalLink); $this->item = $this->category; JUDownloadFrontHelperSeo::seo($this); }
<?php /** * ------------------------------------------------------------------------ * JUDownload for Joomla 2.5, 3.x * ------------------------------------------------------------------------ * * @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author JoomUltra Co., Ltd * @website http://www.joomultra.com * @----------------------------------------------------------------------@ */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); ?> <div class="judl-cat clearfix"> <h2 class="cat-title"><?php echo JText::sprintf('COM_JUDOWNLOAD_LIST_ALL_DOCUMENTS', $this->category->title); ?></h2> </div> <div class="clearfix"> <a class="btn btn-primary btn-mini pull-left" href="#" onclick="javascript:jQuery('.filter-form').slideToggle('300'); return false;"> <i class="fa fa-filter"></i> <?php echo JText::_('COM_JUDOWNLOAD_FILTER'); ?> </a> <a class="btn btn-mini pull-right" href="<?php echo JUDownloadHelperRoute::getCategoryRoute($this->category->id); ?>"> <i class="fa fa-folder-open"></i> <?php echo JText::_('COM_JUDOWNLOAD_THIS_CATEGORY'); ?> </a> </div>
<?php /** * ------------------------------------------------------------------------ * JUDownload for Joomla 2.5, 3.x * ------------------------------------------------------------------------ * * @copyright Copyright (C) 2010-2015 JoomUltra Co., Ltd. All Rights Reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author JoomUltra Co., Ltd * @website http://www.joomultra.com * @----------------------------------------------------------------------@ */ // No direct access to this file defined('_JEXEC') or die('Restricted access'); if (!$isDetailsView) { $this->setAttribute("href", JRoute::_(JUDownloadHelperRoute::getDocumentRoute($this->doc_id)), "output"); echo '<a ' . $this->getAttribute(null, null, "output") . '>' . $value . '</a>'; } else { echo '<span ' . $this->getAttribute(null, null, "output") . '>' . $value . '</span>'; } ?>
// No direct access to this file defined('_JEXEC') or die('Restricted access'); $totalChangeLogs = count($this->item->changelogs); //Show the last changelog $changelogItem = $this->item->changelogs[0]; ?> <div class="changelogs clearfix"> <h3 class="title"> <?php echo JText::_('COM_JUDOWNLOAD_CHANGELOGS'); ?> <?php if ($totalChangeLogs > 1) { ?> <span class="see-all"> <i class="fa fa-chevron-right"></i> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($this->item->id) . '&layout=changelogs'); ?>" class=""> <?php echo JText::_('COM_JUDOWNLOAD_SEE_COMPLETE_CHANGELOGS'); ?> </a> </span> <?php } ?> </h3> <div class="changelogs-wrapper"> <div class="changelog-row"> <div class="changelog-head"> <span class="changelog-version"><i class="fa fa-info-circle"></i> <?php echo "<span>" . JText::_('COM_JUDOWNLOAD_FIELD_VERSION') . ":</span> " . $changelogItem->version; ?></span>
<?php if (count($this->categories) > 0) { ?> <div class="judl-category-list"> <h2 class="title"><?php echo JText::_('COM_JUDOWNLOAD_CATEGORIES'); ?></h2> <ul> <?php foreach ($this->categories AS $key => $category) { ?> <li> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getCategoryRoute($category->id)); ?>"> <?php echo $category->title ?> </a> </li> <?php } ?> </ul> </div> <?php } ?> <?php if (count($this->items)) { echo $this->loadTemplate('documents'); }
protected function _setBreadcrumb() { $app = JFactory::getApplication(); $jInput = $app->input; $parent_cat_id = $jInput->getInt('parent_cat_id', 0); $pathway = $app->getPathway(); $pathwayArray = array(); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::getRootPathway(); $linkSearch = JRoute::_(JUDownloadHelperRoute::getSearchRoute()); $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->getName(), $linkSearch); if ($this->searchword) { $pathwayArray[] = JUDownloadFrontHelperBreadcrumb::createPathwayItem($this->searchword); } $pathway->setPathway($pathwayArray); }
public static function getItemId($needles = null) { require_once 'route.php'; $itemId = JUDownloadHelperRoute::findItemId($needles); return $itemId = '&Itemid=' . $itemId; }
?> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->doc_id) . '&limitstart=' . $limitStart . '&resetfilter=1' . '#comment-item-' . $item->id); ?>"> <?php echo $item->document_title; ?></a> <?php } elseif ($item->level > 1) { $parentCommentObject = JUDownloadFrontHelperComment::getCommentObject($item->parent_id, 'cm.id, cm.title'); $limitStart = $documentModel->getLimitStartForComment($parentCommentObject->id); ?> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->doc_id)); ?>"> <?php echo $item->document_title; ?> </a> <span> / </span> <a target="_blank" href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->doc_id) . '&limitstart=' . $limitStart . '&resetfilter=1' . '#comment-item-' . $parentCommentObject->id); ?>"> <?php echo $parentCommentObject->title; ?> </a> <?php } ?> </td> <td class="center"> <?php if ($item->user_id > 0) { $userComment = JFactory::getUser($item->user_id); echo $userComment->get('name'); } else {
<?php if (count($this->items) > 0) { foreach ($this->items AS $key => $value) { $type = $value->type; if ($type == 'document') { $title = $value->document_title; $linkDoc = JRoute::_(JUDownloadHelperRoute::getDocumentRoute($value->item_id)); } if ($type == 'comment') { $title = $value->comment_title; $linkDoc = JRoute::_(JUDownloadHelperRoute::getDocumentRoute($value->document_id)); } if ($this->isOwnDashboard) { $unsubscribeLink = JRoute::_('index.php?option=com_judownload&task=usersubscriptions.unsubscribe&sub_id=' . $value->id . '&' . $this->token . '=1'); } ?> <?php if ($title) { ?> <tr> <?php if ($this->isOwnDashboard) {?>
*/ // No direct access to this file defined('_JEXEC') or die('Restricted access'); ?> <?php if ($this->category->can_submit_doc && $this->params->get('show_submit_document_btn_in_category', 1)) { echo '<a class="hasTooltip btn" title="' . JText::_('COM_JUDOWNLOAD_ADD_DOCUMENT') . '" href="' . $this->category->submit_doc_link . '"><i class="fa fa-file-o"></i></a>'; } if ($this->show_feed) { ?> <a class="hasTooltip btn" href="<?php echo $this->rss_link; ?>" title="<?php echo JText::_('COM_JUDOWNLOAD_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>"> <i class="fa fa-rss"></i> </a> <?php } if ($this->category->id != 1) { ?> <a class="hasTooltip btn" href="<?php echo JRoute::_(JUDownloadHelperRoute::getCategoryRoute($this->category->parent_id)); ?>" title="<?php echo JText::_('COM_JUDOWNLOAD_UP_TO_PARENT_CATEGORY'); ?>"> <i class="fa fa-chevron-up"></i> </a> <?php } ?>
<?php if (is_array($this->items) && count($this->items)) { foreach ($this->items AS $i => $item) { $this->item = $item; $fields = JUDownloadFrontHelperField::getFields($item, null); ?> <tr> <td class="center"> <input type="checkbox" class="judl-cb" name="cid[]" value="<?php echo $item->id; ?>" id="judl-cb-<?php echo $i; ?>"/> </td> <td class="title"> <div class="title-wrapper"> <a href="<?php echo JRoute::_(JUDownloadHelperRoute::getDocumentRoute($item->id)); ?>" title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> <?php if ($item->label_unpublished) { ?> <span class="label label-unpublished"><?php echo JText::_('COM_JUDOWNLOAD_UNPUBLISHED'); ?></span> <?php } if ($item->label_pending) { ?> <span class="label label-pending"><?php echo JText::_('COM_JUDOWNLOAD_PENDING'); ?></span>