* Finish task#8457.

This commit is contained in:
qiyu-xie
2020-11-25 13:06:05 +08:00
parent 6cdd6d850b
commit fa5bef628a
4 changed files with 16 additions and 11 deletions
+1
View File
@@ -68,6 +68,7 @@ class program extends control
if(common::hasPriv('program', 'pgmcreate')) $this->lang->pageActions = html::a($this->createLink('program', 'pgmcreate'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->program->PGMCreate, '', "class='btn btn-secondary'");
$this->app->session->set('programList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true). "?PRJ=6");
$programType = $this->cookie->programType ? $this->cookie->programType : 'bylist';
-2
View File
@@ -534,8 +534,6 @@ class programModel extends model
if(empty($program)) return true;
if(!isset($program->type)) return true;
if($program->type == 'program' && $action == 'prjsuspend') return false;
if($action == 'pgmclose') return $program->status != 'closed';
if($action == 'pgmactivate') return $program->status == 'done' or $program->status == 'closed';
+1 -1
View File
@@ -20,7 +20,7 @@
<span class='prefix label-id'><strong><?php echo $program->id;?></strong></span>
<?php echo isonlybody() ? ("<span title='$program->name'>" . $program->name . '</span>') : html::a($this->createLink('program', 'view', 'program=' . $program->id), $program->name, '_blank');?>
<?php if(!isonlybody()):?>
<small><?php echo $lang->arrow . $lang->program->activate;?></small>
<small><?php echo $lang->arrow . $lang->project->activate;?></small>
<?php endif;?>
</h2>
</div>
+14 -8
View File
@@ -59,22 +59,28 @@
<td class='text-right c-actions'>
<?php if($program->type == 'program'):?>
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
<?php common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
<?php common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PGMEdit')) echo html::a($this->createLink("program", "pgmedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'PGMCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PGMChildren);?>
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
<button type='button' class='btn icon-ellipsis-v' data-toggle='context-dropdown'></button>
<div class='dropdown-menu pull-right w-120px'>
<?php common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe btn-action', true);?>
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$lang->delete}'");?>
</div>
<?php else:?>
<?php common::printIcon('program', 'PRJGroup', "programID=$program->id", $program, 'list', 'icon icon-lock');?>
<?php common::printIcon('program', 'PRJManageMembers', "programID=$program->id", $program, 'list', 'persons');?>
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program','PRJEdit')) echo html::a($this->createLink("program", "prjedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'PRJCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', 'disabled', '', '', $this->lang->program->PGMChildren);?>
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$lang->delete}'");?>
<button type='button' class='btn icon-ellipsis-v' data-toggle='context-dropdown'></button>
<div class='dropdown-menu pull-right w-120px'>
<?php common::printIcon('program', 'PRJActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe btn-action', true);?>
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$lang->delete}'");?>
</div>
<?php endif;?>
</td>
</tr>