-
Notifications
You must be signed in to change notification settings - Fork 3
/
sam-pro-places-list.php
60 lines (57 loc) · 2.25 KB
/
sam-pro-places-list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
/**
* Created by PhpStorm.
* Author: minimus
* Date: 24.12.2014
* Time: 14:19
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'SamProPlacesList' ) ) {
class SamProPlacesList {
private $settings;
public function __construct( $settings ) {
$this->settings = $settings;
}
public function show() {
$ddList = '<script id="viewMode" type="text/x-jsrender"><select id="view-mode">
<option value="10">'. __('All', SAM_PRO_DOMAIN) .'</option>
<option value="0">' . __('Active', SAM_PRO_DOMAIN) . '</option>
<option value="1">' . __('In Trash', SAM_PRO_DOMAIN) . '</option>
</select></script>';
$newLink = admin_url('admin.php') . '?page=sam-pro-place-editor';
$newA = "<script id='NewPlace' type='text/x-jsrender'><a class='e-toolbaricons e-icon new-ad' href='{$newLink}'/></script>";
?>
<script id="TrashPlace" type="text/x-jsrender">
<a class="e-toolbaricons e-icon place-to-trash"/>
</script>
<script id="UnTrashPlace" type="text/x-jsrender">
<a class="e-toolbaricons e-icon place-from-trash"/>
</script>
<script id="Trash" type="text/x-jsrender">
<a class="e-toolbaricons e-icon to-trash"/>
</script>
<?php echo $ddList; ?>
<?php echo $newA ?>
<div class="wrap">
<h2><?php _e( 'Manage Ads Places', SAM_PRO_DOMAIN ); ?></h2>
<div id="grid"></div>
<h4><?php _e('Legend', SAM_PRO_DOMAIN); ?></h4>
<ul>
<li><i class="icon-ok"></i>/<i class="icon-traffic-cone"></i> - <?php _e('Approved / Awaiting approval.', SAM_PRO_DOMAIN); ?></li>
<li><i class="icon-leaf"></i>/<i class="icon-trash"></i> - <?php _e('Is active / Is in trash.', SAM_PRO_DOMAIN); ?></li>
<li><i class="icon-eye"></i>/<i class="icon-eye-off"></i> - <?php _e('Potentially visible / Always invisible.', SAM_PRO_DOMAIN); ?></li>
</ul>
<div id="adsDialog" title="<?php _e('Select Ads', SAM_PRO_DOMAIN); ?>">
<div id="adsGrid"></div>
<div class="sam-centered">
<input type="button" id="select-ads" value="<?php _e('Select', SAM_PRO_DOMAIN); ?>" class="button-secondary">
<input type="button" id="cancel-ads" value="<?php _e('Cancel', SAM_PRO_DOMAIN); ?>" class="button-secondary cancel-dialog">
</div>
</div>
</div>
<?php
}
}
}