项目分支获取
This commit is contained in:
parent
c20b679c22
commit
2e91da4f28
|
@ -1,6 +1,6 @@
|
|||
class PullRequestsController < ApplicationController
|
||||
before_filter :find_project_and_repository
|
||||
before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes]
|
||||
before_filter :connect_gitlab, :only => [:index, :show, :create, :accept_pull_request, :pull_request_commits, :pull_request_changes, :new]
|
||||
layout "base_projects"
|
||||
|
||||
# 返回json格式
|
||||
|
@ -21,6 +21,7 @@ class PullRequestsController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@rev = @g.branches(@project.gpid).map{|b| b.name}
|
||||
end
|
||||
|
||||
# Creates a merge request.
|
||||
|
|
|
@ -8,9 +8,13 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="new-merge-wrap borderBottomNone">
|
||||
<div class="merge-option-name fl">源分支</div><select name="source_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>develop</option><option>rep_quality</option></select>
|
||||
<div class="merge-option-name fl">源分支</div>
|
||||
<%= select_tag :branch, options_for_select(@rev), :name => "source_branch", :value => "source_branch", :class => "ml30 fontGrey3 fb fl" %>
|
||||
<!--<select name="source_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>develop</option><option>rep_quality</option></select>-->
|
||||
<div class="cl mb10"></div>
|
||||
<div class="merge-option-name fl">目标分支</div><select name="target_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>hjq_course</option><option>hjq_beidou</option><option>develop</option><option>dev_huang</option></select>
|
||||
<div class="merge-option-name fl">目标分支</div>
|
||||
<%= select_tag :branch, options_for_select(@rev), :name => "source_branch", :value => "source_branch", :class => "ml30 fontGrey3 fb fl" %>
|
||||
<!--<select name="target_branch" value="source_branch" class="ml30 fontGrey3 fb fl"><option>master</option><option>hjq_course</option><option>hjq_beidou</option><option>develop</option><option>dev_huang</option></select>-->
|
||||
<div class="cl"></div>
|
||||
<p class="fl ml100 mt10"><a href="javascript:void(0);" class="fr linkGrey2">修改分支</a></p>
|
||||
<div class="cl"></div>
|
||||
|
|
Loading…
Reference in New Issue