PR新建相关功能完善
This commit is contained in:
parent
f3c0c25d76
commit
4ec8cc9a50
|
@ -60,7 +60,7 @@
|
|||
<% if allow_pull_request(@project) %>
|
||||
<div class="subNav">
|
||||
<%= link_to "Pull Requests", project_pull_requests_path(@project), :class => "f14 c_blue02" %>
|
||||
<a class="subnav_green" href="javascript:void(0);">+新建请求</a>
|
||||
<%= link_to "+新建请求", new_project_pull_request_path, :class => "subnav_green" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%#= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<%= form_tag(url_for(:controller => 'pull_requests', :action => 'create', :project_id => @project.id, :forked_project_id => @forked_project.try(:gpid)), :id => 'pull_request_form', :method => "post", :remote => true) do %>
|
||||
<div class="new-merge-wrap">
|
||||
<div class="merge-option-name fl mt8">标题</div><input type="text" id="pr_name" name="title" class="merge-title-input fl ml30" />
|
||||
<div class="merge-option-name fl mt8"><span class="c_red">*</span>标题</div><input type="text" id="pr_name" name="title" class="merge-title-input fl ml30" />
|
||||
<p id ="pull_request_title" class="fl ml100 fontGrey2 mt5 c_red" style="display: none">标题不能为空</p>
|
||||
<div class="cl mb10"></div>
|
||||
<div class="merge-option-name fl">描述</div><textarea type="text" name="description" class="merge-description-input fl ml30"></textarea>
|
||||
|
@ -10,12 +10,10 @@
|
|||
<div class="new-merge-wrap borderBottomNone">
|
||||
<div class="merge-option-name fl" style="padding:5px 0">源分支</div>
|
||||
<%= select_tag :branch, options_for_select(@source_rev), :name => "source_branch", :value => "source_branch", :class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;" %>
|
||||
<!--<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" style="padding:5px 0">目标分支</div>
|
||||
<% if @forked_project.nil? %>
|
||||
<%= select_tag :branch, options_for_select(@source_rev), :name => "target_branch", :value => "target_branch",
|
||||
:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %>
|
||||
<%= select_tag :branch, options_for_select(@source_rev), :name => "target_branch", :value => "target_branch",:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %>
|
||||
<% else %>
|
||||
<select onchange="choice_branch(this.value, document.getElementById('pull_request_branch'), <%= @source_rev %>, <%= @forked_rev %>);" name="source_branch" value="source_branch" class="ml30 fontGrey3 fb fl" style = "padding:5px 0 5px 5px;">
|
||||
<option value="source_project_name"><%= @source_project_name %></option>
|
||||
|
@ -26,12 +24,7 @@
|
|||
<option value="source_project_name"><%= rev %></option>
|
||||
<% end %>
|
||||
</select>
|
||||
<%#= select_tag :branch, options_for_select([@source_project_name, @forked_project_name]), :name => "target_project", :value => "target_project",
|
||||
:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetProject" %>
|
||||
<%#= select_tag :branch, options_for_select(@source_rev), :name => "target_branch", :value => "target_branch",
|
||||
:class => "ml30 fontGrey3 fb fl", :style => "padding:5px 0 5px 5px;", :id => "targetBranch" %>
|
||||
<% end %>
|
||||
<!--<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>
|
||||
</div>
|
||||
<div class="new-merge-row b_grey" style="border-top:1px solid #ddd;">
|
||||
|
|
Loading…
Reference in New Issue