54 lines
2.8 KiB
Plaintext
54 lines
2.8 KiB
Plaintext
<% if @allow_to_pull_request %>
|
|
<!--PullReques列表开始-->
|
|
<div class="new_roadmap_conbox mb10" >
|
|
<div class="new_roadmap_navbox clear">
|
|
<ul class="new_roadmap_nav fl" >
|
|
<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'>#{@requests_opened_count}</span>".html_safe,
|
|
project_pull_requests_path(:type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1" %>
|
|
</li>
|
|
<li id="new_roadmap_nav_2" onclick="HoverLi(2);">
|
|
<%= link_to "已处理<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_2'>#{@requests_merged_count}</span>".html_safe,
|
|
project_pull_requests_path(:type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_2" %>
|
|
</li>
|
|
<li id="new_roadmap_nav_3" onclick="HoverLi(3);">
|
|
<%= link_to "已关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_3'>#{@requests_closed_count}</span>".html_safe,
|
|
project_pull_requests_path(:type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_3" %>
|
|
</li>
|
|
</ul>
|
|
<% if allow_pull_request(@project) && User.current.member_of?(@project) %>
|
|
<%= link_to "创建Pull Request", new_project_pull_request_path, :class => "btn btn-green fr mr15 mt10" %>
|
|
<% end %>
|
|
</div>
|
|
<div id="pull_requests_list" style="width:100%">
|
|
<%= render "pull_requests/pull_requests_list" %>
|
|
</div>
|
|
</div>
|
|
<% else %>
|
|
<div class="mb10">
|
|
<%= render :partial => "projects/no_data" %>
|
|
</div>
|
|
<% end %>
|
|
<script>
|
|
// $("#mergeBanner").parent().css({"width":"730px","background-color":"#fff","padding":"10px","margin-left":"10px","margin-bottom":"10px"});
|
|
// $("#mergeBanner").parent().before("<div class='homepageRightBanner mb10'><span class='f16 fontGrey3'>Pull Request</span></div>");
|
|
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('pull_requests_list').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('pull_requests_list').className='dis';
|
|
|
|
}
|
|
</script>
|
|
|