customer-dashboard
2 years ago
admin-header.php
1 week ago
admin-index-header.php
2 years ago
admin-index-styles.php
1 year ago
admin-settings-header.php
10 months ago
admin-settings-notices.php
4 years ago
admin-settings-styles.php
2 months ago
enhanced-views-promo.php
1 week ago
store-logo.php
2 years ago
admin-header.php
88 lines
| 1 | <style> |
| 2 | #sc-admin-header { |
| 3 | background-color: #fff; |
| 4 | width: calc(100% + 20px); |
| 5 | /* Logical: covers #wpcontent's inline-start padding in RTL too. */ |
| 6 | margin-inline-start: -20px; |
| 7 | } |
| 8 | |
| 9 | #sc-admin-container { |
| 10 | padding: 20px; |
| 11 | display: flex; |
| 12 | align-items: center; |
| 13 | justify-content: space-between; |
| 14 | } |
| 15 | |
| 16 | #sc-admin-title { |
| 17 | margin: 0; |
| 18 | font-size: var(--sc-font-size-large); |
| 19 | } |
| 20 | |
| 21 | .sc-admin-suffix { |
| 22 | display: flex; |
| 23 | width: 16rem; |
| 24 | align-items: center; |
| 25 | justify-content: flex-end; |
| 26 | gap: 1em; |
| 27 | } |
| 28 | |
| 29 | /* Mobile: the 16rem suffix slot squeezes the breadcrumb onto two lines. */ |
| 30 | @media screen and (max-width: 782px) { |
| 31 | #sc-admin-container { |
| 32 | padding: 10px 12px; |
| 33 | } |
| 34 | .sc-admin-suffix { |
| 35 | display: none; |
| 36 | } |
| 37 | } |
| 38 | </style> |
| 39 | |
| 40 | <div id="sc-admin-header"> |
| 41 | <?php if ( ! empty( $claim_url ) || ! empty( $claim_expired ) ) : ?> |
| 42 | <sc-provisional-banner claim-url="<?php echo esc_url( $claim_url ); ?>" expired="<?php echo ! empty( $claim_expired ) ? 'true' : 'false'; ?>"></sc-provisional-banner> |
| 43 | <?php endif; ?> |
| 44 | <div id="sc-admin-container"> |
| 45 | <?php if ( ! empty( $breadcrumbs ) ) : ?> |
| 46 | <sc-breadcrumbs style="font-size: 16px"> |
| 47 | <sc-breadcrumb> |
| 48 | <img style="display: block" src="<?php echo esc_url( trailingslashit( plugin_dir_url( SURECART_PLUGIN_FILE ) ) . 'images/logo.svg' ); ?>" alt="SureCart" width="125"> |
| 49 | </sc-breadcrumb> |
| 50 | <?php foreach ( $breadcrumbs as $breadcrumb ) : ?> |
| 51 | <sc-breadcrumb><?php echo esc_html( $breadcrumb['title'] ?? '' ); ?></sc-breadcrumb> |
| 52 | <?php endforeach; ?> |
| 53 | </sc-breadcrumbs> |
| 54 | <?php endif; ?> |
| 55 | <?php if ( ! empty( $suffix ) || ! empty( $report_url ) || ! empty( $enhanced_view_promo ) ) : ?> |
| 56 | <div class="sc-admin-suffix"> |
| 57 | <?php |
| 58 | if ( ! empty( $suffix ) ) { |
| 59 | echo wp_kses_post( $suffix ); |
| 60 | } |
| 61 | ?> |
| 62 | <?php |
| 63 | if ( ! empty( $enhanced_view_promo ) ) { |
| 64 | \SureCart::render( |
| 65 | 'layouts/partials/enhanced-views-promo', |
| 66 | [ |
| 67 | 'return_url' => is_string( $enhanced_view_promo ) ? $enhanced_view_promo : admin_url(), |
| 68 | ] |
| 69 | ); |
| 70 | } |
| 71 | ?> |
| 72 | <?php |
| 73 | if ( ! empty( $report_url ) ) { |
| 74 | $report_url = add_query_arg( 'switch_account_id', \SureCart::account()->id, $report_url ); |
| 75 | ?> |
| 76 | <sc-button type="default" size="medium" href="<?php echo esc_url( $report_url ); ?>" target="_blank"> |
| 77 | <sc-icon name="bar-chart-2" slot="prefix"></sc-icon> |
| 78 | <?php esc_html_e( 'View Reports', 'surecart' ); ?> |
| 79 | <sc-icon name="external-link" slot="suffix"></sc-icon> |
| 80 | </sc-button> |
| 81 | <?php |
| 82 | } |
| 83 | ?> |
| 84 | </div> |
| 85 | <?php endif; ?> |
| 86 | </div> |
| 87 | </div> |
| 88 |