<?php
/*----------------------------------------------------------------------------------|  www.vdm.io  |----/
				Lmskaran 
/-------------------------------------------------------------------------------------------------------/

	@version		1.0.77
	@build			6th April, 2022
	@created		22nd July, 2020
	@package		Moojla
	@subpackage		default_teacher_courses.php
	@author			Lmskaran <http://Lmskaran.com>	
	@copyright		Copyright (C) 2015. All Rights Reserved
	@license		GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
  ____  _____  _____  __  __  __      __       ___  _____  __  __  ____  _____  _  _  ____  _  _  ____ 
 (_  _)(  _  )(  _  )(  \/  )(  )    /__\     / __)(  _  )(  \/  )(  _ \(  _  )( \( )( ___)( \( )(_  _)
.-_)(   )(_)(  )(_)(  )    (  )(__  /(__)\   ( (__  )(_)(  )    (  )___/ )(_)(  )  (  )__)  )  (   )(  
\____) (_____)(_____)(_/\/\_)(____)(__)(__)   \___)(_____)(_/\/\_)(__)  (_____)(_)\_)(____)(_)\_) (__) 

/------------------------------------------------------------------------------------------------------*/

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

?>

<!--[JCBGUI.template.template.17.$$$$]-->
<div class="lmskaran_teacher-course">
	<div class="lmskaran_course_section_grid">
		<?php foreach($this->courses->courses as $index => $course): ?> 
			<div class="lmskaran_courses__single">
				<div class="lmskaran_courses__single--image">
				<!-- <div class="lmskaran_post_status">تخصصی</div> -->
					<a href="<?php echo JRoute::_('index.php?option=com_moojla&view=coursedetail&id=' . $course->remoteid, false); ?>">
					<div></div>
					<img class="lmskaran_image_course" src="<?php echo $course->imgurl; ?>" alt="" onerror="this.style.opacity='0'" />
					</a>
				</div>
				<div class="lmskaran_courses__single--inner">
				<div class="lmskaran_courses__single--title">
					<h5>
						<a href="<?php echo JRoute::_('index.php?option=com_moojla&view=coursedetail&id=' . $course->remoteid, false); ?>"><?php echo $course->fullname; ?></a>
					</h5>
				</div>
				<div class="lmskaran_courses__single--meta">
					<div class="lmskaran_course__single--info_author">
						<?php if(!$this->item->userimage==null):	?>
							<img src="<?php echo $this->item->userimage; ?>" alt="">
						<?php else:?>
							<img src="/components/com_moojla/layouts/layouts_faranesh/layout_teacher_faranesh/image/default-teacher-profile.png" alt="">
						<?php endif;?>
						<div class="lmskaran_course__single--info_author__login">
							<a href="#" ><?php echo $this->item->users_name; ?></a>
						</div>
					</div>
				</div>
				</div>
				<div class="lmskaran_courses__single--outer">
					<div class="lmskaran_teacher-course-cat-name"><?php echo($this->courses->courses[0]->cat_name)?></div>
					<div class="lmskaran_lay-static-favorite">
						<?php 
						echo JLayoutHelper::render('favorite', ['course'=>$course], JPATH_SITE.'/components/com_moojla/layouts'); ?>
					</div>

					<div class="lmskaran_button_registration">
						<div class="lmskaran_reg_download">
							<?php JLoader::register('MoojlaHelper', JPATH_ADMINISTRATOR.'/components/com_moojla/helpers/moojla.php');
							$price = MoojlaHelper::getCurrentPriceByProductCode($course->remoteid); ?>
							<?php if (!$price): ?>
								<span class="lmskaran_course_price_cost"><span class="lmskaran_toman">رایگان</span></span>
							<?php else: ?>
								<span class="lmskaran_course_price_cost"><?php echo $price ?></span>
							<?php endif; ?>
						</div>
					</div>
				</div>
			</div>
		<?php endforeach; ?>
	</div>
</div> <!--[/JCBGUI$$$$]-->

