socialforge/app/views/versions/index.html.erb

61 lines
3.4 KiB
Plaintext

<script type="text/javascript" src="/javascripts/i18n/jquery.ui.datepicker-zh-CN.js"></script>
<!--里程碑列表开始-->
<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'>#{@versions_count}</span>".html_safe, project_roadmap_path(@project, :type => "1"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :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'>#{@versions_open_count}</span>".html_safe, project_roadmap_path(@project, :type => "2"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :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'>#{@versions_locked_count}</span>".html_safe, project_roadmap_path(@project, :type => "3"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_3" %>
</li>
<li id="new_roadmap_nav_4" onclick="HoverLi(4);">
<%= link_to "关闭<span class='new_roadmap_nav_tagnomal ml5' id='new_roadmap_num_4'>#{@versions_closed_count}</span>".html_safe, project_roadmap_path(@project, :type => "4"), :remote => true, :class => "new_roadmap_type_nomal", :id => "new_roadmap_type_1", :id => "new_roadmap_type_4" %>
</li>
</ul>
<!-- <a href="javascript:void(0);" class="btn btn-green fr mr15 mt10"> 新建 </a>-->
<% if ( is_project_member?(User.current.id, @project.id) && role_of_members_in_project(@project.id, User.current.id) != 'Reporter') || User.current.admin? %>
<%= link_to "新建", new_project_version_path(@project, :is_create => true), :class => 'btn btn-green fr mr15 mt10', :remote => true %>
<% end %>
</div>
<% if @versions_count > 0 %>
<div id="version_list">
<%= render :partial => "versions/list" %>
</div>
<% else %>
<%= render :partial => "projects/no_data" %>
<% end %>
</div><!--new_roadmap end-->
<!--里程碑列表结束-->
<% html_title(l(:label_roadmap)) %>
<%= context_menu issues_context_menu_path %>
<script type="text/javascript" language="javascript">
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=4;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('version_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('version_list').className='dis';
}
// $(".new_roadmap_nav li").click(function(){
// $(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
// $(".new_roadmap_nav li").removeClass("new_roadmap_nav_hover");
// $(this).addClass("new_roadmap_nav_hover");
// });
</script>