analytics
6 years ago
data
5 years ago
dialogs
5 years ago
general
5 years ago
permissions
5 years ago
privacy
5 years ago
recaptcha
5 years ago
unsubscribe
6 years ago
tab-accessibility.php
6 years ago
tab-analytics.php
5 years ago
tab-data.php
6 years ago
tab-general.php
5 years ago
tab-metrics.php
6 years ago
tab-palettes.php
5 years ago
tab-permissions.php
6 years ago
tab-privacy.php
6 years ago
tab-recaptcha.php
6 years ago
tab-unsubscribe.php
6 years ago
tab-palettes.php
101 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Palette tab. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.0 |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | <div id="palettes-box" class="sui-box" data-tab="palettes" <?php echo 'palettes' !== $section ? 'style="display: none;"' : ''; ?>> |
| 11 | |
| 12 | <div class="sui-box-header"> |
| 13 | <h2 class="sui-box-title"><?php esc_html_e( 'Color Palettes', 'hustle' ); ?></h2> |
| 14 | </div> |
| 15 | |
| 16 | <div class="sui-box-body"> |
| 17 | |
| 18 | <div class="sui-box-settings-row"> |
| 19 | |
| 20 | <div class="sui-box-settings-col-1"> |
| 21 | <span class="sui-settings-label"><?php esc_html_e( 'Custom Color Palettes', 'hustle' ); ?></span> |
| 22 | <span class="sui-description"><?php esc_html_e( 'Create custom color palettes and apply them directly on your pop-ups, slide-ins, and embeds.', 'hustle' ); ?></span> |
| 23 | </div> |
| 24 | |
| 25 | <div class="sui-box-settings-col-2"> |
| 26 | |
| 27 | <label class="sui-label"><?php esc_html_e( 'Custom Palettes', 'hustle' ); ?></label> |
| 28 | |
| 29 | <?php if ( ! empty( $palettes ) ) : ?> |
| 30 | |
| 31 | <ul id="hustle-palettes-container" class="hui-palette-list"> |
| 32 | |
| 33 | <?php foreach ( $palettes as $slug => $data ) : ?> |
| 34 | <li> |
| 35 | |
| 36 | <span class="sui-icon-paint-bucket hui-palette-icon" aria-hidden="true"></span> |
| 37 | |
| 38 | <span class="hui-palette-name" aria-hidden="true"><?php echo esc_attr( $data['name'] ); ?></span> |
| 39 | |
| 40 | <button |
| 41 | class="hustle-create-palette sui-button-icon sui-tooltip" |
| 42 | data-slug="<?php echo esc_attr( $slug ); ?>" |
| 43 | data-name="<?php echo esc_attr( $data['name'] ); ?>" |
| 44 | data-hustle-action="go-to-step" |
| 45 | data-step="2" |
| 46 | data-tooltip="<?php esc_attr_e( 'Edit Palette', 'hustle' ); ?>" |
| 47 | > |
| 48 | <span class="sui-loading-text"> |
| 49 | <span class="sui-icon-pencil" aria-hidden="true"></span> |
| 50 | </span> |
| 51 | <span class="sui-icon-loader sui-loading" aria-hidden="true"></span> |
| 52 | <span class="sui-screen-reader-text"><?php echo esc_html( $data['name'] ); ?></span> |
| 53 | </button> |
| 54 | |
| 55 | <button |
| 56 | class="sui-button-icon sui-button-red sui-tooltip hustle-delete-button" |
| 57 | data-id="<?php echo esc_attr( $slug ); ?>" |
| 58 | data-title="<?php esc_attr_e( 'Delete Color Palette', 'hustle' ); ?>" |
| 59 | <?php /* translators: palette name */ ?> |
| 60 | data-description="<?php printf( esc_html__( 'Are you sure you want to delete the %s color palette permanently? Note that the modules using this color palette will fallback to the default color palette.', 'hustle' ), esc_attr( $data['name'] ) ); ?>" |
| 61 | data-tooltip="<?php esc_attr_e( 'Delete Palette', 'hustle' ); ?>" |
| 62 | > |
| 63 | <span class="sui-icon-trash" aria-hidden="true"></span> |
| 64 | <span class="sui-screen-reader-text"><?php echo esc_attr( $data['name'] ); ?></span> |
| 65 | </button> |
| 66 | |
| 67 | </li> |
| 68 | |
| 69 | <?php endforeach; ?> |
| 70 | |
| 71 | </ul> |
| 72 | |
| 73 | <?php else : ?> |
| 74 | |
| 75 | <?php |
| 76 | $this->get_html_for_options( |
| 77 | array( |
| 78 | array( |
| 79 | 'type' => 'inline_notice', |
| 80 | 'icon' => 'info', |
| 81 | /* translators: 1: opening 'strong' tag, 2: closing 'strong' tag */ |
| 82 | 'value' => sprintf( esc_html__( 'You have not created any custom color palette yet. Click on the %1$s“Create Custom Palette”%2$s button to create your first custom palette.', 'hustle' ), '<strong>', '</strong>' ), |
| 83 | ), |
| 84 | ) |
| 85 | ); |
| 86 | ?> |
| 87 | |
| 88 | <?php endif; ?> |
| 89 | |
| 90 | <button class="hustle-create-palette sui-button sui-button-ghost"> |
| 91 | <span class="sui-icon-plus" aria-hidden="true"></span> <?php esc_html_e( 'Create custom palette', 'hustle' ); ?> |
| 92 | </button> |
| 93 | |
| 94 | </div> |
| 95 | |
| 96 | </div> |
| 97 | |
| 98 | </div> |
| 99 | |
| 100 | </div> |
| 101 |