<?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');
?>

<?php if(empty($this->subscriptionsDetails)) echo JText::_('RSE_USER_HAS_NO_SUBSCRIPTIONS');  else {?>
<table  class="rsevents-table-list" width="100%">
	<thead>
		<tr>
			<th><?php echo JText::_('RSE_EVENTNAME'); ?></th>
			<th><?php echo JText::_('RSE_STATUS'); ?></th>
			<th><?php echo JText::_('RSE_SUBSCRIPTION_DATE'); ?></th>
		</tr>
	</thead>
	
	<tbody>
<?php
foreach ($this->subscriptionsDetails as $subscription) 
{
	$state = '';
	if($subscription->SubscriptionState == 1) $state = JText::_('RSE_SUBSCRIBER_ACCEPTED'); 
	if($subscription->SubscriptionState == 0) $state = JText::_('RSE_SUBSCRIBER_PENDING'); 
	if($subscription->SubscriptionState == -1) $state = JText::_('RSE_SUBSCRIBER_DENIED');
	
	echo  '<tr>'.
				'<td><a href="index.php?option=com_rsevents&view=events&layout=show&cid='.$subscription->IdEvent.$this->itemId.'">' . $subscription->EventName . '</a></td>' .
				'<td>' . $state . '</td>' . 
				'<td>' . rseventsHelper::translateDate(date($this->rseventsConfig['global.dateformat'],$subscription->SubscriptionDate)) . '</td>' .
		  '</tr>';
}	

?>
	</tbody>
</table>
<?php } ?>