<?php
/**
 * @package     SP Soccer
 * @author      JoomShaper http://www.joomshaper.com
 * @copyright   Copyright (C) 2010 - 2016 JoomShaper. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

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

// Get Columns
$columns = $this->params->get('columns', 4);

?>

<div id="spsoccer" class="spsoccer view-spsoccer-players">
	<!-- Column -->
	<?php foreach(array_chunk($this->items, $columns) as $this->items) { ?>
		<div class="spsoccer-row">
			<?php foreach ($this->items as $this->item) { ?>
				<!-- START:: SP Soccer Tournaments -->
				<div class="spsoccer-col-md-<?php echo round(12/$columns); ?> spsoccer-col-sm-6">
					<div class="player">
						<div class="palyer-image">
							<a href="<?php echo $this->item->url; ?>">
								<img class="spsoccer-img spsoccer-img-responsive player-list-img-thumb" src="<?php echo $this->item->image; ?>" alt="<?php echo $this->item->title; ?>">
							</a>
						</div>
						<div class="player-info-details">
							<a href="<?php echo $this->item->url; ?>">
								<h3><?php echo $this->item->title; ?></h3>
							</a>
							<h4 class="spsoccer-item-position"><?php echo $this->item->position; ?></h4>
							<p><?php echo JHtml::_('string.truncate', strip_tags($this->item->description), $this->params->get('desciption_limit', 100)); ?></p>
						</div>
					</div>

					<?php //print_r($this->item); ?>
				</div>
				<!-- END:: SP Soccer Tournaments -->
			<?php };?>
		</div>
	<?php } ?>
	<!-- /Column -->

	<!-- START:: Pagination -->
	<?php if ($this->params->get('show_pagination', 1)) { ?>
		<?php if ($this->pagination->get('pages.total') >1) { ?>
			<div class="soccer-pagination">
				<?php echo $this->pagination->getPagesLinks(); ?>
			</div>
		<?php } ?>
	<?php } ?>
	<!-- END:: Pagination -->

</div>
