* adjust for cron page.

This commit is contained in:
wangyidong
2018-04-24 16:17:08 +08:00
parent d6b3c5cc6b
commit 0571e818d9
4 changed files with 148 additions and 146 deletions
+52 -50
View File
@@ -11,57 +11,59 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class='container mw-700px'>
<div id='titlebar'>
<div class='heading'>
<strong><?php echo $lang->cron->common?></strong>
<small class'text-muted'> <?php echo $lang->cron->create?></small>
<div id='mainContent' class='main-content'>
<div class='center-block mw-700px'>
<div class='main-header'>
<h2>
<?php echo $lang->cron->common?>
<small class'text-muted'> <?php echo $lang->cron->create?></small>
</h2>
</div>
<form method='post' id='dataform' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='rowhead w-80px'><?php echo $lang->cron->m;?></th>
<td class='w-p20'><?php echo html::input('m', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->m;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->h;?></th>
<td><?php echo html::input('h', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->h;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dom;?></th>
<td><?php echo html::input('dom', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dom;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->mon;?></th>
<td><?php echo html::input('mon', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->mon;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dow;?></th>
<td><?php echo html::input('dow', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dow;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->command;?></th>
<td colspan='2'><?php echo html::input('command', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->remark;?></th>
<td colspan='2'><?php echo html::input('remark', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->type;?></th>
<td><?php echo html::select('type', $lang->cron->typeList, 'system', "class='form-control'")?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton()?></td>
</tr>
</table>
</form>
</div>
<form class='form-condensed' method='post' id='dataform' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='rowhead w-80px'><?php echo $lang->cron->m;?></th>
<td class='w-p20'><?php echo html::input('m', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->m;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->h;?></th>
<td><?php echo html::input('h', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->h;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dom;?></th>
<td><?php echo html::input('dom', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dom;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->mon;?></th>
<td><?php echo html::input('mon', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->mon;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dow;?></th>
<td><?php echo html::input('dow', '', "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dow;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->command;?></th>
<td colspan='2'><?php echo html::input('command', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->remark;?></th>
<td colspan='2'><?php echo html::input('remark', '', "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->type;?></th>
<td><?php echo html::select('type', $lang->cron->typeList, 'system', "class='form-control'")?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton()?></td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+52 -50
View File
@@ -11,57 +11,59 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div class='container mw-700px'>
<div id='titlebar'>
<div class='heading'>
<strong><?php echo $lang->cron->common?></strong>
<small class'text-muted'> <?php echo $lang->cron->edit?></small>
<div id='mainContent' class='main-content'>
<div class='center-block mw-700px'>
<div class='main-header'>
<h2>
<?php echo $lang->cron->common?>
<small class'text-muted'> <?php echo $lang->cron->edit?></small>
<h2>
</div>
<form method='post' id='dataform' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='rowhead w-80px'><?php echo $lang->cron->m;?></th>
<td class='w-p20'><?php echo html::input('m', $cron->m, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->m;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->h;?></th>
<td><?php echo html::input('h', $cron->h, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->h;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dom;?></th>
<td><?php echo html::input('dom', $cron->dom, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dom;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->mon;?></th>
<td><?php echo html::input('mon', $cron->mon, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->mon;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dow;?></th>
<td><?php echo html::input('dow', $cron->dow, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dow;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->command;?></th>
<td colspan='2'><?php echo html::input('command', str_replace("'", "&#039;", $cron->command), "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->remark;?></th>
<td colspan='2'><?php echo html::input('remark', $cron->remark, "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->type;?></th>
<td><?php echo html::select('type', $lang->cron->typeList, $cron->type, "class='form-control'")?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton()?></td>
</tr>
</table>
</form>
</div>
<form class='form-condensed' method='post' id='dataform' target='hiddenwin'>
<table class='table table-form'>
<tr>
<th class='rowhead w-80px'><?php echo $lang->cron->m;?></th>
<td class='w-p20'><?php echo html::input('m', $cron->m, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->m;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->h;?></th>
<td><?php echo html::input('h', $cron->h, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->h;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dom;?></th>
<td><?php echo html::input('dom', $cron->dom, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dom;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->mon;?></th>
<td><?php echo html::input('mon', $cron->mon, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->mon;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->dow;?></th>
<td><?php echo html::input('dow', $cron->dow, "class='form-control' autocomplete='off'")?></td>
<td><?php echo $lang->cron->notice->dow;?></td>
</tr>
<tr>
<th><?php echo $lang->cron->command;?></th>
<td colspan='2'><?php echo html::input('command', str_replace("'", "&#039;", $cron->command), "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->remark;?></th>
<td colspan='2'><?php echo html::input('remark', $cron->remark, "class='form-control' autocomplete='off'")?></td>
</tr>
<tr>
<th><?php echo $lang->cron->type;?></th>
<td><?php echo html::select('type', $lang->cron->typeList, $cron->type, "class='form-control'")?></td>
</tr>
<tr>
<th></th>
<td><?php echo html::submitButton()?></td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>
+43 -46
View File
@@ -20,54 +20,52 @@
<?php if(common::hasPriv('cron', 'turnon') and !empty($config->global->cron)) echo html::a(inlink('turnon'), $lang->cron->turnonList[0], 'hiddenwin', "class='btn'");?>
</div>
</div>
<div id='mainContent'>
<div id='mainContent' class='main-content'>
<?php if(!empty($config->global->cron)):?>
<div class='panel'>
<div class='panel-heading'>
<strong><?php echo $lang->cron->list?></strong>
<div class='panel-actions pull-right'>
<?php if(common::hasPriv('cron', 'create')) echo html::a(inlink('create'), $lang->cron->create, '', "class='btn btn-primary'")?>
</div>
<div class='main-header'>
<h2><?php echo $lang->cron->list?></h2>
<div class='btn-toolbar pull-right'>
<?php if(common::hasPriv('cron', 'create')) echo html::a(inlink('create'), $lang->cron->create, '', "class='btn btn-primary'")?>
</div>
<table class='table table-condensed table-bordered table-fixed main-table'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->cron->m?></th>
<th class='w-50px'><?php echo $lang->cron->h?></th>
<th class='w-50px'><?php echo $lang->cron->dom?></th>
<th class='w-50px'><?php echo $lang->cron->mon?></th>
<th class='w-50px'><?php echo $lang->cron->dow?></th>
<th><?php echo $lang->cron->command?></th>
<th class='w-160px'><?php echo $lang->cron->remark?></th>
<th class='w-120px'><?php echo $lang->cron->lastTime?></th>
<th class='w-60px'><?php echo $lang->cron->status?></th>
<th class='w-100px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php foreach($crons as $cron):?>
<tr>
<td><?php echo $cron->m;?></td>
<td><?php echo $cron->h;?></td>
<td><?php echo $cron->dom;?></td>
<td><?php echo $cron->mon;?></td>
<td><?php echo $cron->dow;?></td>
<td class='text-left' title='<?php echo $cron->command?>'><?php echo $cron->command;?></td>
<td class='text-left' title='<?php echo $cron->remark?>'><?php echo $cron->remark;?></td>
<td><?php echo substr($cron->lastTime, 2);?></td>
<td><?php echo zget($lang->cron->statusList, $cron->status, '');?></td>
<td class='text-center'>
<?php
if(common::hasPriv('cron', 'toggle') and !empty($cron->command)) echo html::a(inlink('toggle', "id=$cron->id&status=" . ($cron->status == 'stop' ? 'normal' : 'stop')), $cron->status == 'stop' ? $lang->cron->toggleList['start'] : $lang->cron->toggleList['stop'], 'hiddenwin');
if(!empty($cron->command) and common::hasPriv('cron', 'edit')) echo html::a(inlink('edit', "id=$cron->id"), $lang->edit);
if($cron->buildin == 0 and common::hasPriv('cron', 'delete')) echo html::a(inlink('delete', "id=$cron->id"), $lang->delete, 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<table class='table table-condensed table-bordered table-fixed main-table'>
<thead>
<tr>
<th class='w-50px'><?php echo $lang->cron->m?></th>
<th class='w-50px'><?php echo $lang->cron->h?></th>
<th class='w-50px'><?php echo $lang->cron->dom?></th>
<th class='w-50px'><?php echo $lang->cron->mon?></th>
<th class='w-50px'><?php echo $lang->cron->dow?></th>
<th><?php echo $lang->cron->command?></th>
<th class='w-160px'><?php echo $lang->cron->remark?></th>
<th class='w-120px'><?php echo $lang->cron->lastTime?></th>
<th class='w-60px'><?php echo $lang->cron->status?></th>
<th class='w-100px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php foreach($crons as $cron):?>
<tr>
<td><?php echo $cron->m;?></td>
<td><?php echo $cron->h;?></td>
<td><?php echo $cron->dom;?></td>
<td><?php echo $cron->mon;?></td>
<td><?php echo $cron->dow;?></td>
<td class='text-left' title='<?php echo $cron->command?>'><?php echo $cron->command;?></td>
<td class='text-left' title='<?php echo $cron->remark?>'><?php echo $cron->remark;?></td>
<td><?php echo substr($cron->lastTime, 2);?></td>
<td><?php echo zget($lang->cron->statusList, $cron->status, '');?></td>
<td class='text-center'>
<?php
if(common::hasPriv('cron', 'toggle') and !empty($cron->command)) echo html::a(inlink('toggle', "id=$cron->id&status=" . ($cron->status == 'stop' ? 'normal' : 'stop')), $cron->status == 'stop' ? $lang->cron->toggleList['start'] : $lang->cron->toggleList['stop'], 'hiddenwin');
if(!empty($cron->command) and common::hasPriv('cron', 'edit')) echo html::a(inlink('edit', "id=$cron->id"), $lang->edit);
if($cron->buildin == 0 and common::hasPriv('cron', 'delete')) echo html::a(inlink('delete', "id=$cron->id"), $lang->delete, 'hiddenwin');
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='alert alert-info'><?php echo $lang->cron->notice->help?></div>
<?php else:?>
<div class='container mw-700px'>
@@ -81,4 +79,3 @@
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
+1
View File
@@ -12,6 +12,7 @@
?>
<?php if(isset($error)):?>
<?php include '../../common/view/header.lite.html.php';?>
<style>body{background:#fff;}</style>
<div class='alert alert-warning with-icon'><i class='icon-frown'></i><div class='content'><?php echo join('', $error);?></div></div>
<?php include '../../common/view/footer.lite.html.php';?>
<?php else:?>