<?php
/**
* Template for displaying search course form.
*
* This template can be overridden by copying it to yourtheme/learnpress/search-form.php
*
* @author ThimPress
* @package LearnPress/Templates
* @version 3.0.0
*/
/**
* Prevent loading this file directly
*/
defined( 'ABSPATH' ) || exit();
?>
<?php if ( ! ( learn_press_is_courses() || learn_press_is_search() ) ) {
return;
}
?>
<div class="switch-layout-container">
<div class="switch-layout">
<a href="?view_type=grid" class="<?php echo ( $_REQUEST['view_type'] == 'grid' ) ? 'switch-active' : ''; ?>"><i class="fa fa-th-large"></i></a>
<a href="?view_type=list" class="<?php echo ( $_REQUEST['view_type'] == 'list' ) ? 'switch-active' : ''; ?>"><i class="fa fa-list-ul"></i></a>
</div>
<form method="get" name="search-course" class="learn-press-search-course-form"
action="<?php echo learn_press_get_page_link( 'courses' ); ?>">
<input type="text" name="s" class="search-course-input" value="<?php echo $s; ?>"
placeholder="<?php _e( 'Search course...', 'education-lms' ); ?>"/>
<input type="hidden" name="ref" value="course"/>
<button type="submit" class="search-submit" >
<i class="fa fa-search"></i>
</button>
</form>
</div>