This commit is contained in:
tianshujie
2022-04-13 14:22:32 +08:00
parent 90a1fea2d8
commit e681135a3a
3 changed files with 10 additions and 9 deletions

View File

@@ -6,3 +6,4 @@ tbody.sortable > tr > td.sort-handler .table-nest-toggle:before {cursor: pointer
label[for^="projectIdList"]:before {top: 1px; width:14px; height:14px;}
label[for^="projectIdList"]:after {width: 14px; height:14px;}
tbody .sortable > tr > td .sort-handler {color: #3c4353 !important;}

View File

@@ -136,14 +136,14 @@ class programModel extends model
public function getList($status = 'all', $orderBy = 'id_asc', $pager = NULL)
{
return $this->dao->select('*')->from(TABLE_PROGRAM)
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->where('deleted')->eq(0)
->andWhere('vision')->eq($this->config->vision)
->beginIF(!$this->app->user->admin)
->andWhere('(id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
->andWhere('((type')->eq('program')
->beginIF(!$this->app->user->admin and $this->app->rawMethod != 'browse')->andWhere('id')->in($this->app->user->view->programs)->fi()
->markRight(1)
->fi()
->orWhere('(type')->eq('project')
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
->markRight(2)
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->orderBy($orderBy)

View File

@@ -58,7 +58,7 @@
?>
<span class="table-nest-icon icon <?php echo $class . $icon;?>"></span>
<?php if($program->type == 'program'):?>
<?php echo html::a($this->createLink('program', 'product', "programID=$program->id"), $program->name);?>
<?php echo strpos(",{$app->user->view->programs},", ",$program->id,") !== false ? html::a($this->createLink('program', 'product', "programID=$program->id"), $program->name) : $program->name;?>
<?php else:?>
<?php echo html::a($this->createLink('project', 'index', "projectID=$program->id", '', '', $program->id), $program->name);?>
<?php endif;?>
@@ -85,7 +85,7 @@
</td>
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $program) . "</td>";?>
<td class='c-actions'>
<?php if($program->type == 'program'):?>
<?php if($program->type == 'program' and strpos(",{$app->user->view->programs},", ",$program->id,") !== false):?>
<?php if($program->status == 'wait' || $program->status == 'suspended') common::printIcon('program', 'start', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true, '', $this->lang->program->start);?>
<?php if($program->status == 'doing') common::printIcon('program', 'close', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if($program->status == 'closed') common::printIcon('program', 'activate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
@@ -104,7 +104,7 @@
<?php common::printIcon('program', 'create', "programID=$program->id", '', 'list', 'split', '', '', '', $program->status == 'closed' ? 'disabled' : '', $this->lang->program->children);?>
<?php if(common::hasPriv('program', 'delete')) echo html::a($this->createLink("program", "delete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->program->delete}'");?>
<?php else:?>
<?php elseif($program->type == 'project'):?>
<?php if($program->status == 'wait' || $program->status == 'suspended') common::printIcon('project', 'start', "projectID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
<?php if($program->status == 'doing') common::printIcon('project', 'close', "projectID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if($program->status == 'closed') common::printIcon('project', 'activate', "projectID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>