* Adjust code style.

This commit is contained in:
Yagami
2021-02-24 15:02:43 +08:00
parent 93421b3e4c
commit 5c5bdc213e
34 changed files with 131 additions and 78 deletions
+5 -5
View File
@@ -922,7 +922,7 @@ class programModel extends model
$projectList = $this->dao->select('*')->from(TABLE_PROJECT)
->where('deleted')->eq('0')
->beginIF($this->config->global->mode == 'new')->andWhere('type')->eq('project')->fi()
->beginIF($this->config->systemMode == 'new')->andWhere('type')->eq('project')->fi()
->beginIF($browseType != 'all')->andWhere('status')->eq($browseType)->fi()
->beginIF($path)->andWhere('path')->like($path . '%')->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
@@ -936,7 +936,7 @@ class programModel extends model
->fetchAll('id');
/* Determine how to display the name of the program. */
if($programTitle and $this->config->global->mode == 'new')
if($programTitle and $this->config->systemMode == 'new')
{
$programList = $this->getPGMPairs();
foreach($projectList as $id => $project)
@@ -1838,7 +1838,7 @@ class programModel extends model
{
$canOrder = common::hasPriv('program', 'PRJOrderUpdate');
$canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');
$projectLink = $this->config->global->mode == 'new' ? helper::createLink('program', 'index', "projectID=$project->id", '', '', $project->id) : helper::createLink('project', 'task', "projectID=$project->id");
$projectLink = $this->config->systemMode == 'new' ? helper::createLink('program', 'index', "projectID=$project->id", '', '', $project->id) : helper::createLink('project', 'task', "projectID=$project->id");
$account = $this->app->user->account;
$id = $col->id;
@@ -1955,7 +1955,7 @@ class programModel extends model
$openModule = $project->from == 'PRJ' ? 'project' : 'program';
common::printIcon('program', 'PRJEdit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openModule", '', $project->id);
common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->project->team, $project->id);
if($this->config->global->mode == 'new') common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
if($this->config->systemMode == 'new') common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
if(common::hasPriv('program','PRJManageProducts') || common::hasPriv('program','PRJWhitelist') || common::hasPriv('program','PRJDelete'))
{
@@ -1963,7 +1963,7 @@ class programModel extends model
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", $this->lang->project->manageProducts, $project->id);
if($this->config->global->mode == 'new') common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
if($this->config->systemMode == 'new') common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
if(common::hasPriv('program','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->program->PRJDelete}'");
echo "</ul>";
echo "</div>";
+6 -6
View File
@@ -17,7 +17,7 @@ js::set('programID', $programID);
js::set('browseType', $browseType);
?>
<div id="mainMenu" class="clearfix">
<?php if($this->config->global->mode == 'new'):?>
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebarHeader">
<div class="title">
<?php echo empty($program) ? $lang->program->project : $program->name;?>
@@ -35,7 +35,7 @@ js::set('browseType', $browseType);
<?php echo html::checkbox('PRJMine', array('1' => $lang->program->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
</div>
<div class="btn-toolbar pull-right">
<?php if($this->config->global->mode == 'new'):?>
<?php if($this->config->systemMode == 'new'):?>
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-primary"');?>
@@ -43,7 +43,7 @@ js::set('browseType', $browseType);
</div>
</div>
<div id='mainContent' class="main-row fade">
<?php if($this->config->global->mode == 'new'):?>
<?php if($this->config->systemMode == 'new'):?>
<div id="sidebar" class="side-col">
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
<div class="cell">
@@ -59,7 +59,7 @@ js::set('browseType', $browseType);
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->program->noPRJ;?></span>
<?php if($this->config->global->mode == 'new'):?>
<?php if($this->config->systemMode == 'new'):?>
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
<?php else:?>
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-info btn-wide"');?>
@@ -76,7 +76,7 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = $this->config->global->mode == 'new' ? common::hasPriv('program', 'PRJBatchEdit') : common::hasPriv('project', 'batchEdit');?>
<?php $canBatchEdit = $this->config->systemMode == 'new' ? common::hasPriv('program', 'PRJBatchEdit') : common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
@@ -105,7 +105,7 @@ js::set('browseType', $browseType);
<?php
if($canBatchEdit)
{
$actionLink = $this->config->global->mode == 'new' ? $this->createLink('program', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
$actionLink = $this->config->systemMode == 'new' ? $this->createLink('program', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}