| 1 |
<?php |
| 2 |
|
| 3 |
namespace LIBRARY; |
| 4 |
|
| 5 |
$plugin_installer = new PluginInstaller(); |
| 6 |
$theme_plugins = $plugin_installer->get_theme_plugins(); |
| 7 |
$theme = wp_get_theme(); |
| 8 |
?> |
| 9 |
|
| 10 |
<div class="borderless-library borderless-library--import"> |
| 11 |
|
| 12 |
<?php echo wp_kses_post( ViewHelpers::plugin_header_output() ); ?> |
| 13 |
|
| 14 |
<div class="container"> |
| 15 |
|
| 16 |
<div class="row justify-content-center"> |
| 17 |
<div class="borderless-library-import__content col-9 my-5 p-3"> |
| 18 |
<div class="borderless-library-import__required-plugins library-install-plugins-content js-library-install-plugins-content"> |
| 19 |
<div class="library-install-plugins-content-content"> |
| 20 |
<?php if ( empty( $theme_plugins ) ) { ?> |
| 21 |
<div class="library-content-notice"> |
| 22 |
<p> |
| 23 |
<?php esc_html_e( 'All required/recommended plugins are already installed. You can import your demo content.' , 'borderless' ); ?> |
| 24 |
</p> |
| 25 |
</div> |
| 26 |
<?php } else { ?> |
| 27 |
|
| 28 |
<div class="borderless-library-import__plugins list-group list-group-radio d-grid gap-2 border-0 w-auto"> |
| 29 |
<h3 class="text-center mb-5"><?php esc_html_e( 'Required Plugins', 'borderless' ); ?></h3> |
| 30 |
<?php foreach ( $theme_plugins as $plugin ) { ?> |
| 31 |
<?php $is_plugin_active = $plugin_installer->is_plugin_active( $plugin['slug'] ); ?> |
| 32 |
<div class="borderless-library-import__plugin position-relative plugin-item-<?php echo esc_attr( $plugin['slug'] ); ?><?php echo $is_plugin_active ? ' plugin-item--active' : ''; ?><?php echo ! empty( $plugin['required'] ) ? ' plugin-item--required' : ''; ?>" for="library-<?php echo esc_attr( $plugin['slug'] ); ?>-plugin"> |
| 33 |
<div class="plugin-item-content list-group-item py-3 pe-5"> |
| 34 |
|
| 35 |
<div class="plugin-item-content-title"> |
| 36 |
<strong class="fw-semibold"><?php echo esc_html( $plugin['name'] ); ?></strong> |
| 37 |
</div> |
| 38 |
|
| 39 |
<?php if ( ! empty( $plugin['description'] ) ) { ?> |
| 40 |
<span class="d-block small opacity-75"> |
| 41 |
<?php echo wp_kses_post( $plugin['description'] ); ?> |
| 42 |
</span> |
| 43 |
<?php } ?> |
| 44 |
|
| 45 |
<div class="plugin-item-error js-library-plugin-item-error"></div> |
| 46 |
<div class="plugin-item-info js-library-plugin-item-info"></div> |
| 47 |
|
| 48 |
<span class="borderless-library-import__plugin-item-checkbox"> |
| 49 |
<input type="checkbox" class="borderless-library-import__plugin-item-checkbox-input form-check-input position-absolute top-50 end-0 me-3 fs-5" id="library-<?php echo esc_attr( $plugin['slug'] ); ?>-plugin" name="<?php echo esc_attr( $plugin['slug'] ); ?>" <?php checked( ! empty( $plugin['preselected'] ) || ! empty( $plugin['required'] ) || $is_plugin_active ); ?><?php disabled( $is_plugin_active ); ?>> |
| 50 |
<span class="borderless-library-import__plugin-checkbox position-absolute top-50 end-0"> |
| 51 |
<?php if ( ! empty( $plugin['required'] ) ) { ?> |
| 52 |
<i class="bi bi-lock-fill me-5"></i> |
| 53 |
<?php } ?> |
| 54 |
<div class="borderless-library-import__plugin-loading spinner-border" role="status"> |
| 55 |
<span class="visually-hidden">Loading...</span> |
| 56 |
</div> |
| 57 |
</span> |
| 58 |
</span> |
| 59 |
|
| 60 |
</div> |
| 61 |
|
| 62 |
</div> |
| 63 |
<?php } ?> |
| 64 |
</div> |
| 65 |
<?php } ?> |
| 66 |
</div> |
| 67 |
<div class="borderless-library-import__content-buttons d-grid gap-2 col-6 mx-auto mt-5"> |
| 68 |
<a href="<?php echo esc_url( $this->get_plugin_settings_url() ); ?>" class="borderless-library-import__content-button-cancel btn btn-lg mx-2"> |
| 69 |
<?php esc_html_e( 'Cancel' , 'borderless' ); ?> |
| 70 |
</a> |
| 71 |
<a href="#" class="borderless-library-import__content-button-import btn btn-lg btn-dark mx-2 js-library-install-plugins-before-import"><?php esc_html_e( 'Import' , 'borderless' ); ?></a> |
| 72 |
</div> |
| 73 |
</div> |
| 74 |
|
| 75 |
<div class="borderless-library-import__installing library-importing js-library-importing"> |
| 76 |
<h3 class="text-center"><?php esc_html_e( 'We Are Building Your Website' , 'borderless' ); ?></h3> |
| 77 |
<div class="borderless-library-import__installing-icon-container"> |
| 78 |
<a href="#" class="borderless-library-import__installing-icon" target="_blank"> |
| 79 |
<i class="glyphicon glyphicon-play whiteText" aria-hidden="true"></i> |
| 80 |
<span class="ripple borderless-library-import__installing-icon"></span> |
| 81 |
<span class="ripple borderless-library-import__installing-icon"></span> |
| 82 |
<span class="ripple borderless-library-import__installing-icon"></span> |
| 83 |
</a> |
| 84 |
</div> |
| 85 |
<p class="text-center"><?php esc_html_e( 'Installing...' , 'borderless' ); ?></p> |
| 86 |
</div> |
| 87 |
|
| 88 |
<div class="borderless-library-import__imported text-center library-imported js-library-imported"> |
| 89 |
|
| 90 |
<h3 class="text-center mb-5"><?php esc_html_e( 'Congratulations! 🎉' , 'borderless' ); ?></h3> |
| 91 |
|
| 92 |
<div class="js-library-ajax-response-subtitle"> |
| 93 |
<p> |
| 94 |
<?php esc_html_e( 'Your Website is ready.' , 'borderless' ); ?> |
| 95 |
</p> |
| 96 |
</div> |
| 97 |
|
| 98 |
<div class="library-imported-content"> |
| 99 |
<div class="library__response js-library-ajax-response"></div> |
| 100 |
</div> |
| 101 |
|
| 102 |
<div class="borderless-library-import__content-buttons d-grid gap-2 col-6 mx-auto mt-5"> |
| 103 |
<a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>" target="_blank" class="borderless-library-import__content-button-cancel btn btn-lg mx-2"><?php esc_html_e( 'Customize' , 'borderless' ); ?></a> |
| 104 |
<a href="<?php echo esc_url( get_home_url() ); ?>" target="_blank" class="borderless-library-import__content-button-import btn btn-lg btn-dark mx-2"><?php esc_html_e( 'Visit Site' , 'borderless' ); ?></a> |
| 105 |
</div> |
| 106 |
|
| 107 |
</div> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
|
| 111 |
</div> |
| 112 |
</div> |
| 113 |
|