PluginProbe
WP Directory Kit / 1.5.9
WP Directory Kit v1.5.9
1.5.9 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 trunk 1.1.0 1.1.6 1.1.8 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.8 All 37 releases
wpdirectorykit / application / views / wdk_location / index.php

index.php in WP Directory Kit 1.5.9, at application/views/wdk_location/index.php

127 lines 7.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * The template for Locations Management.
4 *
5 * This is the template that table, search layout
6 *
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <!-- This file should primarily consist of HTML with a little bit of PHP. -->
14
15 <div class="wrap wdk-wrap">
16 <h1 class="wp-heading-inline"><?php echo esc_html__('Locations','wpdirectorykit'); ?> <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit"); ?>" class="button button-primary" id="add_location_button"><?php echo esc_html__('Add location','wpdirectorykit'); ?></a></h1>
17 <br />
18 <?php
19 $success_message = NULL;
20 if(isset($_GET['custom_message']))
21 $success_message = esc_html(urldecode($_GET['custom_message']));
22
23 $form->messages('class="alert alert-danger"', $success_message);
24 ?>
25 <br />
26 <form method="GET" action="<?php echo esc_url(wmvc_current_edit_url()); ?>" novalidate="novalidate">
27 <table class="wp-list-table widefat fixed striped table-view-list pages">
28 <thead>
29 <tr>
30 <td id="cb" class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-1"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-1" type="checkbox"></td>
31 <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
32 <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
33 <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
34 <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
35 <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
36 </tr>
37 </thead>
38
39 <?php if(count($locations) == 0): ?>
40 <tr class="no-items"><td class="colspanchange" colspan="6"><?php echo esc_html__('No Locations found.','wpdirectorykit'); ?></td></tr>
41 <?php endif; ?>
42
43 <?php foreach ( $locations as $location ):?>
44 <tr>
45 <th scope="row" class="check-column">
46 <input id="cb-select-<?php echo esc_attr(wmvc_show_data('idlocation', $location, '-')); ?>" type="checkbox" name="post[]" value="<?php echo esc_attr(wmvc_show_data('idlocation', $location, '-')); ?>">
47 <div class="locked-indicator">
48 <span class="locked-indicator-icon" aria-hidden="true"></span>
49 <span class="screen-reader-text"><?php echo esc_html__('Is Locked', 'wpdirectorykit'); ?></span>
50 </div>
51 </th>
52 <td>
53 <?php echo esc_html(str_pad('', wmvc_show_data('level', $location, 0)*12, '&nbsp;')).'|-'; ?><a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit&id=".wmvc_show_data('idlocation', $location, '-')); ?>"><?php echo esc_html(wp_strip_all_tags(wmvc_show_data('location_title', $location, '-'))).' #'.esc_html(wmvc_show_data('idlocation', $location, '-')); ?></a>
54 </td>
55 <td>
56 <?php echo esc_html(wmvc_show_data('order_index', $location, '-')); ?>
57 </td>
58 <td>
59 <?php echo esc_html(wmvc_show_data('level', $location, '-')); ?>
60 </td>
61 <td>
62 <?php echo esc_html(wdk_get_date(wmvc_show_data('date', $location), false)); ?>
63 </td>
64
65 <td class="actions_column">
66 <a href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=edit&id=".wmvc_show_data('idlocation', $location, '-')); ?>" title="<?php echo esc_attr__('Edit','wpdirectorykit');?>"><span class="dashicons dashicons-edit"></span></a>
67 <a class="question_sure" href="<?php echo esc_url(get_admin_url() . "admin.php?page=wdk_location&function=delete&id=".wmvc_show_data('idlocation', $location, '-')."&_wpnonce=".wp_create_nonce( 'wdk-location-delete_'.wmvc_show_data('idlocation', $location, '-')));?>" title="<?php echo esc_attr__('Remove','wpdirectorykit');?>"><span class="dashicons dashicons-no"></span></a>
68 </td>
69 </tr>
70 <?php endforeach; ?>
71
72 <tfoot>
73 <tr>
74 <td class="manage-column column-cb check-column"><label class="screen-reader-text" for="cb-select-all-2"><?php echo esc_html__('Select All', 'wpdirectorykit'); ?></label><input id="cb-select-all-2" type="checkbox"></td>
75 <th><?php echo esc_html__('Title','wpdirectorykit'); ?></th>
76 <th><?php echo esc_html__('Order','wpdirectorykit'); ?></th>
77 <th><?php echo esc_html__('Level','wpdirectorykit'); ?></th>
78 <th><?php echo esc_html__('Date','wpdirectorykit'); ?></th>
79 <th class="actions_column"><?php echo esc_html__('Actions','wpdirectorykit'); ?></th>
80 </tr>
81 </tfoot>
82 </table>
83 <div class="tablenav bottom">
84 <div class="alignleft actions bulkactions">
85 <?php wp_nonce_field( 'wdk-location-bulk', '_wpnonce'); ?>
86 <label for="bulk-action-selector-bottom" class="screen-reader-text"><?php echo esc_html__('Select bulk action', 'wpdirectorykit'); ?></label>
87 <select name="action" id="bulk-action-selector-bottom">
88 <option value="-1"><?php echo esc_html__('Bulk actions', 'wpdirectorykit'); ?></option>
89 <option value="delete" class="hide-if-no-js"><?php echo esc_html__('Delete', 'wpdirectorykit'); ?></option>
90 </select>
91 <input type="hidden" name="page" value="wdk_location" />
92 <input type="submit" id="table_action" class="button action" name="table_action" value="<?php echo esc_attr__('Apply', 'wpdirectorykit'); ?>">
93 </div>
94 <br class="clear">
95 </div>
96 </form>
97 <br />
98 <div class="alert alert-info" style="margin-bottom:20px" role="alert"><?php
99 echo wp_kses(
100 sprintf(
101 /* translators: 1: Tag with link open, 2: close link tag. */
102 __('%1$s How to manage Locations documentation%2$s', 'wpdirectorykit'),
103 '<a href="' . esc_url('https://wpdirectorykit.com/documentation/#!/locations') . '" target="_blank">',
104 '</a>'
105 ),
106 array(
107 'a' => array(
108 'href' => true,
109 'target' => true,
110 ),
111 )
112 );
113 ?></div>
114 <iframe width="560" height="315" src="//www.youtube.com/embed/051E9Lzn0Vs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
115 </div>
116
117 <script>
118 // Generate table
119 jQuery(document).ready(function($) {
120 $('.question_sure').on('click', function(){
121 return confirm("<?php echo esc_js(__('Are you sure? Selected item will be completely removed!','wpdirectorykit')); ?>");
122 });
123 });
124 </script>
125
126 <?php $this->view('general/footer', $data); ?>
127