woocommerce
/
src
/
Internal
/
StockNotifications
/
Admin
/
Templates
/
html-admin-notifications.php
html-admin-notification-create.php
1 month ago
html-admin-notification-edit.php
10 months ago
html-admin-notifications.php
10 months ago
html-product-data-admin.php
10 months ago
html-admin-notifications.php
48 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin View: Stock Notifications list |
| 4 | * |
| 5 | * @since 10.2.0 |
| 6 | */ |
| 7 | |
| 8 | declare( strict_types = 1 ); |
| 9 | |
| 10 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | exit; |
| 12 | } |
| 13 | |
| 14 | use Automattic\WooCommerce\Internal\StockNotifications\Admin\NotificationsPage; |
| 15 | ?> |
| 16 | <div class="wrap woocommerce-customer-stock-notifications"> |
| 17 | |
| 18 | <h1 class="wp-heading-inline"><?php esc_html_e( 'Stock Notifications', 'woocommerce' ); ?></h1> |
| 19 | <a href="<?php echo esc_url( add_query_arg( array( 'notification_action' => 'create' ), NotificationsPage::PAGE_URL ) ); ?>" class="page-title-action"><?php esc_html_e( 'Add New', 'woocommerce' ); ?></a> |
| 20 | |
| 21 | <hr class="wp-header-end"> |
| 22 | <?php |
| 23 | if ( $table->has_stock_notifications ) { |
| 24 | $table->views(); |
| 25 | ?> |
| 26 | |
| 27 | <form id="customer-stock-notifications-table" class="customer-stock-notifications-select2" method="GET"> |
| 28 | <p class="search-box"> |
| 29 | <label for="post-search-input" class="screen-reader-text"><?php esc_html_e( 'Search Notifications', 'woocommerce' ); ?>:</label> |
| 30 | <input type="search" placeholder="<?php echo esc_attr__( 'Search by user e-mail', 'woocommerce' ); ?>" value="<?php echo isset( $_REQUEST['s'] ) ? esc_attr( wc_clean( wp_unslash( $_REQUEST['s'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>" name="s" id="customer-stock-notifications-search-input"> |
| 31 | <input type="submit" value="<?php echo esc_attr__( 'Search', 'woocommerce' ); ?>" class="button" id="search-submit" name=""> |
| 32 | </p> |
| 33 | <input type="hidden" name="page" value="<?php echo isset( $_REQUEST['page'] ) ? esc_attr( wc_clean( wp_unslash( $_REQUEST['page'] ) ) ) : ''; // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>"/> |
| 34 | <?php $table->display(); ?> |
| 35 | </form> |
| 36 | |
| 37 | <?php } else { ?> |
| 38 | |
| 39 | <div class="woocommerce-BlankState"> |
| 40 | <h2 class="woocommerce-BlankState-message"> |
| 41 | <?php esc_html_e( 'No customers have signed up to receive stock notifications from you just yet.', 'woocommerce' ); ?> |
| 42 | </h2> |
| 43 | <a class="woocommerce-BlankState-cta button-primary button" target="_blank" href="https://woocommerce.com/document/back-in-stock-notifications"><?php esc_html_e( 'Learn more', 'woocommerce' ); ?></a> |
| 44 | </div> |
| 45 | |
| 46 | <?php } ?> |
| 47 | </div> |
| 48 |