*Adjust code.
This commit is contained in:
@@ -103,6 +103,6 @@ $config->gitlab->objectTables->bug = TABLE_BUG;
|
||||
$config->gitlab->objectTypes = array();
|
||||
$config->gitlab->objectTypes[''] = '';
|
||||
$config->gitlab->objectTypes['task'] = '任务';
|
||||
$config->gitlab->objectTypes['bug'] = 'bug';
|
||||
$config->gitlab->objectTypes['bug'] = 'Bug';
|
||||
$config->gitlab->objectTypes['story'] = '需求';
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ $lang->gitlab->zentaoProduct = 'Zentao Product';
|
||||
$lang->gitlab->objectType = 'Type'; // task, bug, story
|
||||
|
||||
$lang->gitlab->id = 'ID';
|
||||
$lang->gitlab->name = "{$lang->gitlab->common}name";
|
||||
$lang->gitlab->name = "{$lang->gitlab->common} Name";
|
||||
$lang->gitlab->url = 'GitLab URL';
|
||||
$lang->gitlab->token = 'Token';
|
||||
$lang->gitlab->defaultProject = 'Default Project';
|
||||
|
||||
@@ -41,8 +41,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<td class='text-center form-actions' colspan='2'>
|
||||
<td class='text-center form-actions' colspan='4'>
|
||||
<?php echo html::submitButton($lang->save);?>
|
||||
<?php if(!isonlybody()) echo html::a($this->createLink('repo', 'maintain', ""), $lang->goback, '', 'class="btn btn-wide"'); ?>
|
||||
</td>
|
||||
|
||||
@@ -300,9 +300,7 @@ class story extends control
|
||||
$executionID = $objectID;
|
||||
$gitlabProjects = $this->gitlab->getProjectsByExecution($executionID);
|
||||
foreach($allGitlabs as $id => $name) if($id and !isset($gitlabProjects[$id])) unset($allGitlabs[$id]);
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
|
||||
$this->view->title = $product->name . $this->lang->colon . $this->lang->story->create;
|
||||
$this->view->position[] = html::a($this->createLink('product', 'browse', "product=$productID&branch=$branch"), $product->name);
|
||||
$this->view->position[] = $this->lang->story->common;
|
||||
@@ -332,6 +330,8 @@ class story extends control
|
||||
$this->view->URS = $type == 'story' ? $this->story->getRequierements($productID) : '';
|
||||
$this->view->needReview = ($this->app->user->account == $product->PO || $objectID > 0 || $this->config->story->needReview == 0) ? "checked='checked'" : "";
|
||||
$this->view->type = $type;
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -995,7 +995,7 @@ class story extends control
|
||||
$this->loadModel('gitlab');
|
||||
$relation = $this->gitlab->getRelationByObject('story', $storyID);
|
||||
if(!empty($relation)) $this->gitlab->deleteIssue('story', $storyID, $relation->issueID);
|
||||
|
||||
|
||||
$this->story->delete(TABLE_STORY, $storyID);
|
||||
if($story->parent > 0)
|
||||
{
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->story->sync2Gitlab;?></th>
|
||||
<td><?php echo html::select('gitlab', $gitlabList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select('gitlabProject', '', '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::select('gitlabProject', '', '', "class='w-50px form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
|
||||
|
||||
@@ -221,8 +221,6 @@ class task extends control
|
||||
$allGitlabs = $this->gitlab->getPairs();
|
||||
$gitlabProjects = $this->gitlab->getProjectsByExecution($executionID);
|
||||
foreach($allGitlabs as $id => $name) if($id and !isset($gitlabProjects[$id])) unset($allGitlabs[$id]);
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->view->customFields = $customFields;
|
||||
$this->view->showFields = $this->config->task->custom->createFields;
|
||||
@@ -239,6 +237,8 @@ class task extends control
|
||||
$this->view->members = $members;
|
||||
$this->view->blockID = $blockID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->gitlabList = $allGitlabs;
|
||||
$this->view->gitlabProjects = $gitlabProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user