<?php
/*
 * @package Joomla 3.0
 * @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 *
 * @component XMovie Component
 * @copyright Copyright (C) Dana Harris optikool.com
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 */
defined('_JEXEC') or die('Restricted access'); 

$currRow = 0;
$movCount = count($this->items);

$showCatTitle = $this->params->get('single_cat_show_main_title', $this->cparams->get('cview_show_main_title'));
$showCatRss = $this->params->get('prm_show_cat_rss', $this->cparams->get('enable_rss'));
$showCatDesc = $this->params->get('single_show_cat_description', $this->cparams->get('cview_show_cat_description'));
$showSubCat = $this->params->get('single_cat_show_subcat', $this->cparams->get('cview_show_subcat'));
$showCatMovTitle = $this->params->get('single_cat_show_mov_heading', $this->cparams->get('cview_show_cat_title'));
$showCatMovs = true; //$this->params->get('prm_cat_coll_show_colls', $this->cparams->get('cfg_cat_coll_show_colls'));
?>

<?php if ($showCatTitle) {?>
<h1><?php echo htmlspecialchars($this->category->title); ?></h1>
<?php 
} ?>
<div class="row-fluid">
	<?php if ($showCatRss) {?>
	<div id="rss">
		<a href="<?php echo JURI::root(); ?>index.php?option=com_xmovie&controller=feed&view=rss&id=<?php echo $this->category->id; ?>&format=feed" rel="alternate" type="application/rss+xml">
			<img src="<?php echo JURI::base(true); ?>/components/com_xmovie/images/feedIcon.png" alt="RSS Feed" style="border:none; width:15px;" class="rss-feed" />
		</a>
	</div>
	<?php 
} ?>
	<?php if ($showCatDesc && $this->category->description != '') { ?>
	<div id="xmovie-desc"><?php echo $this->category->description; ?></div>
	<?php 
} ?>
</div>
	
<?php if (count($this->subcat) > 0 && $showSubCat) { ?>
<div class="row-fluid">
	<?php if ($showCatTitle) {?>
	<h3><?php echo JTEXT::_('CATEGORIES'); ?></h3>
	<?php 
} ?>
	<?php if ($showSubCat) {?>
	<?php echo $this->loadTemplate($this->params->get('single_cat_display_view', $this->cparams->get('cview_display_view'))); ?>	
	<?php 
} ?>
</div>				
<?php 
} ?>	
	
<?php if ($movCount > 0) { ?>
<div class="row-fluid">
	<?php if ($showCatMovTitle) {?>	
	<h3><?php echo JTEXT::_('MOVIES'); ?></h3>	
	<?php 
} ?>	
	<?php if ($movCount > 0) {
    echo $this->loadTemplate($this->params->get('single_cat_display_mov', $this->cparams->get('cview_display_mov_view'))); ?>
	<div class="clearfix"></div>	
	<div id="pagin-footer" >
		<div class="pagination text-center"><?php echo $this->pagination->getPagesLinks(); ?></div>
	</div>		
	<?php 
} ?>
</div>
<?php 
} ?>
