This commit is contained in:
王怡栋
2022-02-10 17:18:01 +08:00
10 changed files with 71 additions and 103 deletions
@@ -12,6 +12,7 @@ $lang->mainNav->execution = "{$lang->navIcons['execution']} {$lang->execution->c
$lang->mainNav->kanban = "{$lang->navIcons['kanban']} {$lang->kanban->common}|kanban|space|";
$lang->mainNav->doc = "{$lang->navIcons['doc']} {$lang->doc->common}|doc|index|";
$lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common}|report|productSummary|";
$lang->mainNav->kanban = "{$lang->navIcons['kanban']} {$lang->kanban->common}|kanban|space|";
$lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|";
$lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|";
@@ -28,6 +29,7 @@ if($config->edition != 'open')
$lang->mainNav->menuOrder = array();
$lang->mainNav->menuOrder[5] = 'my';
$lang->mainNav->menuOrder[20] = 'project';
$lang->mainNav->menuOrder[30] = 'kanban';
$lang->mainNav->menuOrder[35] = 'doc';
$lang->mainNav->menuOrder[45] = 'system';
$lang->mainNav->menuOrder[65] = 'admin';
@@ -5,3 +5,7 @@ $config->custom->requiredModules[20] = 'story';
$config->custom->requiredModules[35] = 'execution';
$config->custom->requiredModules[40] = 'task';
$config->custom->requiredModules[85] = 'user';
$config->custom->fieldList['execution']['create'] = 'desc';
$config->custom->fieldList['execution']['edit'] = 'desc,PO,PM,QD,RD';
$config->custom->fieldList['story']['create'] = 'module,pri,estimate,keywords';
@@ -3,6 +3,8 @@ $lang->custom->execution = '看板';
$lang->custom->closedExecution = '已关闭' . $lang->custom->execution;
$lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang->custom->execution}下的卡片、日志以及关联目标都禁止修改。";
$lang->custom->moduleName['execution'] = $lang->custom->execution;
$lang->custom->object = array();
$lang->custom->object['project'] = '项目';
$lang->custom->object['execution'] = $lang->custom->execution;
@@ -12,4 +14,15 @@ $lang->custom->object['todo'] = '待办';
$lang->custom->object['user'] = '用户';
$lang->custom->object['block'] = '区块';
$lang->custom->task = new stdClass();
$lang->custom->task->fields['priList'] = '优先级';
$lang->custom->story = new stdClass();
$lang->custom->story->fields['priList'] = '优先级';
$lang->custom->story->fields['reasonList'] = '关闭原因';
$lang->custom->story->fields['statusList'] = '状态';
$lang->custom->story->fields['reviewRules'] = '评审规则';
$lang->custom->story->fields['reviewResultList'] = '评审结果';
$lang->custom->story->fields['review'] = '评审流程';
if($this->config->edition != 'open') $lang->custom->system = array('required', 'score');
@@ -0,0 +1,36 @@
<?php
/**
* Get field list.
*
* @param string $module
* @access public
* @return array
*/
public function getFieldList($module)
{
if(!isset($this->config->$module)) $this->loadModel($module);
if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']);
foreach($this->config->$module->datatable->fieldList as $field => $items)
{
if($field === 'branch')
{
if($this->session->currentProductType === 'branch') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->branch; if($this->session->currentProductType === 'platform') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->platform;
continue; }
$title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title']));
$this->config->$module->datatable->fieldList[$field]['title'] = $title;
}
if($this->config->edition != 'open' and $module != 'story')
{
$fields = $this->loadModel('workflowfield')->getList($module);
foreach($fields as $field)
{
if($field->buildin) continue;
$this->config->$module->datatable->fieldList[$field->field]['title'] = $field->name;
$this->config->$module->datatable->fieldList[$field->field]['width'] = '120';
$this->config->$module->datatable->fieldList[$field->field]['fixed'] = 'no';
$this->config->$module->datatable->fieldList[$field->field]['required'] = 'no';
}
}
return $this->config->$module->datatable->fieldList;
}
@@ -159,7 +159,6 @@ if($config->systemMode == 'new')
$lang->resource->project->unbindWhitelist = 'unbindWhitelist';
$lang->resource->project->manageProducts = 'manageProducts';
$lang->resource->project->dynamic = 'dynamic';
$lang->resource->project->build = 'build';
$lang->resource->project->qa = 'qa';
$lang->resource->project->bug = 'bug';
$lang->resource->project->testcase = 'testcase';
@@ -199,7 +198,6 @@ if($config->systemMode == 'new')
$lang->project->methodOrder[120] = 'manageProducts';
$lang->project->methodOrder[125] = 'view';
$lang->project->methodOrder[130] = 'dynamic';
$lang->project->methodOrder[135] = 'build';
$lang->project->methodOrder[140] = 'qa';
$lang->project->methodOrder[145] = 'bug';
$lang->project->methodOrder[150] = 'testcase';
@@ -212,11 +210,6 @@ if($config->systemMode == 'new')
$lang->project->methodOrder[185] = 'team';
$lang->project->methodOrder[190] = 'unlinkMember';
$lang->resource->projectbuild = new stdclass();
$lang->resource->projectbuild->browse = 'browse';
$lang->projectbuild->methodOrder[5] = 'browse';
/* Project Story. */
$lang->resource->projectstory = new stdclass();
$lang->resource->projectstory->story = 'story';
@@ -555,20 +548,6 @@ $lang->task->methodOrder[105] = 'deleteEstimate';
$lang->task->methodOrder[110] = 'report';
$lang->task->methodOrder[115] = 'batchChangeModule';
$lang->resource->job = new stdclass();
$lang->resource->job->browse = 'browseAction';
$lang->resource->job->create = 'create';
$lang->resource->job->edit = 'edit';
$lang->resource->job->delete = 'delete';
$lang->resource->job->exec = 'exec';
$lang->resource->job->view = 'view';
$lang->job->methodOrder[5] = 'browse';
$lang->job->methodOrder[10] = 'create';
$lang->job->methodOrder[15] = 'edit';
$lang->job->methodOrder[20] = 'delete';
$lang->job->methodOrder[25] = 'exec';
/* Doc. */
$lang->resource->doc = new stdclass();
$lang->resource->doc->index = 'index';
+12
View File
@@ -7,3 +7,15 @@ $config->story->list->exportFields = '
closedBy, closedDate, closedReason,
lastEditedBy, lastEditedDate,
childStories, linkStories, duplicateStory, files';
$config->story->datatable->defaultField = array('id', 'pri', 'title', 'openedBy', 'assignedTo', 'estimate', 'status', 'actions');
unset($config->story->datatable->fieldList['plan']);
unset($config->story->datatable->fieldList['source']);
unset($config->story->datatable->fieldList['sourceNote']);
unset($config->story->datatable->fieldList['stage']);
unset($config->story->datatable->fieldList['category']);
unset($config->story->datatable->fieldList['feedbackBy']);
unset($config->story->datatable->fieldList['notifyEmail']);
unset($config->story->datatable->fieldList['bugCount']);
unset($config->story->datatable->fieldList['caseCount']);
@@ -0,0 +1,4 @@
<script>
$("a[href^='#affectedBugs']").parent().remove();
$("a[href^='#affectedCases']").parent().remove();
</script>
@@ -105,26 +105,6 @@
<?php echo html::hidden('status', $story->status);?>
</td>
</tr>
<?php if($story->status != 'draft' and $story->type == 'story'):?>
<tr>
<th><?php echo $lang->story->stage;?></th>
<td>
<?php
if($story->stages and $branchTagOption)
{
foreach($story->stages as $branch => $stage)
{
if(isset($branchTagOption[$branch])) echo '<p>' . $branchTagOption[$branch] . html::select("stages[$branch]", $lang->story->stageList, $stage, "class='form-control chosen'") . '</p>';
}
}
else
{
echo html::select('stage', $lang->story->stageList, $story->stage, "class='form-control chosen'");
}
?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->pri;?></th>
<td><?php echo html::select('pri', $lang->story->priList, $story->pri, "class='form-control chosen'");?></td>
@@ -188,49 +168,6 @@
<?php $this->printExtendFields($story, 'div', 'position=right');?>
<div class='detail'>
<div class='detail-title'><?php echo $lang->story->legendMisc;?></div>
<table class='table table-form'>
<?php if($story->status == 'closed'):?>
<tr id='duplicateStoryBox'>
<th class='w-70px'><?php echo $lang->story->duplicateStory;?></th>
<td><?php echo html::input('duplicateStory', $story->duplicateStory, "class='form-control'");?></td>
</tr>
<?php endif;?>
<?php if($story->status == 'closed'):?>
<tr class='text-top'>
<th><?php echo $lang->story->childStories;?></th>
<td>
<?php echo html::a($this->createLink('story', 'linkStory', "storyID=$story->id&type=childStories", '', true), $lang->story->linkStory, '', "data-toggle='modal' data-type='iframe' data-width='95%'");?>
</td>
</tr>
<tr>
<th></th>
<td>
<ul class='list-unstyled'>
<?php
if($story->childStories)
{
$childStories = explode(',', $story->childStories);
foreach($childStories as $childStoryID)
{
if(isset($story->extraStories[$childStoryID]))
{
echo "<li><div class='checkbox-primary'>";
echo "<input type='checkbox' checked='checked' name='childStories[]' value=$childStoryID />";
echo "<label>#{$childStoryID} {$story->extraStories[$childStoryID]}</label>";
echo '</div></li>';
}
}
}
?>
<span id='childStoriesBox'></span>
</ul>
</td>
</tr>
<?php endif;?>
</table>
</div>
</div>
</div>
</div>
@@ -217,23 +217,6 @@
<th><?php echo $lang->story->status;?></th>
<td><span class='status-story status-<?php echo $story->status?>'><span class="label label-dot"></span> <?php echo $this->processStatus('story', $story);?></span></td>
</tr>
<?php if($story->type != 'requirement'):?>
<tr class='stage-line'>
<th><?php echo $lang->story->stage;?></th>
<td>
<?php
if($story->stages and $branches)
{
foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '<br />';
}
else
{
echo $lang->story->stageList[$story->stage];
}
?>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->story->pri;?></th>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
@@ -44,13 +44,11 @@
<div class="col-4 text-center table-col">
<ul class="nav nav-primary">
<li class="active"><?php echo html::a($this->createLink('todo', 'calendar'), $lang->todo->common);?></li>
<?php if(isset($effortCount)):?>
<?php if(common::hasPriv('effort', 'calendar')):?>
<li><?php echo html::a($this->createLink('effort', 'calendar'), $lang->effort->common);?></li>
<?php elseif(common::hasPriv('my', 'effort')):?>
<li><?php echo html::a($this->createLink('my', 'effort'), $lang->effort->common);?></li>
<?php endif;?>
<?php endif;?>
</ul>
</div>
<div class="col-4 table-col"></div>