* Adjust mr control browse function.
This commit is contained in:
+11
-2
@@ -1,6 +1,17 @@
|
||||
<?php
|
||||
class mr extends control
|
||||
{
|
||||
/**
|
||||
* Browse mr.
|
||||
*
|
||||
* @param int $objectID
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($objectID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->loadModel('mr');
|
||||
@@ -14,8 +25,6 @@ class mr extends control
|
||||
$mrList = array_chunk($mrList, $pager->recPerPage);
|
||||
|
||||
$this->view->title = $this->lang->mr->common . $this->lang->colon . $this->lang->mr->browse;
|
||||
$this->view->position[] = $this->lang->mr->common;
|
||||
$this->view->position[] = $this->lang->mr->browse;
|
||||
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
|
||||
@@ -18,9 +18,7 @@ $lang->mr->author = '创建人';
|
||||
$lang->mr->assignee = '指派给';
|
||||
$lang->mr->reviewer = '评审人';
|
||||
$lang->mr->link = 'GitLab链接';
|
||||
$lang->mr->pipeline = '流水线';
|
||||
$lang->mr->auditStatus = '审核状态';
|
||||
$lang->mr->lastExec = '执行状态';
|
||||
$lang->mr->mrStatus = '合并状态';
|
||||
|
||||
$lang->mr->sourceProject = '源项目';
|
||||
$lang->mr->sourceBranch = '源分支';
|
||||
|
||||
+2
-3
@@ -77,9 +77,8 @@ class mrModel extends model
|
||||
$list->name = $subMR->title;
|
||||
$list->target_branch = $subMR->target_branch;
|
||||
$list->source_branch = $subMR->source_branch;
|
||||
$list->pipeline = $subMR->merge_when_pipeline_succeeds;
|
||||
$list->auditStatus = $subMR->state;
|
||||
$list->lastExec = $subMR->merge_status;
|
||||
$list->status = $subMR->state;
|
||||
$list->mrStatus = $subMR->merge_status;
|
||||
|
||||
$lists[] = $list;
|
||||
}
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->mr->name); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('sourceBranch', $orderBy, $vars, $lang->mr->sourceBranch); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('targetBranch', $orderBy, $vars, $lang->mr->targetBranch); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('pipeline', $orderBy, $vars, $lang->mr->pipeline); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('auditStatus', $orderBy, $vars, $lang->mr->auditStatus); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('lastExec', $orderBy, $vars, $lang->mr->lastExec); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('status', $orderBy, $vars, $lang->mr->status); ?></th>
|
||||
<th class='w-100px text-left'><?php common::printOrderLink('mrStatus', $orderBy, $vars, $lang->mr->mrStatus); ?></th>
|
||||
<th class='w-100px c-actions-4'><?php echo $lang->actions; ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -37,9 +36,8 @@
|
||||
<td class='text'><?php echo $mr->name; ?></td>
|
||||
<td class='text'><?php echo $mr->target_branch; ?></td>
|
||||
<td class='text'><?php echo $mr->source_branch; ?></td>
|
||||
<td class='text'><?php echo $mr->pipeline; ?></td>
|
||||
<td class='text'><?php echo $mr->auditStatus; ?></td>
|
||||
<td class='text'><?php echo $mr->lastExec; ?></td>
|
||||
<td class='text'><?php echo $mr->status; ?></td>
|
||||
<td class='text'><?php echo $mr->mrStatus; ?></td>
|
||||
<td class='text-left c-actions'>
|
||||
<?php
|
||||
common::printLink('mr', 'list', "mr={$mr->id}", '<i class="icon icon-review"></i>', '', "title='{$lang->mr->list}' class='btn btn-info'");
|
||||
|
||||
Reference in New Issue
Block a user