|
2 | 2 | <div class="l-sort clearfix noselect"> |
3 | 3 | <div class="l-unit-toolbar__buttonstrip"> |
4 | 4 | <a href="/add/cron/" id="btn-create" class="ui-button cancel" dir="ltr"><i class="fas fa-plus-circle status-icon green"></i><?=_('Add Cron Job')?></a> |
5 | | - <? |
6 | | - if($panel[$user]['CRON_REPORTS'] == 'yes') { |
7 | | - echo '<a class="ui-button cancel" dir="ltr" href="/delete/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon green"></i>'._('turn off notifications').'</a>'; |
8 | | - } else { |
9 | | - echo '<a class="ui-button cancel" dir="ltr" href="/add/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon grey"></i>'._('turn on notifications').'</a>'; |
10 | | - } |
11 | | - ?> |
| 5 | + <? if($panel[$user]['CRON_REPORTS'] == 'yes') { ?> |
| 6 | + <a class="ui-button cancel" dir="ltr" href="/delete/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon green"></i><?=_('turn off notifications')?></a> |
| 7 | + <? } else { ?> |
| 8 | + <a class="ui-button cancel" dir="ltr" href="/add/cron/reports/?token='.$_SESSION['token'].'"><i class="fas fa-toggle-off status-icon grey"></i><?=_('turn on notifications')?></a> |
| 9 | + <? } ?> |
12 | 10 | </div> |
13 | 11 | <ul class="context-menu sort-order animated fadeIn" style="display:none;"> |
14 | 12 | <li entity="sort-date" sort_as_int="1"><span class="name active"><?=_('Date')?> <i class="fas fa-sort-amount-down"></i></span><span class="up"><i class="fas fa-sort-amount-up"></i></span></li> |
|
88 | 86 | <div class="clearfix l-unit__stat-col--left super-compact"> |
89 | 87 | <input id="check<?php echo $i ?>" class="ch-toggle" type="checkbox" name="job[]" value="<?php echo $key ?>"> |
90 | 88 | </div> |
91 | | - <div class="clearfix l-unit__stat-col--left wide-5 truncate"><b><a href="/edit/cron/?job=<?=$data[$key]['JOB']?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Cron Job')?>"><?=htmlspecialchars($data[$key]['CMD'], ENT_NOQUOTES)?></a></b></div> |
| 89 | + |
| 90 | + <div class="clearfix l-unit__stat-col--left wide-5 truncate"><b><a href="/edit/cron/?job=<?=$data[$key]['JOB']?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Cron Job')?>"><?=htmlspecialchars($data[$key]['CMD'], ENT_NOQUOTES)?></a></b> </div> |
92 | 91 | <!-- START QUICK ACTION TOOLBAR AREA --> |
93 | 92 | <div class="clearfix l-unit__stat-col--left compact-2 text-right"> |
94 | 93 | <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect"> |
95 | 94 | <div class="actions-panel clearfix"> |
96 | | - <div class="actions-panel__col actions-panel__download shortcut-enter" key-action="href"><a href="/edit/cron/?job=<?=$data[$key]['JOB']?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Cron Job')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div> |
| 95 | + <? if (($_SESSION['userContext'] === 'admin') && (isset($_SESSION['look'])) && ($_SESSION['look'] === 'admin')) {?> |
| 96 | + <!-- Restrict other administrators from deleting or suspending 'admin' user cron jobs --> |
| 97 | + <div class="actions-panel__col actions-panel__download shortcut-enter" key-action="href"><a href="/edit/cron/?job=<?=$data[$key]['JOB']?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Cron Job')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div> |
| 98 | + <? } else { ?> |
97 | 99 | <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js"> |
98 | 100 | <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=_($spnd_action)?>"> |
99 | 101 | <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i> |
|
112 | 114 | </div> |
113 | 115 | </a> |
114 | 116 | </div> |
| 117 | + <? } ?> |
115 | 118 | </div> |
116 | 119 | </div> |
117 | 120 | </div> |
|
0 commit comments