88614410 by Jeff Balicki

addmin a

1 parent 5cb086b2
......@@ -3,6 +3,14 @@ use Tz\WordPress\Tools;
use Tz\WordPress\Tools\Notifications;
use Tz\WordPress\Tools\Notifications\Settings;
$user_ID = get_current_user_id();
$AAL = get_user_meta($user_ID, '_AAL', false);
if(!in_array('notifications_full', $AAL[0])) {
echo '<style type="text/css"> .edit, .delete{ display:none; }</style>';
};
?>
<link rel="stylesheet" href="<?php echo Tools\url('assets/css/notifications.css', __FILE__) ?>"/>
......@@ -50,10 +58,10 @@ use Tz\WordPress\Tools\Notifications\Settings;
<td>
<?php
if (strtotime($entry->execute_date) > current_time('timestamp')):?>
<a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
<a class="edit" href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
edit
</a>
| <a
| <a class="delete"
href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>"
onclick="return confirm('Are you sure?');">delete</a>
</td>
......@@ -139,11 +147,11 @@ use Tz\WordPress\Tools\Notifications\Settings;
</td>
<td>
<a href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
<a class="edit" href="/wp-admin/admin.php?page=notifications&action=edit&page_id=<?php echo $entry->ID; ?>">
edit
</a>
<?php if (current_user_can(Settings\MANAGE_SYSTEM_NOTIFICATIONS)): ?>
| <a
| <a class="delete"
href="/wp-admin/admin.php?page=notifications&action=delete&page_id=<?php echo $entry->ID; ?>"
onclick="return confirm('Are you sure?');">delete</a>
<?php endif; ?>
......