<?php 
/**
* @version 1.0.0
* @package RSEvents! 1.0.0
* @copyright (C) 2009 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/

defined('_JEXEC') or die('Restricted access');

JHTML::_('behavior.tooltip'); 
?>
<?php if($this->isAdmin) { ?>
<div style="text-align:right;"><a href="<?php echo html_entity_decode(JRoute::_('index.php?option=com_rsevents&view=events&layout=addeditevent'.$this->itemId)); ?>" class="editlinktip hasTip" title="<?php echo JText::_('RSE_ADD_EVENT_TITLE'); ?>"><img src="<?php echo JURI::root().'images/M_images/edit.png'; ?>" alt="<?php echo JText::_('RSE_ADD_EVENT');?>" /></a></div>
<?php } ?>
<div class="componentheading<?php echo $this->escape($this->parameters->get('pageclass_sfx')); ?>"><?php echo JText::_('RSE_FEATURE_EVENTS') ;?></div> 
<br/>

<?php
if ($this->rseventsConfig['events.layout'] == 2) { ?> 
<table class="rsevents-table-list" cellspacing="0" cellpadding="0" width="100%">
	<thead>
		<tr>
			<th>
				<?php echo JText::_('RSE_DATE'); ?>
			</th>
			<th>
				<?php echo JText::_('RSE_EVENTNAME'); ?>
			</th>
			<th>
				<?php echo JText::_('RSE_LOCATION_NAME'); ?>
			</th>
			<th>
				<?php echo JText::_('RSE_CATEGORY_NAME'); ?>
			</th>
		</tr>
	</thead>
	<tbody>
<?php
} 
//showing the events  
if(!empty($this->layouts))
   foreach($this->layouts as $layout)
      echo $layout ;
else
   echo JText::_('RSE_NO_EVENTS');
      
	echo ($this->rseventsConfig['events.layout'] == 2) ? "</tbody>\n</table>" : "";
?>
<div class="rsevents-pagination">
	<div class="pageslinks">
		<?php echo $this->pagination->getPagesLinks(); ?>
	</div>
	<p class="pagescounter">
		<?php echo $this->pagination->getPagesCounter(); ?>
	</p>
</div>