Current Path :
/
home
/
develito
/
www
/
components
/
com_abook
/
layouts
/
category
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/develito/www/components/com_abook/layouts/category/item.php
<?php /** * @package Joomla * @subpackage Abook * @copyright (C) 2010-2019 Federica Ugolotti * @license GNU/GPL, see LICENSE.php * Abook is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License 3 * as published by the Free Software Foundation. * Abook is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with Abook; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ defined('_JEXEC') or die; $item=$displayData['item']; $params=$displayData['params']; ?> <?php $linkbook=JRoute::_(AbookHelperRoute::getBookRoute($item->slug, $item->slugcat));?> <tr> <?php if ($params->get( 'show_bookimage', 1) == 1 && $params->get( 'catbookcover_position', 'left') == 'left'){ ?> <td width="100px"> <div class="img-intro-left cover"> <?php if ($item->image){ ?> <a href="<?php echo $linkbook; ?>" title="<?php echo JText::_('COM_ABOOK_COVEROF').' '.$item->title; ?>"><img class="img-polaroid" src="<?php echo $item->image ?>" alt="<?php echo JText::_('COM_ABOOK_COVEROF').' '.$item->title ;?>"/></a> <?php }else{ ?> <a href="<?php echo $linkbook; ?>" title="<?php echo JText::_('COM_ABOOK_NOCOVEROF').' '.$item->title; ?>"><img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="<?php echo JText::_('COM_ABOOK_NOCOVEROF').' '.$item->title; ?>" /></a> <?php }?> </div> </td> <?php }?> <td> <h3 class="book-title"> <?php if ($params->get( 'link_titles', 1) == 1){ ?> <a href="<?php echo $linkbook; ?>"><?php echo $item->title; ?> <?php if ($item->subtitle){?> <p><small><?php echo $item->subtitle; ?></small></p> <?php }?> </a> <?php }else{ ?> <?php echo $item->title; ?> <p><small><?php echo $item->subtitle; ?></small></p> <?php }?> </h3> <?php if ($params->get( 'show_pag_index',0 )==1 && $item->pag_index > 0) { ?> <div><label><?php echo JText::_('COM_ABOOK_PAG_INDEX') ." "; ?></label> <?php echo $item->pag_index; ?> </div> <?php } ?> <?php $n=count($item->authors); if ($n > 0 && $params->get('show_author', 1)){ ?> <div><?php echo $item->editedby==1 ? JText::_('COM_ABOOK_EDITED_BY')." " : JText::_('COM_ABOOK_BY')." "; foreach($item->authors as $k=>$author) { $link=JRoute::_(AbookHelperRoute::getAuthorRoute($author->slugauthor)); echo '<a href="'.$link.'">'.$author->author.'</a>'; if ($k!=$n-1) echo ', '; ?> <?php } ?> </div> <?php } ?> <?php if ($params->get( 'view_rate',1 )==1) { ?> <?php echo JHTML::_('icon.votebook', $item, $item->vote);?> <?php } ?> <?php if ($params->get( 'show_year',1 )==1 || $params->get( 'show_bookcat', 1 )==1||$params->get( 'show_cat_tags', 1 )==1||$params->get( 'show_hits',1 )==1||$params->get( 'view_rate',1 )==1||$params->get( 'display_category_comments',1 ) == 1 || $params->get( 'show_bookcatalog', 1 )==1){?> <dl> <?php if ($item->catalogo !='' && $params->get( 'show_bookcatalog', 1 )==1) { ?> <dd><span class="icon-list"></span> <?php echo JText::_('COM_ABOOK_CATALOG') .": "; ?> <?php echo $item->catalogo; ?></dd> <?php } ?> <?php if ($item->year > 0 && $params->get( 'show_year',1 )==1) { ?> <dd><span class="icon-calendar"></span> <?php echo JText::_('COM_ABOOK_YEAR') .": "; ?> <?php echo $item->year; ?></dd> <?php } ?> <?php if ($params->get( 'show_bookcat', 1 )==1){ $link2 = JRoute::_(AbookHelperRoute::getCategoryRoute($item->slugcat));?> <dd><span class="icon-folder-open"></span> <?php echo JText::_('COM_ABOOK_CATEGORY') .': ';?> <a href="<?php echo $link2;?>"><?php echo $item->cattitle;?></a></dd> <?php } ?> <?php if ($params->get( 'show_hits',1 )==1) { ?> <dd><span class="icon-eye-open"></span> <?php echo JText::_('COM_ABOOK_HITS') .": "; ?> <?php echo $item->hits; ?> </dd> <?php } ?> <?php if ($params->get( 'show_file',0 )==1 && $item->file != '') { ?> <dd><span class="icon-file"></span> <a href="images/<?php echo $params->get('file_path').'/'.$item->file;?>"><?php echo JText::_('COM_ABOOK_FILE');?></a></dd> <?php } ?> <?php if ($params->get( 'show_bookdesc', 1 )==1){ ?> <dd><div><?php echo substr(strip_tags($item->description), 0, 100);?></div></dd> <?php } ?> <?php if ($params->get('show_cat_tags', 1) && !empty($item->tags)) : ?> <?php $item->tagLayout = new JLayoutFile('book.tags'); ?> <dd><?php echo $item->tagLayout->render($item->tags); ?></dd> <?php endif; ?> <?php if ($params->get( 'display_category_comments',1 ) == 1) { //$jcomments_isenabled=JComponentHelper::getComponent('com_jcomments', true); $jcomments_plugin=JFile::exists(JPATH_BASE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_jcomments'.DIRECTORY_SEPARATOR.'jcomments.php'); if ($jcomments_plugin) { include_once(JPATH_BASE.DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_jcomments'.DIRECTORY_SEPARATOR.'jcomments.php'); $count = JComments::getCommentsCount($item->id, 'com_abook'); echo '<dd><span class="icon-comment"></span> <a href="'.$linkbook.'">'; echo $count ? JText::_('COM_ABOOK_COMMENT').' <span class="badge">'. $count . '</span>' : JText::_('COM_ABOOK_COMMENT').' <span class="badge">0</span>'; echo '</a></dd>'; } }?> <?php if($params->get( 'view_date', 1 )==1){?> <dd><span class="muted"> <span class="icon-calendar"></span> <?php echo JText::_('COM_ABOOK_DATE_INSERT');?>: <?php echo JHTML::_('date', $item->dateinsert, JText::_('DATE_FORMAT_LC1')) ?> </span></dd> <?php } ?> </dl> <?php } ?> </td> <?php if ($params->get( 'show_bookimage', 1) == 1 && $params->get( 'catbookcover_position', 'left') == 'right'){ ?> <td width="100px"> <div class="img-intro-right cover"> <?php if ($item->image){ ?> <a href="<?php echo $linkbook; ?>" title="<?php echo JText::_('COM_ABOOK_COVEROF').' '.$item->title; ?>"><img class="img-polaroid" src="<?php echo $item->image ?>" alt="<?php echo JText::_('COM_ABOOK_COVEROF').' '.$item->title ;?>"/></a> <?php }else{ ?> <a href="<?php echo $linkbook; ?>" title="<?php echo JText::_('COM_ABOOK_NOCOVEROF').' '.$item->title; ?>"><img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="<?php echo JText::_('COM_ABOOK_NOCOVEROF').' '.$item->title; ?>" /></a> <?php }?> </div> </td> <?php }?> </tr>