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

137 lines
5.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_info_top clear ">
<a href="<%= project_roadmap_path(@project) %>" class="fl linkBlue2 mt3" >
<span class="new_roadmap_icons_back mr5"></span>
返回里程碑列表
</a>
<span class="ml5 mr5 fl f14">|</span>
<h4 class="fl new_roadmap_listtitle"><%= h(@version.name) %></h4>
<ul id="version_status_con_id">
<%= render :partial => 'versions/type_ico', :locals => {:version => @version} %>
</ul>
<p class="fr mt3 c_grey02">
<% if @version.completed? %>
<span class="muban-icons-clock "></span>
<%= format_date(@version.effective_date) %>
<% elsif @version.effective_date %>
<span class="muban-icons-clock "></span>
<%= due_date_distance_in_words(@version.effective_date) %>(<%= format_date(@version.effective_date) %>)
<% end %>
</p>
</div>
<div class="clear new_roadmap_listbox">
<ul class="new_roadmap_list_txt clear mb5">
<%= render :partial => 'versions/overview', :locals => {:version => @version} %>
</ul>
<div class="c_grey02">
<p><%= @version.description %></p>
</div>
<div class="c_grey clear mt5">
<% if @version.user_id.nil? %>
<p class="fl">创建时间:<%= format_time(@version.updated_on) %> </p>
<span class="fl ml10">更新时间:<%= format_time(@version.created_on) %></span>
<% else %>
<p class="fl">由 <%= link_to @version.user.show_name, user_path(@version.user), :class => "linkBlue2" %>于 <%= format_time(@version.updated_on) %> 创建</p>
<span class="fl ml10">最近更新:<%= format_time(@version.created_on) %></span>
<% end %>
</div>
</div>
</div>
<% if @version.issues_count > 0 %>
<div class="new_roadmap_conbox mb10" >
<div class=" clear">
<ul class="new_roadmap_nav fl" >
<li id="new_roadmap_nav_1" class="new_roadmap_nav_hover " onclick="HoverLi(1);">
<a href="javascript:void(0);" id="new_roadmap_type_1" class="new_roadmap_type_nomal" >所有issues</a>
</li>
<li id="new_roadmap_nav_2" onclick="HoverLi(2);" >
<a href="javascript:void(0);" id="new_roadmap_type_2" class="new_roadmap_type_nomal" >issues统计</a>
</li>
</ul>
</div>
<div id="new_roadmap_content_1">
<div class="pd15box">
<table class="new_roadmap_table " cellpadding="0" cellspacing="0" style="width:968px;" >
<thead>
<tr>
<th>ID</th>
<th>标题</th>
<th>类型</th>
<th>指派给</th>
<th>更新时间</th>
<th>状态</th>
<th>完成度</th>
</tr>
</thead>
<tbody>
<% @issues.each do |issue| %>
<tr>
<td>#<%= issue.id %></td>
<td><a href="<%= issue_path(issue) %>" class="new_roadmap_info_title" title="<%= issue.subject %>" target="_blank"><%= issue.subject %></a> </td>
<td> <%= issue.tracker %> </td>
<td><a href="<%= issue.assigned_to_id.nil? ? "" : user_path(issue.assigned_to) %>" class="new_roadmap_info_name" target="_blank">
<%= User.find(issue.try(:assigned_to_id)).nil? ? "" : User.find(issue.try(:assigned_to_id)).show_name %></a>
</td>
<td><%= format_time issue.updated_on %></td>
<td><%= issue.status.name %></td>
<td><span class="<%= issue.done_ratio == 100 ? "c_green" : "c_red" %>" ><%= issue.done_ratio %>%</span></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<% unless @issues.blank? %>
<%= link_to "导出", version_path(@version, :format => 'xls'), :class=>"btn_newpro_grey fl mt10 ml15 mb10"%>
<% end %>
<div class="pages fr" style="width:auto; display:inline-block; margin-right:10px;">
<div>
<%= pagination_links_full @issue_pages, @issue_count, :per_page_links => false, :remote => false, :flag => true, :is_new => true%>
</div>
<div class="cl"></div>
</div><!--翻页 end-->
<div class="cl"></div>
</div><!--new_roadmap_content_1 end-->
<div id="new_roadmap_content_2" class="undis">
<!--缺陷统计开始-->
<div class=" ml15 mr10 mb15">
<%= render :partial => 'versions/issue_statistics', :locals => {:version => @version} %>
</div>
<!--缺陷列表结束-->
</div><!--new_roadmap_content_2 end-->
</div><!--new_roadmap end-->
<% else %>
<div class="mb10">
<%= render :partial => "projects/no_data" %>
</div>
<% end %>
<!--里程碑详情结束-->
<%= call_hook :view_versions_show_bottom, :version => @version %>
<% html_title @version.name %>
<script>
//issues列表
function g(o){
return document.getElementById(o);
}
function HoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=2;i++){
g('new_roadmap_nav_'+i).className='new_roadmap_nav_nomal';
g('new_roadmap_type_'+i).className='new_roadmap_type_nomal';
g('new_roadmap_content_'+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_content_'+n).className='dis';
}
</script>