2016-08-04 15:07:15 +08:00
|
|
|
<div id="create_pull_request_error">
|
|
|
|
<%= render :partial => "pull_requests/error_message" %>
|
2016-08-04 11:13:31 +08:00
|
|
|
</div>
|
2016-08-04 15:07:15 +08:00
|
|
|
|
2016-10-21 17:14:04 +08:00
|
|
|
<!--PullReques开始-->
|
|
|
|
<div class="new_roadmap_conbox mb10" >
|
|
|
|
<div class="new_roadmap_info_top clear ">
|
|
|
|
<%= link_to "返回合并请求列表<span class='new_roadmap_icons_back mr5'></span>".html_safe, project_pull_requests_path(@project), :class => "fl linkBlue2 mt3" %>
|
|
|
|
<span class="ml5 mr5 fl f14">|</span><h4 class="fl new_roadmap_listtitle"><%= @request.title %> </h4><span class="fl <%= pr_status_css(@request.state) %> mt3 ml5"></span>
|
|
|
|
<% if User.current.login == @request.author.try(:username) || is_project_manager?(User.current.id, @project.id) %>
|
|
|
|
<% unless @request.state == "merged" %>
|
|
|
|
<%= link_to "#{@request.state == 'closed' ? '重新打开' : '关闭'}", update_pull_request_project_pull_request_path(@request.id, :project_id => @project.id, :state => @request.state =="closed" ? "reopen" : "close"), :class => "fr c_grey" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2016-10-26 15:40:44 +08:00
|
|
|
<!--<a href="javascript:void(0);" class=" fr c_grey mr10" >编辑</a>-->
|
2016-10-21 17:14:04 +08:00
|
|
|
</div>
|
|
|
|
<div class="clear new_roadmap_listbox">
|
|
|
|
<div class="c_grey02 mb10">
|
|
|
|
<p><%= @request.description %></p>
|
|
|
|
</div>
|
|
|
|
<div class="c_grey clear mt5">
|
2016-12-15 14:36:08 +08:00
|
|
|
<p class="fl">由 <%= link_to_user_login(@request.author.try(:username), "linkBlue2") %>于 <%= format_time(@request.created_at) %> 创建</p>
|
2016-10-21 17:14:04 +08:00
|
|
|
<span class="fl ml10">最近更新:<%= format_time(@request.updated_at) %></span>
|
2016-12-02 10:32:17 +08:00
|
|
|
<p class="fr">
|
|
|
|
<%= find_gitlab_project(@request.source_project_id)+"/"+@request.source_branch %><span class="c_grey02 ml10 mr10">合并到</span><%= find_gitlab_project(@request.target_project_id)+"/"+@request.target_branch %>
|
2016-12-02 11:26:15 +08:00
|
|
|
|
2016-12-02 10:32:17 +08:00
|
|
|
</p>
|
2016-10-21 17:14:04 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-10-27 10:10:06 +08:00
|
|
|
|
|
|
|
<% if @request.state == "merged" %>
|
|
|
|
<div class="alert alert-orange mb15 ">
|
|
|
|
改动已合并至 <%= @request.target_branch %> 分支
|
|
|
|
</div>
|
|
|
|
<% else %>
|
2016-12-15 17:03:59 +08:00
|
|
|
<div id="unmerged_tip">
|
|
|
|
<%= render "show_container" %>
|
|
|
|
</div>
|
2016-10-27 10:10:06 +08:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
2016-10-24 14:34:54 +08:00
|
|
|
<div class="new_roadmap_conbox mb10" >
|
2016-10-21 17:14:04 +08:00
|
|
|
<div class=" clear">
|
|
|
|
<ul class="new_roadmap_nav fl" >
|
2016-10-24 14:34:54 +08:00
|
|
|
<li class="new_roadmap_nav_hover" id="new_roadmap_nav_1" onclick="HoverLi(1);">
|
|
|
|
<%= link_to "评论<span class='new_roadmap_nav_taghover ml5' id='new_roadmap_num_1'>#{@comments_count}</span>".html_safe, pull_request_comments_project_pull_request_path(@request.id, :project_id => @project.id, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
2016-10-21 17:14:04 +08:00
|
|
|
</li>
|
2016-10-24 14:34:54 +08:00
|
|
|
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
|
|
|
|
<%= link_to "提交<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@commits_count}</span>".html_safe, pull_request_commits_project_pull_request_path(@request.id, :project_id => @project.id, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_2" %></li>
|
2016-10-21 17:14:04 +08:00
|
|
|
</li>
|
2016-10-24 14:34:54 +08:00
|
|
|
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
|
|
|
<%= link_to "改动<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@changes_count}</span>".html_safe, pull_request_changes_project_pull_request_path(@request.id, :project_id => @project.id, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_3" %></li>
|
2016-10-21 17:14:04 +08:00
|
|
|
</li>
|
|
|
|
</ul>
|
2016-10-25 16:09:57 +08:00
|
|
|
</div>
|
2016-10-21 17:14:04 +08:00
|
|
|
|
2016-10-25 16:09:57 +08:00
|
|
|
|
|
|
|
<% if @type == nil || @type == "1" %>
|
2017-02-13 13:54:13 +08:00
|
|
|
<div id="merge_record_1" style="width: 998px">
|
2016-10-25 16:09:57 +08:00
|
|
|
<%= render :partial => "pull_requests/pull_request_comments" %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2017-02-13 13:54:13 +08:00
|
|
|
<div id="merge_record_2" class="undis" style="width: 998px">
|
2016-10-25 16:09:57 +08:00
|
|
|
<%= render :partial => "pull_requests/pull_request_commits" %>
|
|
|
|
</div>
|
2017-02-13 13:54:13 +08:00
|
|
|
<div id="merge_record_3" class="undis" style="width: 998px">
|
2016-10-25 16:09:57 +08:00
|
|
|
<%= render :partial => "pull_requests/pull_request_changes" %>
|
2016-10-21 17:14:04 +08:00
|
|
|
</div>
|
2016-10-25 16:09:57 +08:00
|
|
|
|
2016-10-21 17:14:04 +08:00
|
|
|
</div>
|
|
|
|
<!--PullReques结束-->
|
|
|
|
|
2016-10-21 17:53:23 +08:00
|
|
|
<script>
|
2016-10-24 14:34:54 +08:00
|
|
|
function g(o){
|
|
|
|
return document.getElementById(o);
|
|
|
|
}
|
|
|
|
function HoverLi(n){
|
|
|
|
//如果有N个标签,就将i<=N;
|
|
|
|
for(var i=1;i<=3;i++){
|
|
|
|
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
|
|
|
|
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
|
|
|
|
g('new_roadmap_num_'+i).className='new_roadmap_nav_tagnomal';
|
|
|
|
g('merge_record_'+i).className='undis';
|
|
|
|
}
|
|
|
|
g('new_roadmap_nav_'+n).className='new_roadmap_nav_hover';
|
|
|
|
g('new_roadmap_type_'+n).className='new_roadmap_type_hover';
|
|
|
|
g('new_roadmap_num_'+n).className='new_roadmap_nav_taghover';
|
|
|
|
g('merge_record_'+n).className='dis';
|
|
|
|
}
|
2016-10-21 17:53:23 +08:00
|
|
|
</script>
|
2016-10-21 17:14:04 +08:00
|
|
|
|