* Modify plan flow button.

This commit is contained in:
liumengyi
2021-12-29 17:13:16 +08:00
parent ba9f61de07
commit 1250dca867
6 changed files with 19 additions and 18 deletions
-11
View File
@@ -1366,17 +1366,6 @@ class commonModel extends model
global $app;
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->tab . '"';
/* Judge the $method of $module clickable or not, default is clickable. */
if(is_object($object))
{
if($app->getModuleName() != $module) $app->control->loadModel($module);
$modelClass = class_exists("ext{$module}Model") ? "ext{$module}Model" : $module . "Model";
if(class_exists($modelClass) and is_callable(array($modelClass, 'isClickable')))
{
if(!call_user_func_array(array($modelClass, 'isClickable'), array($object, $method))) $misc .= 'disabled="disabled"';
}
}
if(!commonModel::hasPriv($module, $method, $object)) return false;
echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline);
return true;
+1
View File
@@ -295,6 +295,7 @@ class productplan extends control
$this->view->plans = $this->productplan->getList($productID, $branch, $browseType, $pager, $sort);
$this->view->pager = $pager;
$this->view->projects = $this->product->getProjectPairsByProduct($productID, $branch);
$this->view->statusList = $this->lang->productplan->featureBar['browse'];
$this->display();
}
+1
View File
@@ -26,6 +26,7 @@ td.c-branch {overflow: hidden; text-align: left !important; text-overflow: ellip
.c-title.has-child > .plan-name.has-suffix > a, .c-title.has-child > .plan-name.has-prefix > a {overflow:hidden; max-width: calc(100% - 70px);}
.plan-name.has-suffix > a, .plan-name.has-prefix > a {overflow:hidden; max-width: calc(100% - 46px);}
#productplanList .plan-name > .label.label-danger {margin-left:3px; }
.switchButton {background: #fff !important;}
.panel-actions {position: relative; padding: 0 0; padding-top: 1px;}
+1 -1
View File
@@ -25,5 +25,5 @@ ol, ul {padding-left: 20px;}
.body-modal #mainMenu>.btn-toolbar {width: auto;}
.body-modal #mainContent {min-height: 240px;}
#mainMenu .btn-link[disabled] {color: #9e54ae; background: transparent; border-color:transparent;}
#mainMenu .btn-link.disabled {color: #9e54ae; background: transparent; border-color:transparent;}
#mainMenu .icon-checked, #mainMenu .icon-off, #mainMenu .icon-play, #mainMenu .icon-magic {margin-right: 3px;}
@@ -56,6 +56,9 @@
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-title'><?php common::printOrderLink('title', $orderBy, $vars, $lang->productplan->title);?></th>
<?php if($browseType == 'all'):?>
<th><?php common::printOrderLink('status', $orderBy, $vars, $lang->productplan->status);?></th>
<?php endif;?>
<?php if($this->session->currentProductType != 'normal'):?>
<th class='c-branch'><?php common::printOrderLink('branch',$orderBy, $vars, $lang->productplan->branch);?></th>
<?php endif;?>
@@ -117,6 +120,9 @@
if(!empty($suffix)) echo $suffix . '</div>';
?>
</td>
<?php if($browseType == 'all'):?>
<td><?php echo zget($statusList, $plan->status)?></td>
<?php endif;?>
<?php if($this->session->currentProductType != 'normal'):?>
<td class='c-branch' title='<?php echo $branchOption[$plan->branch];?>'><?php if($plan->parent != '-1') echo $branchOption[$plan->branch];?></td>
<?php endif;?>
@@ -144,9 +150,9 @@
$attr = "data-toggle='modal' data-id='{$plan->id}' data-width='550px'";
$isOnlyBody = true;
}
common::printLink('productplan', 'start', "planID=$plan->id", '<i class="icon-play"></i>', '', "class='btn {$class}'{$attr} title='{$lang->productplan->start}'", '', $isOnlyBody, $plan);
common::printLink('productplan', 'finish', "planID=$plan->id", '<i class="icon-checked"></i>', '', "class='btn' target='hiddenwin' title='{$lang->productplan->finish}'", '', false, $plan);
common::printLink('productplan', 'close', "planID=$plan->id", '<i class="icon-off"></i>', '', "class='btn' target='hiddenwin' title='{$lang->productplan->close}'", '', false, $plan);
common::printIcon('productplan', 'start', "planID=$plan->id", $plan, 'list', 'play', '', $class, $isOnlyBody, $attr, $lang->productplan->start);
common::printIcon('productplan', 'finish', "planID=$plan->id", $plan, 'list', 'checked', '', $class, false, $attr, $lang->productplan->finish);
common::printIcon('productplan', 'close', "planID=$plan->id", $plan, 'list', 'off', '', $class, false, $attr, $lang->productplan->close);
}
$attr = $plan->expired ? "disabled='disabled'" : '';
+7 -3
View File
@@ -53,10 +53,14 @@
$attr = "data-toggle='modal' data-id='{$plan->id}' data-width='550px'";
$isOnlyBody = true;
}
$class = $plan->status == 'wait' ? $class : 'disabled';
common::printLink('productplan', 'start', "planID=$plan->id", "<i class='icon-play'></i>{$lang->productplan->startAB}", '', "class='btn btn-link {$class}'{$attr} title='{$lang->productplan->start}'", '', $isOnlyBody, $plan);
common::printLink('productplan', 'finish', "planID=$plan->id", "<i class='icon-checked'></i>{$lang->productplan->finishAB}", '', "class='btn btn-link' target='hiddenwin' title='{$lang->productplan->finish}'", '', false, $plan);
common::printLink('productplan', 'close', "planID=$plan->id", "<i class='icon-off'></i>{$lang->productplan->closeAB}", '', "class='btn btn-link' target='hiddenwin' title='{$lang->productplan->close}'", '', false, $plan);
common::printLink('productplan', 'activate', "planID=$plan->id", "<i class='icon-magic'></i>{$lang->productplan->activateAB}", '', "class='btn btn-link' target='hiddenwin' title='{$lang->productplan->activate}'", '', false, $plan);
$class = $plan->status == 'doing' ? '' : 'disabled';
common::printLink('productplan', 'finish', "planID=$plan->id", "<i class='icon-checked'></i>{$lang->productplan->finishAB}", '', "class='btn btn-link {$class}' target='hiddenwin' title='{$lang->productplan->finish}'", '', false, $plan);
$class = $plan->status == 'done' ? '' : 'disabled';
common::printLink('productplan', 'close', "planID=$plan->id", "<i class='icon-off'></i>{$lang->productplan->closeAB}", '', "class='btn btn-link {$class}' target='hiddenwin' title='{$lang->productplan->close}'", '', false, $plan);
$class = $plan->status == 'closed' ? '' : 'disabled';
common::printLink('productplan', 'activate', "planID=$plan->id", "<i class='icon-magic'></i>{$lang->productplan->activateAB}", '', "class='btn btn-link {$class}' target='hiddenwin' title='{$lang->productplan->activate}'", '', false, $plan);
}
if(common::hasPriv('productplan', 'create', $plan) and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-split'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");