<?php 
        }
        ?>
				</li>
			<?php 
    } else {
        ?>
				<?php 
        if (current_user_can('install_plugins')) {
            ?>
					<?php 
            if (!defined('WPTOUCH_IS_FREE')) {
                ?>
						<li>
							<?php 
                if (wptouch_can_cloud_install(true)) {
                    ?>
							<a class="button-primary download" href="#" data-name="<?php 
                    wptouch_the_theme_base();
                    ?>
" data-url="<?php 
                    wptouch_the_theme_download_url();
                    ?>
" data-loading-text="<i class='icon-cloud-download'></i><?php 
                    _e('Downloading...', 'wptouch-pro');
                    ?>
">
								<i class="icon-cloud-download"></i><?php 
                    _e('Install', 'wptouch-pro');
                    ?>
							</a>
						<?php 
            }
            ?>
					<?php 
        }
        ?>

				<?php 
    } else {
        ?>
					<?php 
        if (current_user_can('install_plugins')) {
            ?>
					<li>
						<?php 
            if (wptouch_can_cloud_install(false)) {
                ?>
						<a class="btn btn-small btn-info download" href="#" data-name="<?php 
                wptouch_the_addon_base();
                ?>
" data-url="<?php 
                wptouch_the_addon_download_url();
                ?>
" data-loading-text="<i class='icon-cloud-download'></i><?php 
                _e('Downloading...', 'wptouch-pro');
                ?>
"><i class="icon-cloud-download"></i><?php 
                _e('Install', 'wptouch-pro');
                ?>
</a>
						<?php 
            }
            ?>
					<?php 
        } elseif (!wptouch_is_theme_active() && !is_network_admin() || wptouch_is_theme_in_cloud()) {
            ?>
						<a class="button activate" href="<?php 
            echo wptouch_check_url_ssl(wptouch_get_theme_activate_link_url());
            ?>
">
							<?php 
            echo $activate_label;
            ?>
						</a>

						<?php 
            if (!wptouch_can_cloud_install() && wptouch_is_theme_in_cloud() && wptouch_get_theme_download_url() && !wptouch_get_theme_buy_url() && (!wptouch_is_controlled_network() || is_network_admin())) {
                ?>
							<a class="button download theme" href="<?php 
                wptouch_the_theme_download_url();
                ?>
">
								<?php 
                _e('Download', 'wptouch-pro');
                ?>
							</a>
						<?php 
            }
            ?>

					<?php 
        }
</button>
				<p class="small"><?php 
        _e('You can activate extensions in the next step', 'wptouch-pro');
        ?>
</p>
			</section>
		<?php 
    }
    ?>

		<?php 
    if (!is_network_admin()) {
        if (wptouch_is_controlled_network()) {
            $extensions = $wptouch_pro->get_available_addons(false);
        } else {
            $extensions = $wptouch_pro->get_available_addons(wptouch_can_cloud_install());
        }
        if (count($extensions) > 0) {
            ?>
			<details>Activate Extensions</details>
			<section class="activate-extensions">
				<h2><?php 
            _e('Activate Extensions', 'wptouch-pro');
            ?>
</h2>
				<p><?php 
            echo wptouchize_it(__('Extensions are like mini-plugins that help you extend WPtouch Pro. You can also manage Extensions at any time from the WPtouch Pro settings panel.', 'wptouch-pro'));
            ?>
</p>
				<ul>
					<?php 
            ?>
						<h4><?php 
            wptouch_the_addon_title();
            ?>
</h4>
						<span class="version"><?php 
            wptouch_the_addon_version();
            ?>
</span>
						<span class="update-version">
							<?php 
            echo sprintf(__('Upgrade to %s', 'wptouch-pro'), wptouch_cloud_addon_get_update_version());
            ?>
						</span>
						<?php 
            if (!wptouch_should_show_license_nag() && !wptouch_can_cloud_install(true)) {
                ?>
							<a class="button download extension" href="<?php 
                wptouch_the_addon_download_url();
                ?>
">
								<?php 
                _e('Download', 'wptouch-pro');
                ?>
							</a>
						<?php 
            }
            ?>
					</li>
				<?php 
        }
</a>
					<?php 
            }
            ?>
				<?php 
        }
        ?>
			<?php 
    }
    ?>
			</div>
		<?php 
} else {
    ?>
			<div class="action-buttons<?php 
    if (!wptouch_can_cloud_install()) {
        ?>
 no-install<?php 
    }
    ?>
">
				<a class="button" href="<?php 
    echo wptouch_addon_info_url();
    ?>
"><?php 
    _e('Learn More', 'wptouch-pro');
    ?>
</a>
			</div>
		<?php 
}