<div class="container-fluid">
    <div class="block-header">
        <h2>Design > Themes</h2>
    </div>
    <!-- Vertical Layout -->
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="card">
                <div class="header">
                    <h2>Manage Themes</h2>
                </div>
                <div class="body">
                    <div class="alert alert-success pro-settings-alert"></div>
                    <form action="#" method="post" class="setting-themes-container">
                    <div class="row">
                    	 <?php
				         foreach (PT_GetThemes() as $theme_url) {
				            include($theme_url . '/info.php');
				            $theme = str_replace('themes/', '', $theme_url);
				         ?>
				         <div class="col-lg-6">
				            <div class="theme <?php echo ($theme == $pt->config->theme) ? ' active' : '';?>">
				               <div class="themeName"><?php echo $themeName;?></div>
				               <div class="themeVirsion">Version: <?php echo $themeVirsion;?></div>
				               <div class="themeAuthor">Author <a href="<?php echo $themeAuthorUrl;?>"><?php echo $themeAuthor;?></a></div>
				               <?php if($theme ==  $pt->config->theme) { ?>
				               <div class="active"><i class="fa fa-check"></i> Activeted</div>
				               <?php } else { ?>
				               <div class="active"><a href="#" id="active">Activate</a></div>
				               <input type="hidden" name="theme" value="<?php echo $theme; ?>" />
				               <?php } ?>
				               <div class="clearfix"></div>
				            </div>
				         </div>
				         <?php } ?>
				         <div class="clearfix"></div>
                    </div>
                </form>
                </div>
            </div>
        </div>
        <div class="clearfix"></div>
    </div>
    <!-- #END# Vertical Layout -->
<script>
$(function() {
   $('a#active').click(function() {
     $('form.setting-themes-container').submit();
   });
   $('form.setting-themes-container').ajaxForm({
     url: '{{LINK aj/ap/save-settings}}',
     success: function(data) {
       if (data.status == 200) {
         window.location = "<?php echo PT_LoadAdminLinkSettings('manage-themes'); ?>";
       } 
     }
  });
});
</script>