Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
a4a0ef139b
|
@ -144,7 +144,7 @@ class PullRequestsController < ApplicationController
|
||||||
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
||||||
def update_pull_request
|
def update_pull_request
|
||||||
begin
|
begin
|
||||||
@g.update_merge_request(@project.gpid, params[:id], :state_event => params[:state])
|
@g.update_merge_request(@project.gpid, params[:id], User.current.gid, :state_event => params[:state])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
format.html{redirect_to project_pull_request_path(params[:id], :project_id => @project.id)}
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
|
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create_pull_request_comment', :project_id => @project.id), :id => 'pull_request_comment_form', :method => "post", :remote => true) do %>
|
||||||
<textarea id="pull_request_comment" name="pull_request_comment"></textarea>
|
<textarea id="pull_request_comment" name="pull_request_comment"></textarea>
|
||||||
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
|
<span id ="pr_comment_tip" class="fontGrey2 c_red" style="display: none">内容不能为空</span>
|
||||||
<a href="javascript:void(0);" class="BlueCirBtn mt10" onclick="pull_request_commit()">提交请求</a>
|
<a href="javascript:void(0);" class="BlueCirBtn mt10" onclick="pull_request_commit()">留言</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% @comments.each do |comment| %>
|
<% @comments.each do |comment| %>
|
||||||
|
|
|
@ -33,7 +33,11 @@
|
||||||
<% else %>
|
<% else %>
|
||||||
<% if is_project_manager?(User.current.id, @project.id) %>
|
<% if is_project_manager?(User.current.id, @project.id) %>
|
||||||
<div class="merge-commit-option mt15">
|
<div class="merge-commit-option mt15">
|
||||||
|
<% if @request.state == "closed" %>
|
||||||
|
该请求已被关闭
|
||||||
|
<% else %>
|
||||||
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %>
|
<%= link_to "接受请求", accept_pull_request_project_pull_request_path(@request.id, :project_id => @project.id), :class => "BlueCirBtn", :remote => true %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -64,8 +64,8 @@ class Gitlab::Client
|
||||||
# @option options [Integer] :assignee_id The ID of a user to assign merge request.
|
# @option options [Integer] :assignee_id The ID of a user to assign merge request.
|
||||||
# @option options [String] :state_event New state (close|reopen|merge).
|
# @option options [String] :state_event New state (close|reopen|merge).
|
||||||
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
# @return [Gitlab::ObjectifiedHash] Information about updated merge request.
|
||||||
def update_merge_request(project, id, options={})
|
def update_merge_request(project, id, gid, options={})
|
||||||
put("/projects/#{project}/merge_request/#{id}", :body => options)
|
put("/projects/#{project}/merge_request/#{id}?user_id=#{gid}", :body => options)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Adds a comment to a merge request.
|
# Adds a comment to a merge request.
|
||||||
|
|
Loading…
Reference in New Issue