1 <?php if((!$this->repository_has_subscription($repository_id) && $match = $this->get_matching_cp($repository)) && $match['exp']): ?>
2 <p class="alignright installer_highlight"><strong><?php printf('Price offers available until %s', date_i18n(get_option( 'date_format' ), $match['exp'])) ?></strong></p>
5 <h3 id="repository-<?php echo $repository_id ?>"><?php echo $repository['data']['name'] ?></h3>
7 $getWhenSubscriptionExpires = function ( $repository ) { return $repository['subscription']['data']->expires; };
9 'repoId' => $repository_id,
10 'productName' => $repository['data']['product-name'],
11 'productUrl' => $repository['data']['url'],
12 'siteUrl' => $this->get_installer_site_url( $repository_id ),
13 'siteKeysManagementUrl' => $repository['data']['site_keys_management_url'],
14 'updateSiteKeyNonce' => wp_create_nonce( 'update_site_key_' . $repository_id ),
15 'saveSiteKeyNonce' => wp_create_nonce( 'save_site_key_' . $repository_id ),
16 'removeSiteKeyNonce' => wp_create_nonce( 'remove_site_key_' . $repository_id ),
17 'findAccountNonce' => wp_create_nonce( 'find_account_' . $repository_id ),
18 'whenExpires' => \OTGS\Installer\FP\partial( $getWhenSubscriptionExpires, $repository ),
20 'siteKey' => WP_Installer_API::get_site_key( $repository_id ),
21 'endUserRenewalUrl' => $this->get_end_user_renewal_url( $repository_id ),
24 <table class="widefat otgs_wp_installer_table" id="installer_repo_<?php echo $repository_id ?>">
27 <td class="otgsi_register_product_wrap" colspan="2">
29 if ( ! $this->repository_has_subscription( $repository_id ) ) {
30 \OTGS\Installer\Templates\Repository\Register::render( $model );
33 $site_key = $repository['subscription']['key'];
34 $subscription_type = $this->get_subscription_type_for_repository( $repository_id );
35 $upgrade_options = $this->get_upgrade_options( $repository_id );
37 if ( $this->repository_has_expired_subscription( $repository_id ) ) {
38 $model->expired = true;
39 \OTGS\Installer\Templates\Repository\Expired::render( $model );
40 } else if ( $this->repository_has_refunded_subscription( $repository_id ) ) {
41 $model->expired = true;
42 $model->shouldDisplayUnregisterLink = $this->should_display_unregister_link_on_refund_notice();
43 \OTGS\Installer\Templates\Repository\Refunded::render( $model );
45 $this->show_subscription_renew_warning( $repository_id, $subscription_type );
46 \OTGS\Installer\Templates\Repository\Registered::render( $model );
52 <div class="installer-error-box hidden"></div>
59 $subscription_type = isset($subscription_type) ? $subscription_type : null;
60 $upgrade_options = isset($upgrade_options) ? $upgrade_options : null;
61 $packages = $this->_render_product_packages($repository['data']['packages'], $subscription_type, $model->expired, $upgrade_options, $repository_id);
62 if(empty($subscription_type) || $model->expired){
63 $subpackages_expandable = true;
65 $subpackages_expandable = false;
70 <?php foreach($packages as $package): ?>
71 <tr id="repository-<?php echo $repository_id ?>_<?php echo $package['id'] ?>">
72 <td class="installer-repository-image"><img width="140" src="<?php echo $package['image_url'] ?>" /></td>
73 <?php if ( ! $model->expired ): ?>
75 <p><strong><?php echo $package['name'] ?></strong></p>
76 <p><?php echo $package['description'] ?></p>
78 <?php if($package['products']): ?>
79 <?php foreach($package['products'] as $product): ?>
80 <ul class="installer-products-list" style="display:inline">
82 <a class="button-secondary" href="<?php echo $product['url'] ?>"><?php echo $product['label'] ?></a>
89 if ( $package['downloads'] ) {
90 WP_Installer_Channels()->load_channel_selector( $repository_id, $package['downloads'] );
91 include $this->plugin_path() . '/templates/downloads-list.php';
95 <?php if(!empty($package['sub-packages'])): ?>
97 <?php $subpackages = $this->_render_product_packages($package['sub-packages'], $subscription_type, $model->expired, $upgrade_options, $repository_id); ?>
99 <?php if($subpackages): ?>
101 <?php if($subpackages_expandable): ?>
102 <h5><a class="installer_expand_button" href="#" title="<?php esc_attr_e('Click to see individual components options.', 'installer') ?>"><?php _e('Individual components', 'installer') ?></a></h5>
105 <table class="otgs_wp_installer_subtable" style="<?php if($subpackages_expandable) echo 'display:none' ?>">
106 <?php foreach($subpackages as $package): ?>
107 <tr id="repository-<?php echo $repository_id ?>_<?php echo $package['id'] ?>">
108 <td><img width="70" height="70" src="<?php echo $package['image_url'] ?>" /></td>
110 <p><strong><?php echo $package['name'] ?></strong></p>
111 <p><?php echo $package['description'] ?></p>
113 <?php if($package['products']): ?>
114 <?php foreach($package['products'] as $product): ?>
115 <ul class="installer-products-list" style="display:inline">
117 <a class="button-secondary" href="<?php echo $product['url'] ?>"><?php echo $product['label'] ?></a>
123 <?php if($package['downloads']): ?>
124 <?php include $this->plugin_path() . '/templates/downloads-list.php'; ?>
144 <p><i><?php printf(__('This page lets you install plugins and update existing plugins. To remove any of these plugins, go to the %splugins%s page and if you have the permission to remove plugins you should be able to do this.', 'installer'), '<a href="' . admin_url('plugins.php') . '">' , '</a>'); ?></i></p>