<?php 

$link = JRoute::_("index.php?option=com_eventgallery&view=event&folder=".$this->entry->getFolderName()."&Itemid=".$this->currentItemid);

?>

<div class="eventgallery-tile">
	<div class="wrapper">
		<a href="<?php echo $link ?>">
			<div class="event-thumbnails">
				<?php
		            $files = $this->eventModel->getEntries($this->entry->getFolderName(), -1, 1, 1);
				?>
				
				<?php
		            /**
		            * @var EventgalleryLibraryFile $file
		            */?>

					<div class="event-thumbnail">
						<?php if (isset($files[0])) echo $files[0]->getLazyThumbImgTag(50,50, "", false); ?>	
					</div>											
			</div>
			<div class="content">				
				<div class="data">
					<?php IF($this->params->get('show_date',1)==1):?><div class="date"><small class="muted"><?php echo JHTML::Date($this->entry->getDate());?></small></div><?php ENDIF ?>
					<div class="title"><h2><?php echo $this->entry->getDescription();?></h2></div>
					<?php IF($this->params->get('show_text',1)==1):?><div class="text"><?php echo $this->entry->getIntroText();?></div><?php ENDIF ?>
					<?php IF($this->params->get('show_imagecount',1)==1):?><hr /><div class="imagecount"><small class="muted"><?php echo JText::_('COM_EVENTGALLERY_EVENTS_LABEL_IMAGECOUNT') ?> <?php echo $this->entry->getFileCount();?></small></div><?php ENDIF ?>				
					<?php IF ($this->entry->isCommentingAllowed() && $this->params->get('use_comments')==1 && $this->params->get('show_commentcount',1)==1):?><div class="comment"><small class="muted"><?php echo JText::_('COM_EVENTGALLERY_EVENTS_LABEL_COMMENTCOUNT') ?> <?php echo $this->entry->getCommentCount();?></small></div><?php ENDIF ?>
					<div style="clear:both"></div>
				</div>

			</div>					
		</a>
	</div>	
</div>
