88614410 by Jeff Balicki

addmin a

1 parent 5cb086b2
...@@ -3,6 +3,14 @@ use Tz\WordPress\Tools; ...@@ -3,6 +3,14 @@ use Tz\WordPress\Tools;
3 use Tz\WordPress\Tools\Notifications; 3 use Tz\WordPress\Tools\Notifications;
4 use Tz\WordPress\Tools\Notifications\Settings; 4 use Tz\WordPress\Tools\Notifications\Settings;
5 5
6
7 $user_ID = get_current_user_id();
8 $AAL = get_user_meta($user_ID, '_AAL', false);
9 if(!in_array('notifications_full', $AAL[0])) {
10 echo '<style type="text/css"> .edit, .delete{ display:none; }</style>';
11 };
12
13
6 ?> 14 ?>
7 15
8 <link rel="stylesheet" href="<?php echo Tools\url('assets/css/notifications.css', __FILE__) ?>"/> 16 <link rel="stylesheet" href="<?php echo Tools\url('assets/css/notifications.css', __FILE__) ?>"/>
...@@ -50,10 +58,10 @@ use Tz\WordPress\Tools\Notifications\Settings; ...@@ -50,10 +58,10 @@ use Tz\WordPress\Tools\Notifications\Settings;
50 <td> 58 <td>
51 <?php 59 <?php
52 if (strtotime($entry->execute_date) > current_time('timestamp')):?> 60 if (strtotime($entry->execute_date) > current_time('timestamp')):?>
53 <a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>"> 61 <a class="edit" href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
54 edit 62 edit
55 </a> 63 </a>
56 | <a 64 | <a class="delete"
57 href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>" 65 href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>"
58 onclick="return confirm('Are you sure?');">delete</a> 66 onclick="return confirm('Are you sure?');">delete</a>
59 </td> 67 </td>
...@@ -139,11 +147,11 @@ use Tz\WordPress\Tools\Notifications\Settings; ...@@ -139,11 +147,11 @@ use Tz\WordPress\Tools\Notifications\Settings;
139 </td> 147 </td>
140 148
141 <td> 149 <td>
142 <a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>"> 150 <a class="edit" href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
143 edit 151 edit
144 </a> 152 </a>
145 <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?> 153 <?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?>
146 | <a 154 | <a class="delete"
147 href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>" 155 href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>"
148 onclick="return confirm('Are you sure?');">delete</a> 156 onclick="return confirm('Are you sure?');">delete</a>
149 <?php endif; ?> 157 <?php endif; ?>
......