<?php
/**
* @version		3.0.0
* @package		JomLand TicketCenter
* @copyright	Copyright (C) 2010 JomLand.com. All rights reserved.
* @link 		www.jomland.com
* @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/ 
// no direct access
defined('_JEXEC') or die('Restricted access');
?>
<?php if ($this->menuparams->get('show_page_title', 1)): ?>
<div class="componentheading<?php echo $this->escape($this->menuparams->get('pageclass_sfx')); ?>">
<h2><?php echo $this->escape($this->menuparams->get('page_title')); ?></h2>
</div>
<?php endif; ?>

<div class="contentpane<?php echo $this->escape($this->menuparams->get('pageclass_sfx')); ?>">
<h3><?php echo $this->venue->venue_name?></h3>
<?php
	$city = JLTicketCenterLinksHelper::CityLink($this->params->get('display_city'),$this->venue->city_id,$this->venue->city_name,$this->itemid);
	
	if ($this->venue->state_id){
		if ($this->params->get('display_state')>0 && $this->venue->state_id){
			$state_link = JRoute::_('index.php?option=com_jlticketcenter&view=venues&state='.$this->venue->state_id.'&Itemid='.$this->itemid);
			$state = ',&nbsp;&nbsp;'.JHTML::link($state_link, $this->venue->state_name);
		}else{
			$state = ',&nbsp;&nbsp;'.$this->venue->state_name;
		}
	}
	
	if ($this->params->get('display_country')>0){
		if ($this->params->get('display_country')==2){
			$country_link = JRoute::_('index.php?option=com_jlticketcenter&view=venues&country='.$this->venue->country_id.'&Itemid='.$this->itemid);
			$country = ',&nbsp;&nbsp;'.JHTML::link($country_link, $this->venue->country);
		}else{
			$country = ',&nbsp;&nbsp;'.$this->venue->country;
		}
	} 
	
	if (!empty($this->events[0]->address)){
		echo $this->events[0]->address."<br/>";	
	}
	
	if (isset($city)){ 	
 		echo $city;
 	}
 	if (isset($state)){
 		echo $state ;
 	}
 	if (isset($country)){
  		echo $country;
 	}
?>
<br /><br />
<?php if ($this->events){
	if (!empty($this->calender)){
		echo $this->calender;
	} 
	echo $this->loadTemplate('events_list');
}else{ ?>
	<strong><br />
	<?php 	echo JText::_('JLTC_NO_EVENTS'); ?>
<br /><br />
</strong>
<?php  }?>

</div>