views/widget
widgetView.php
3.5 KB
4 days ago
widgetView.php in Tagembed: Social Media Feeds and Customer Reviews Widget 7.9, at views/widget/widgetView.php
| 1 | <?php |
| 2 | if (!defined('ABSPATH')) : |
| 3 | exit; |
| 4 | endif; |
| 5 | include_once TAGEMBED_PLUGIN_DIR_PATH . 'views/includes/headView.php'; |
| 6 | include_once TAGEMBED_PLUGIN_DIR_PATH . 'views/includes/headerView.php'; |
| 7 | ?> |
| 8 | <div id="__tagembed__widgetab" class="__tagembed__tabcontent"> |
| 9 | <div class="__tagembed__widgetarea"> |
| 10 | <div class="__tagembed__widgetactions"> |
| 11 | <div> |
| 12 | <h3>My Widget</h3> |
| 13 | </div> |
| 14 | <div style="display:<?php echo (empty($__tagembed__widgets)) ? 'none' : ''; ?>"> |
| 15 | <a class="__tagembed__btn" href="javascript:void(0);" id="__tagembed__widget_create_form">Create</a> |
| 16 | </div> |
| 17 | </div> |
| 18 | <div class="__tagembed__widgetinn"> |
| 19 | <?php |
| 20 | if (!empty($__tagembed__widgets)) : |
| 21 | $count = 0; |
| 22 | foreach ($__tagembed__widgets as $__tagembed__widget) : |
| 23 | ?> |
| 24 | <div class="__tagembed__widgetbox <?php echo $__tagembed__active_widget_id == $__tagembed__widget->id ? 'active' : ''; ?>" id="<?php echo esc_attr('__tagembed__widgetbox' . $count); ?>"> |
| 25 | <div class="__tagembed__widgethead"> |
| 26 | <div> |
| 27 | <h3><?php echo esc_html($__tagembed__widget->name); ?></h3> |
| 28 | <ul> |
| 29 | <li><?php echo esc_html($__tagembed__widget->feedCount); ?> Feeds</li> |
| 30 | <li><?php echo esc_html($__tagembed__widget->networkCount); ?> Networks</li> |
| 31 | </ul> |
| 32 | </div> |
| 33 | <div class="tooltip"> |
| 34 | <div class="__tagembed__toggleOnBut __tagembed__switch"> |
| 35 | <div class="__tagembed__onoffswitch"> |
| 36 | <input data-widgetStatus="<?php echo esc_attr($__tagembed__widget->status); ?>" onchange="__tagembed__updateWidgetStauts('<?php echo esc_js($__tagembed__widget->id); ?>', '<?php echo esc_js($count); ?>');" type="checkbox" name="<?php echo esc_attr('widget-' . $count); ?>" id="<?php echo esc_attr('widget-' . $count); ?>" class="__tagembed__onoffswitch-checkbox __tagembed__updateStatus" data-on-color="#009385" data-off-color="#989898" <?php echo ($__tagembed__widget->status) ? "checked" : ""; ?>> |
| 37 | <label class="__tagembed__onoffswitch-label" for="<?php echo esc_attr('widget-' . $count); ?>"> |
| 38 | <span class="__tagembed__onoffswitch-inner"></span> |
| 39 | <span class="__tagembed__onoffswitch-switch" style="background: rgb(152, 152, 152);"></span> |
| 40 | </label> |
| 41 | </div> |
| 42 | </div> |
| 43 | <span class="tooltiptext">Status</span> |
| 44 | </div> |
| 45 | </div> |
| 46 | <div class="__tagembed__widget_sourcecode" onclick="__tagembed__copyToWidgetShortCode('[tagembed widgetid <?php echo esc_js($__tagembed__widget->id); ?>]');"> |
| 47 | <p>[tagembed widgetid <?php echo esc_html($__tagembed__widget->id); ?>]</p> |
| 48 | <button title="Copy Short Code"><i class="fa fa-files-o" aria-hidden="true"></i></button> |
| 49 | </div> |
| 50 | <div class="__tagembed__widgetfoot"> |
| 51 | <ul> |
| 52 | <li><a href="javascript:void(0);" onclick="__tagembed__menus(2, '<?php echo esc_js($__tagembed__widget->id); ?>')"> Open </a></li> |
| 53 | <li> |
| 54 | <a href="javascript:void(0);" onclick="__tagembed__widgetEditForm('<?php echo esc_js($__tagembed__widget->id); ?>', '<?php echo esc_js($__tagembed__widget->name); ?>');"> |
| 55 | Rename |
| 56 | </a> |
| 57 | </li> |
| 58 | |
| 59 | <li><a href="javascript:void(0);" onclick="__tagembed__deleteWidget('<?php echo esc_js($__tagembed__widget->id); ?>', '<?php echo esc_js('__tagembed__widgetbox' . $count); ?>');"> Delete </a></li> |
| 60 | </ul> |
| 61 | </div> |
| 62 | </div> |
| 63 | <?php |
| 64 | $count++; |
| 65 | endforeach; |
| 66 | endif; |
| 67 | ?> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | <?php include_once TAGEMBED_PLUGIN_DIR_PATH . 'views/includes/footerView.php'; ?> |