Merge branch 'sprint/tianshujie_fixbug' into 'master'
Sprint/tianshujie fixbug See merge request easycorp/zentaopms!2725
This commit is contained in:
@@ -308,8 +308,6 @@ class design extends control
|
||||
$repos = $this->loadModel('repo')->getRepoPairs('project', $design->project);
|
||||
$repoID = $repoID ? $repoID : key($repos);
|
||||
|
||||
if(empty($repoID)) return print(js::locate(helper::createLink('repo', 'create', "objectID=$design->project")));
|
||||
|
||||
$repo = $this->loadModel('repo')->getRepoByID($repoID);
|
||||
$revisions = $this->repo->getCommits($repo, '', 'HEAD', '', '', $begin, $end);
|
||||
|
||||
@@ -399,12 +397,15 @@ class design extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $recPerPage, $pageID);
|
||||
|
||||
$design = $this->design->getCommit($designID, $pager);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->submission;
|
||||
$this->view->position[] = $this->lang->design->submission;
|
||||
|
||||
$this->view->design = $this->design->getCommit($designID, $pager);
|
||||
$this->view->design = $design;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->repos = $this->loadModel('repo')->getRepoPairs('project', $design->project);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
#mainContent .pull-right{margin-bottom: 10px}
|
||||
.table{border: 1px solid #ddd;}
|
||||
@@ -0,0 +1,20 @@
|
||||
$(function()
|
||||
{
|
||||
$('#linkCommit').click(function()
|
||||
{
|
||||
if(repos.length == 0)
|
||||
{
|
||||
var onlybody = config.onlybody;
|
||||
config.onlybody = 'no';
|
||||
|
||||
var link = createLink('repo', 'create', 'objectID=' + projectID);
|
||||
|
||||
config.onlybody = onlybody;
|
||||
window.parent.$.apps.open(link, 'devops');
|
||||
|
||||
parent.$('#triggerModal').modal('hide');
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -51,9 +51,9 @@
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
$vars = "design={$design->id}";
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'alter', '', '', '', '', '', $design->project);
|
||||
common::printIcon('design', 'edit', $vars, $design, 'list', 'alter');
|
||||
common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'list-alt', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->project);
|
||||
common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,10 +11,8 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
#mainContent .pull-right{margin-bottom: 10px}
|
||||
.table{border: 1px solid #ddd;}
|
||||
</style>
|
||||
<?php js::set('repos', $repos);?>
|
||||
<?php js::set('projectID', $design->project);?>
|
||||
<div id="mainContent">
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
@@ -24,7 +22,7 @@
|
||||
</h2>
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php common::printLink('design', 'linkCommit', "designID=$design->id", "<i class='icon icon-plus'></i>" . $lang->design->linkCommit, '_blank', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('design', 'linkCommit', "designID=$design->id", "<i class='icon icon-plus'></i>" . $lang->design->linkCommit, '', "class='btn btn-primary' id='linkCommit'");?>
|
||||
</div>
|
||||
<?php if(empty($design->commit)):?>
|
||||
<div class="table-empty-tip">
|
||||
|
||||
@@ -7,4 +7,4 @@ table {width: 90% !important;}
|
||||
#product_chosen {width: 50% !important;}
|
||||
#execution_chosen {width: 50% !important;}
|
||||
|
||||
#whiteListBox .input-group:last-child {margin-top: 10px;}
|
||||
#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;}
|
||||
|
||||
@@ -4,3 +4,4 @@ form {margin-right: 30px;}
|
||||
#whiteListBox .input-group:last-child {margin-top: 10px;}
|
||||
|
||||
.center-block {margin-top: 20px;}
|
||||
#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;}
|
||||
|
||||
@@ -1971,7 +1971,7 @@ class execution extends control
|
||||
if($execution->type == 'kanban')
|
||||
{
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return print($this->fetch('execution', 'kanban', "executionID=$executionID"));
|
||||
return $this->locate(inlink('kanban', "executionID=$executionID"));
|
||||
return print(js::locate(inlink('kanban', "executionID=$executionID")));
|
||||
}
|
||||
|
||||
$this->app->loadLang('program');
|
||||
@@ -2041,7 +2041,7 @@ class execution extends control
|
||||
|
||||
$this->lang->execution->menu = new stdclass();
|
||||
$execution = $this->commonAction($executionID);
|
||||
if($execution->type != 'kanban') return $this->locate(inlink('view', "executionID=$executionID"));
|
||||
if($execution->type != 'kanban') return print(js::locate(inlink('view', "executionID=$executionID")));
|
||||
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($executionID, $browseType, $orderBy, 0, $groupBy);
|
||||
$executionActions = array();
|
||||
@@ -3279,7 +3279,8 @@ class execution extends control
|
||||
$this->view->project = $project;
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
if(!empty($project->model) and $project->model == 'kanban' and !(defined('RUN_MODE') and RUN_MODE == 'api')) return $this->locate($this->createLink('project', 'index', "projectID=$projectID"));
|
||||
if(!$projectID) return print(js::locate($this->createLink('project', 'browse')));
|
||||
if(!empty($project->model) and $project->model == 'kanban' and !(defined('RUN_MODE') and RUN_MODE == 'api')) return print(js::locate($this->createLink('project', 'index', "projectID=$projectID")));
|
||||
}
|
||||
|
||||
if($this->app->viewType == 'mhtml')
|
||||
|
||||
@@ -833,7 +833,7 @@ class task extends control
|
||||
}
|
||||
|
||||
$execution = $this->execution->getById($task->execution);
|
||||
if(!isonlybody() and $execution->type == 'kanban') return $this->locate($this->createLink('execution', 'kanban', "executionID=$execution->id"));
|
||||
if(!isonlybody() and $execution->type == 'kanban') return print(js::locate($this->createLink('execution', 'kanban', "executionID=$execution->id")));
|
||||
|
||||
$this->session->project = $task->project;
|
||||
|
||||
|
||||
@@ -718,7 +718,7 @@ class upgrade extends control
|
||||
}
|
||||
|
||||
$extFiles = $this->upgrade->getExtFiles();
|
||||
if(!empty($extFiles) and $skipMoveFile == 'no') return $this->locate(inlink('moveExtFiles', "fromVersion=$fromVersion"));
|
||||
if(!empty($extFiles) and $skipMoveFile == 'no') return print(js::locate(inlink('moveExtFiles', "fromVersion=$fromVersion")));
|
||||
|
||||
$response = $this->upgrade->removeEncryptedDir();
|
||||
if($response['result'] == 'fail')
|
||||
|
||||
Reference in New Issue
Block a user