Current Path :
/
home
/
develito
/
httpdocs
/
components
/
com_abook
/
views
/
book
/
tmpl
/
Or
Select Your Path :
Upload File :
New :
File
Dir
/home/develito/httpdocs/components/com_abook/views/book/tmpl/default.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('Restricted access'); JHtml::addIncludePath(JPATH_COMPONENT.DIRECTORY_SEPARATOR.'helpers'); $pageClass = $this->params->get('pageclass_sfx'); ?> <div class="item-page<?php echo $this->escape($pageClass); ?>" itemscope itemtype="http://schema.org/Book"> <?php if ($this->params->def('show_page_heading', 1)) : ?> <div class="page-header"> <h1><?php echo $this->params->get( 'page_heading');?></h1> </div> <?php endif; ?> <?php if ($this->params->get( 'search', 1 )== 1 && !$this->print) { ?> <?php echo JHTML::_('icon.search');?> <div class="clr"></div> <?php } ?> <?php if ($this->params->get( 'breadcrumb', 1 )== 2 && !$this->print) { ?> <div class="abook-path"> <?php echo JHTML::_('icon.breadcrumb', $this->path);?> </div> <div class="clearfix"></div> <?php } ?> <?php if (!$this->print) : ?> <?php if ($this->params->get('show_print_icon') || $this->params->get('show_email_icon')) : ?> <div class="btn-group pull-right"> <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span class="icon-cog"></span> <span class="caret"></span> </a> <ul class="dropdown-menu actions"> <?php if ($this->params->get('show_print_icon')) : ?> <li class="print-icon"> <?php echo JHtml::_('icon.print_popup', $this->item, $this->params); ?> </li> <?php endif; ?> <?php if ($this->params->get('show_email_icon')) : ?> <li class="email-icon"> <?php echo JHtml::_('icon.email', $this->item, $this->params); ?> </li> <?php endif; ?> </ul> </div> <?php endif; ?> <?php else : ?> <div id="pop-print" class="btn hidden-print"> <?php echo JHtml::_('icon.print_screen', $this->item, $this->params); ?> </div> <?php endif; ?> <div class="page-header"> <h2 itemprop="name"><?php echo $this->item->title;?> <p><small><?php echo $this->item->subtitle;?></small></p> </h2> </div> <?php echo $this->item->event->afterDisplayTitle; ?> <?php echo $this->item->event->beforeDisplayContent; ?> <div class="row-fluid"> <?php if ($this->params->get('show_bookcover', 1) && $this->params->get('bookcover_position', 'left')=='left'){ ?> <div class="span4 col-md-4"> <div class="img-intro-left cover"> <?php if ($this->item->image){ if ($this->params->get('show_bookcover_link', 0) && $this->item->file!=''){ echo '<a href="images/'.$this->params->get('file_path').'/'.$this->item->file.'" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" target="_blank"> <img itemprop="image" class="img-polaroid" src="'.$this->item->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" /> </a>'; }else{ echo '<a href="'.$this->item->image.'" style="cursor: pointer;" class="modal" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'"> <img itemprop="image" class="img-polaroid" src="'.$this->item->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" /> </a>'; } }elseif($this->item->file!=''){ echo '<a href="images/'.$this->params->get('file_path').'/'.$this->item->file.'" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" target="_blank"> <img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="'.JText::_('COM_ABOOK_NOCOVEROF').'" /> </a>'; }else{ echo '<img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="'.JText::_('COM_ABOOK_NOCOVEROF').'" />'; } ?> </div> </div> <?php }?> <div class="span8 col"> <dl class="bookdetails"> <?php if ($this->params->get('show_category', 1)){ ?> <dd> <span class="icon-folder-open"></span> <strong><?php echo JText::_('COM_ABOOK_CATEGORY');?>: </strong> <a href="<?php echo AbookHelperRoute::getCategoryRoute($this->item->catslug);?>"><?php echo $this->item->category_title;?></a> </dd> <?php } ?> <?php $a=count($this->authors); if ($a > 0 && $this->params->get('show_author', 1)){?> <dd itemtype="http://schema.org/Person" itemscope itemprop="author"> <span class="icon-user"></span> <strong><?php echo $this->item->editedby==1 ? JText::_('COM_ABOOK_EDITED_BY')." " : JText::_('COM_ABOOK_AUTHOR');?>: </strong> <?php $n=count($this->authors); $k=0; foreach ($this->authors as $author){ $k=$k +1; $link = AbookHelperRoute::getAuthorRoute(!empty($author->alias) ? ($author->author_id.':'.$author->alias) : $author->author_id); echo '<a itemprop="url" href="' .$link .'"><span itemprop="name">' .$author->author_name .'</span></a>'; if ($n != $k) echo ", "; } ?> </dd> <?php } ?> <?php if ($this->item->editor_name!='' && $this->params->get('show_editor', 1)){ ?> <dd itemtype="http://schema.org/Organization" itemscope itemprop="publisher"> <span class="icon-briefcase"></span> <strong><?php echo JText::_('COM_ABOOK_EDITOR');?>: </strong><span itemprop="name"><?php echo $this->item->editor_name;?></span> </dd> <?php } ?> <?php if ($this->item->pag>0 && $this->params->get('show_pag', 1)){ ?> <dd> <strong><?php echo JText::_('COM_ABOOK_PAGES');?>: </strong><span itemprop="numberOfPages"><?php echo $this->item->pag;?></span> </dd> <?php } ?> <?php if ($this->item->price!=''){ ?> <dd itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <strong><?php echo JText::_('COM_ABOOK_PRICE');?>: </strong><span itemprop="price"><?php echo $this->item->price;?></span> </dd> <?php } ?> <?php if ($this->item->isbn!='' && $this->params->get('show_isbn', 1)){ ?> <dd> <strong><?php echo JText::_('COM_ABOOK_ISBN');?>: </strong><span itemprop="isbn"><?php echo $this->item->isbn;?></span> </dd> <?php } ?> <?php if ($this->item->issn!='' && $this->params->get('show_issn', 1)){ ?> <dd> <strong><?php echo JText::_('COM_ABOOK_ISSN');?>: </strong><span><?php echo $this->item->issn;?></span> </dd> <?php } ?> <?php if ($this->item->doi!='' && $this->params->get('show_doi', 1)){ ?> <dd> <span class="icon-bookmark"></span> <strong><?php echo JText::_('COM_ABOOK_DOI');?>: </strong><span><?php echo $this->item->doi;?></span> </dd> <?php } ?> <?php if ($this->item->numpublication!=0 && $this->params->get('show_numpublication', 1)){ ?> <dd> <strong><?php echo JText::_('COM_ABOOK_NUMPUBLICATION');?>: </strong><span><?php echo $this->item->numpublication;?></span> </dd> <?php } ?> <?php if ($this->item->library_name!='' && $this->params->get('show_library', 1)){ ?> <dd> <span class="icon-home"></span> <strong><?php echo JText::_('COM_ABOOK_LIBRARY');?>: </strong><?php echo $this->item->library_name;?> </dd> <?php } ?> <?php if ($this->item->location_name!='' && $this->params->get('show_location', 1)){ ?> <dd> <span class="icon-flag"></span> <strong><?php echo JText::_('COM_ABOOK_LOCATION');?>: </strong><span itemprop="contentLocation"><?php echo $this->item->location_name;?></span> </dd> <?php } ?> <?php if ($this->item->year!=0 && $this->params->get('show_year', 1)){ ?> <dd> <span class="icon-calendar"></span> <strong><?php echo JText::_('COM_ABOOK_YEAR');?>: </strong><span itemprop="copyrightYear"><?php echo $this->item->year;?></span> </dd> <?php } ?> <?php if ($this->item->catalogo!="" && $this->params->get('show_catalog', 1)){ ?> <dd> <strong><?php echo JText::_('COM_ABOOK_CATALOG');?>: </strong><?php echo $this->item->catalogo;?> </dd> <?php } ?> <?php if ($this->item->file!="" && in_array($this->params->get('allow_download'), $this->user->getAuthorisedViewLevels())){ ?> <dd> <span class="icon-file"></span> <strong><?php echo JText::_('COM_ABOOK_FILE');?>: </strong> <a href="images/<?php echo $this->params->get('file_path').'/'.$this->item->file;?>" target="_blank"><?php echo $this->filename; ?></a> </dd> <?php } ?> <?php if ($this->item->url!='' && ($this->params->get('linkto')==1)){ ?> <dd> <span class="icon-link"></span> <strong><?php echo JText::_('COM_ABOOK_LINK');?>: </strong> <a href="<?php echo $this->item->url;?>" target="_blank"><img src="components/com_abook/assets/images/link/<?php echo $this->params->get('linkimage');?>" alt="<?php echo JText::_('COM_ABOOK_LINK');?>" /> <?php echo $this->item->url_label;?></a> </dd> <?php } ?> <?php if ($this->item->note!='' && $this->params->get('show_note', 1)==1){ ?> <dd> <strong><span class="icon-info"></span> <?php echo JText::_('COM_ABOOK_NOTE');?>: </strong><?php echo $this->item->note;?> </dd> <?php } ?> </dl> </div> <?php if ($this->params->get('show_bookcover', 1) && $this->params->get('bookcover_position', 'left')=='right'){ ?> <div class="span4 col-md-4"> <div class="img-intro-right cover"> <?php if ($this->item->image){ if ($this->params->get('show_bookcover_link', 0) && $this->item->file!=''){ echo '<a href="images/'.$this->params->get('file_path').'/'.$this->item->file.'" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" target="_blank"> <img itemprop="image" class="img-polaroid" src="'.$this->item->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" /> </a>'; }else{ echo '<a href="'.$this->item->image.'" style="cursor: pointer;" class="modal" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'"> <img itemprop="image" class="img-polaroid" src="'.$this->item->image.'" alt="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" /> </a>'; } }elseif($this->item->file!=''){ echo '<a href="images/'.$this->params->get('file_path').'/'.$this->item->file.'" title="'.JText::_('COM_ABOOK_COVEROF').' '.$this->item->title.'" target="_blank"> <img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="'.JText::_('COM_ABOOK_NOCOVEROF').'" /> </a>'; }else{ echo '<img class="img-polaroid" src="components/com_abook/assets/images/nocover.png" alt="'.JText::_('COM_ABOOK_NOCOVEROF').'" />'; } ?> </div> </div> <?php }?> </div> <?php if(($this->params->get('show_hits', 1)==1) || ($this->params->get('view_rate', 1)==1) || ($this->params->get('show_lend_request', 1)==1) || ($this->params->get('show_lend_availability', 1)==1)){ ?> <div class="row-fluid"> <div class="span4 col-md-4 muted"> <?php if ($this->params->get( 'show_hits', 1 )==1){ ?> <p> <span class="icon-eye-open"></span> <strong><?php echo JText::_('COM_ABOOK_HITS');?>: </strong> <meta itemprop="interactionCount" content="UserPageVisits:<?php echo $this->item->hits;?>"/><?php echo $this->item->hits;?> </p> <?php } ?> <?php $lendstate=isset($this->lend->state)?$this->lend->state:1; if ($this->params->get( 'show_lend_availability', 1 )==1) { switch($lendstate){ case 0: $state="badge-important"; $state_label=JText::_('COM_ABOOK_LEND_LENT'); break; default: case 1: $state="badge-success"; $state_label=JText::_('COM_ABOOK_LEND_AVAILABLE'); break; case 2: $state="badge-warning"; $state_label=JText::_('COM_ABOOK_LEND_REQUESTED'); break; } ?> <p> <span class="icon-share-alt"></span> <strong><?php echo JText::_('COM_ABOOK_LENT_STATUS');?></strong><span class="badge <?php echo $state;?>"><?php echo $state_label;?></span> </p> <p> <div><strong><?php echo JText::_('COM_ABOOK_LEND_AVAILABILITY');?>: </strong><?php echo $this->item->qty - (isset($this->lend->lent)?$this->lend->lent:0) - (isset($this->lend->requested)?$this->lend->requested:0);?>/<?php echo $this->item->qty;?></div> </p> <?php }?> </div> <div class="span5 col-md-5"> <?php if ($this->params->get( 'view_rate', 1 )==1) { ?> <?php echo JHTML::_('icon.votebook', $this->item, $this->vote);?> <?php } ?> </div> <?php if ($this->params->get( 'show_lend_request', 1 )==1 && in_array($this->params->get('allow_lend_request'), $this->user->getAuthorisedViewLevels()) && $lendstate == 1) {?> <div class="span3 col-md-3"> <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#collapseRequest"> <?php echo JText::_( 'COM_ABOOK_LEND_REQUEST' );?> <span class="icon-arrow-right"></span> </button> </div> <?php }?> </div> <?php if ($this->params->get( 'show_lend_request', 1 )==1 && in_array($this->params->get('allow_lend_request'), $this->user->getAuthorisedViewLevels())) { $uri = JFactory::getURI(); $uri->setQuery($uri->getQuery().'&hitcount=0'); ?> <div id="collapseRequest" class="row-fluid collapse"> <form action="<?php echo $uri->toString();?>" method="post" class="form-horizontal" name="requestForm" id="requestForm"> <legend><?php echo JText::_( 'COM_ABOOK_LEND_REQUEST_FORM' );?></legend> <?php if ($this->user->guest){?> <div class="control-group"> <div class="control-label"><label for="custom_user_name"><?php echo JText::_( 'COM_ABOOK_CUSTOM_USERNAME' );?></label></div> <div class="controls"><input type="text" name="custom_user_name" value="" /></div> </div> <div class="control-group"> <div class="control-label"><label for="custom_user_email"><?php echo JText::_( 'COM_ABOOK_CUSTOM_USEREMAIL' );?></label></div> <div class="controls"><input type="text" name="custom_user_email" value="" /></div> </div> <?php }else{?> <div class="control-group"> <div class="control-label"><label for="custom_user_name"><?php echo JText::_( 'COM_ABOOK_CUSTOM_USERNAME' );?></label></div> <div class="controls"><?php echo $this->user->name;?></div> </div> <div class="control-group"> <div class="control-label"><label for="custom_user_email"><?php echo JText::_( 'COM_ABOOK_CUSTOM_USEREMAIL' );?></label></div> <div class="controls"><?php echo $this->user->email;?></div> </div> <?php }?> <div class="control-group"> <div class="control-label"><label for="lend_out"><?php echo JText::_( 'COM_ABOOK_LEND_OUT' );?></label></div> <div class="controls"><?php echo JHtml::_("calendar", JHtml::_("date", 'now', 'Y-m-d'), "lend_out", "lend_out",'%Y-%m-%d');?></div> </div> <div class="control-group"> <div class="control-label"><label for="lend_in"><?php echo JText::_( 'COM_ABOOK_LEND_IN' );?></label></div> <div class="controls"><?php echo JHtml::_("calendar", JHtml::_("date", 'now', 'Y-m-d'), "lend_in", "lend_in", '%Y-%m-%d');?></div> </div> <?php $captcha=$this->params->get('captcha', JFactory::getConfig()->get('captcha')); $isEnabled=JPluginHelper::isEnabled('captcha', $captcha); $campo[0]=''; if ($captcha!="0" && !$isEnabled){ $campo[0]=JText::sprintf("COM_ABOOK_ENABLE_CAPTCHA", $captcha); }elseif ($this->user->guest){ if ($captcha!="0"){ JPluginHelper::importPlugin('captcha', $captcha); $dispatcher = JEventDispatcher::getInstance(); $dispatcher->trigger('onInit', "g-recaptcha"); $campo=$dispatcher->trigger('onDisplay', array($captcha, "dynamic_recaptcha_1", 'class="required"'));?> <div class="control-group"> <div class="control-label"><label for="dynamic_recaptcha_1"><?php echo JText::_( 'COM_ABOOK_CAPTCHA_LABEL' );?></label></div> <div class="controls"><?php echo $campo[0];?></div> </div> <?php } }?> <div class="control-group"> <div class="controls"> <input class="btn" type="submit" name="submit_vote" value="<?php echo JText::_( 'COM_ABOOK_LEND_SEND_REQUEST' );?>" /> </div> </div> <input type="hidden" name="task" value="book.lendrequest" /> <input type="hidden" name="url" value="<?php echo $uri->toString();?>" /> <?php echo JHtml::_('form.token'); ?> </form> </div> <?php }?> <?php } ?> <?php if ($this->item->description!='' && $this->params->get('show_description', 1)){ ?> <div class="row-fluid"> <div class="span12"> <?php if ($this->item->authorreview!= '' && $this->params->get('show_writtenby')){?> <div class="description" itemprop="review" itemscope itemtype="http://schema.org/Review"> <?php }else{?> <div class="description" itemprop="description"> <?php }?> <?php if ($this->params->get('show_description_title', 1)){ ?> <div> <h3><?php echo JText::_('COM_ABOOK_REVIEW');?></h3> </div> <?php }?> <?php if ($this->item->authorreview!= '' && $this->params->get('show_writtenby')){?> <div class="muted createdby"><?php JText::printf( 'COM_ABOOK_WRITTEN_BY', '<span itemprop="reviewBody">'.$this->item->authorreview.'</span>'); ?></div> <span itemprop="reviewBody"><?php echo $this->item->description;?></span> <?php }else{?> <?php echo $this->item->description;?> <?php }?> </div> </div> </div> <?php } ?> <?php echo $this->item->event->afterDisplayContent; ?> <div class="clr"></div> <?php if ($this->params->get('show_tags', 1) && !empty($this->tags)) : ?> <?php $this->item->tagLayout = new JLayoutFile('book.tags'); ?> <div class="row-fluid"> <div class="span12"><?php echo $this->item->tagLayout->render($this->tags); ?></div> </div> <?php endif; ?> <?php if ($this->item->docsfolder && $this->params->get('show_docs', 0)){ $t=count($this->docslist); ?> <h6><?php echo JText::_('COM_ABOOK_DOCUMENTS_DESC');?></h6> <div id="documents"> <ul class="col1"> <?php for($i=0; $i<($t / 2); $i++){?> <li><a href="<?php echo $this->item->docsfolder.'/'.$this->docslist[$i];?>"><?php echo JFile::stripExt($this->docslist[$i]);?></a></li> <?php }?> </ul> <ul class="col2"> <?php for($i=($t / 2); $i<$t; $i++){?> <li><a href="<?php echo $this->item->docsfolder.'/'.$this->docslist[$i];?>"><?php echo JFile::stripExt($this->docslist[$i]);?></a></li> <?php }?> </ul> <div class="clr"></div> </div> <?php }?> <div class="row-fluid muted createdate"> <div class="span12"> <div class="span8"> <?php if($this->params->get( 'view_date' )==1){?> <span class="icon-calendar"></span> <?php echo JText::_('COM_ABOOK_DATE_INSERT');?>: <span itemprop="datePublished"><?php echo JHTML::_('date', $this->item->dateinsert, JText::_('DATE_FORMAT_LC1')) ?></span> <?php } ?> </div> <div class="span4"> <span class="pull-right"><?php echo JHtml::_('we.we') ?></span> </div> </div> </div> <div class="clr"></div> <?php if ($this->params->get( 'display_book_comments',1 ) == 1) { $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'); echo '<br />'.JComments::show($this->item->id, 'com_abook', JText::_('COM_ABOOK_CATEGORY') .' '. $this->item->title); } }?> </div> <div class="clr"></div>