repo}"), $lang->goback, '', 'class="btn btn-wide"');?>
repo, 'Git'));?>
diff --git a/module/mr/css/view.css b/module/mr/css/view.css
index 4e42eafa41..3e38664325 100644
--- a/module/mr/css/view.css
+++ b/module/mr/css/view.css
@@ -10,3 +10,4 @@
box-shadow: 0 1px 1px rgba(0,0,0,.05),0 2px 6px 0 rgba(0,0,0,.045)
}
.side-col{padding-top:5px;}
+.detail-content .btn-active-text {padding-top: 5px;}
diff --git a/module/mr/js/create.js b/module/mr/js/create.js
index c9f9cdef18..316ecb0368 100644
--- a/module/mr/js/create.js
+++ b/module/mr/js/create.js
@@ -162,6 +162,8 @@ $(function()
}
$.get(url, function(response)
{
+ if(response == "" && confirm(mrLang.addForApp) == true) window.open(hosts[hostID].url);
+
$('#sourceProject').html('').append(response);
if(repo.project)
{
diff --git a/module/mr/lang/de.php b/module/mr/lang/de.php
index dde731f59d..75fd977b34 100644
--- a/module/mr/lang/de.php
+++ b/module/mr/lang/de.php
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are %s tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
+$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
diff --git a/module/mr/lang/en.php b/module/mr/lang/en.php
index dde731f59d..75fd977b34 100644
--- a/module/mr/lang/en.php
+++ b/module/mr/lang/en.php
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are %s tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
+$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
diff --git a/module/mr/lang/fr.php b/module/mr/lang/fr.php
index dde731f59d..75fd977b34 100644
--- a/module/mr/lang/fr.php
+++ b/module/mr/lang/fr.php
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are %s tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
+$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
diff --git a/module/mr/lang/vi.php b/module/mr/lang/vi.php
index dde731f59d..75fd977b34 100644
--- a/module/mr/lang/vi.php
+++ b/module/mr/lang/vi.php
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = 'Task not linked';
$lang->mr->confirmUnlinkTask = "Are you sure to remove this task?";
$lang->mr->taskSummary = "There are %s tasks on this page";
$lang->mr->notDelbranch = "The source branch cannot be deleted when it is a protected branch";
+$lang->mr->addForApp = "There are no projects under this server, do you want to go to add?";
diff --git a/module/mr/lang/zh-cn.php b/module/mr/lang/zh-cn.php
index 4dbcbb1fca..4e4ed474e4 100644
--- a/module/mr/lang/zh-cn.php
+++ b/module/mr/lang/zh-cn.php
@@ -199,3 +199,4 @@ $lang->mr->unlinkedTasks = '未关联任务';
$lang->mr->confirmUnlinkTask = "您确认移除该任务吗?";
$lang->mr->taskSummary = "本页共 %s 个任务";
$lang->mr->notDelbranch = "源分支为受保护分支时不可删除";
+$lang->mr->addForApp = "该服务器下没有项目,是否前往添加?";
diff --git a/module/mr/model.php b/module/mr/model.php
index e0105fe73e..66d7129e2c 100644
--- a/module/mr/model.php
+++ b/module/mr/model.php
@@ -996,15 +996,8 @@ class mrModel extends model
if($MR and $MR->removeSourceBranch == '1') $data['delete_branch_after_merge'] = true;
$rowMR = json_decode(commonModel::http($url, $data, array(), array(), 'json', 'POST'));
- if(!isset($rowMR->massage))
- {
- $rowMR = $this->apiGetSingleMR($hostID, $projectID, $MRID);
+ if(!isset($rowMR->massage)) $rowMR = $this->apiGetSingleMR($hostID, $projectID, $MRID);
- $this->dao->update(TABLE_MR)->data(array('status' => 'merged'))
- ->where('id')->eq($MRID)
- ->autoCheck()
- ->exec();
- }
return $rowMR;
}
}
@@ -1892,6 +1885,8 @@ class mrModel extends model
{
$this->action->create('task', $task->id, 'mergedmr', '', helper::createLink('mr', 'view', "mr={$MR->id}"));
}
+
+ return $this->dao->update(TABLE_MR)->data(array('status' => 'merged'))->where('id')->eq($MR->id)->exec();
}
/**
diff --git a/module/mr/view/create.html.php b/module/mr/view/create.html.php
index d963aedb09..95d794eafb 100644
--- a/module/mr/view/create.html.php
+++ b/module/mr/view/create.html.php
@@ -13,6 +13,7 @@
+mr);?>
diff --git a/module/mr/view/diff.html.php b/module/mr/view/diff.html.php
index 2684cc66ba..57716856e0 100644
--- a/module/mr/view/diff.html.php
+++ b/module/mr/view/diff.html.php
@@ -93,8 +93,8 @@
lines as $line):?>