<?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'); 
?>
<div class="componentheading<?php echo $this->escape($this->parameters->get('pageclass_sfx')); ?>"><?php echo JText::_('RSE_ARCHIVE_EVENTS') ;?></div> 
<br/>
<?php if ($this->archive_search == 1) { ?>
<div style="text-align: right;">
<form action="" method="post">
<input type="text" name="rse_search_archive"  value="<?php echo $this->search_filter ; ?>" />
<button type="submit"><?php echo JText::_('RSE_SEARCH'); ?></button>
</form>
</div>
<?php } ?>
<?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>" : "";
?>