mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-11 20:21:16 +00:00
do not show table of scheduler classes if none exists
This commit is contained in:
parent
718ac96777
commit
276245a395
|
@ -263,42 +263,44 @@ $(document).ready( function() {
|
|||
<div class="row-fluid">
|
||||
<div class="span6">
|
||||
<?php
|
||||
echo "<table class=\"table _table-condensed\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText('scheduler_class')."</th>\n";
|
||||
print "<th>".getMLText('scheduler_class_description')."</th>\n";
|
||||
print "<th>".getMLText('scheduler_class_parameter')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
$errmsgs = array();
|
||||
foreach($GLOBALS['SEEDDMS_SCHEDULER']['tasks'] as $extname=>$tasks) {
|
||||
foreach($tasks as $taskname=>$task) {
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
echo $extname."::".$taskname;
|
||||
echo "</td>";
|
||||
echo "<td width=\"100%\">";
|
||||
echo $task->getDescription();
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
$params = $task->getAdditionalParams();
|
||||
foreach($params as $param)
|
||||
$k[] = $param['name'];
|
||||
echo implode(', ', $k);
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
print "<div class=\"list-action\">";
|
||||
$t = $scheduler->getTasksByExtension($extname, $taskname);
|
||||
if($t) {
|
||||
print "<a class=\"listtasks\" data-extension=\"".$extname."\" data-task=\"".$taskname."\" href=\"../out/out.SchedulerTaskMgr.php?extension=".$extname."&task=".$taskname."\" title=\"".getMLText("list_tasks")."\"><i class=\"icon-list\"></i></a>";
|
||||
if(!empty($GLOBALS['SEEDDMS_SCHEDULER']['tasks'])) {
|
||||
echo "<table class=\"table _table-condensed\">\n";
|
||||
print "<thead>\n<tr>\n";
|
||||
print "<th>".getMLText('scheduler_class')."</th>\n";
|
||||
print "<th>".getMLText('scheduler_class_description')."</th>\n";
|
||||
print "<th>".getMLText('scheduler_class_parameter')."</th>\n";
|
||||
print "<th></th>\n";
|
||||
print "</tr></thead><tbody>\n";
|
||||
$errmsgs = array();
|
||||
foreach($GLOBALS['SEEDDMS_SCHEDULER']['tasks'] as $extname=>$tasks) {
|
||||
foreach($tasks as $taskname=>$task) {
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
echo $extname."::".$taskname;
|
||||
echo "</td>";
|
||||
echo "<td width=\"100%\">";
|
||||
echo $task->getDescription();
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
$params = $task->getAdditionalParams();
|
||||
foreach($params as $param)
|
||||
$k[] = $param['name'];
|
||||
echo implode(', ', $k);
|
||||
echo "</td>";
|
||||
echo "<td>";
|
||||
print "<div class=\"list-action\">";
|
||||
$t = $scheduler->getTasksByExtension($extname, $taskname);
|
||||
if($t) {
|
||||
print "<a class=\"listtasks\" data-extension=\"".$extname."\" data-task=\"".$taskname."\" href=\"../out/out.SchedulerTaskMgr.php?extension=".$extname."&task=".$taskname."\" title=\"".getMLText("list_tasks")."\"><i class=\"icon-list\"></i></a>";
|
||||
}
|
||||
print "<a class=\"addtask\" data-extension=\"".$extname."\" data-task=\"".$taskname."\" href=\"../out/out.SchedulerTaskMgr.php?extension=".$extname."&task=".$taskname."\" title=\"".getMLText("add_task")."\"><i class=\"icon-plus\"></i></a>";
|
||||
print "</div>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
print "<a class=\"addtask\" data-extension=\"".$extname."\" data-task=\"".$taskname."\" href=\"../out/out.SchedulerTaskMgr.php?extension=".$extname."&task=".$taskname."\" title=\"".getMLText("add_task")."\"><i class=\"icon-plus\"></i></a>";
|
||||
print "</div>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</tbody></table>\n";
|
||||
}
|
||||
echo "</tbody></table>\n";
|
||||
?>
|
||||
<div id="listtasks" class="ajax" data-view="SchedulerTaskMgr" data-action="tasklist"></div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user