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

49 lines
2.9 KiB
Plaintext
Raw Normal View History

2016-10-20 18:08:24 +08:00
<% @versions.each do |version| %>
<div class="clear new_roadmap_listbox">
<div class="clear">
<h4 class="fl new_roadmap_listtitle"><%= link_to_version version, :name => version_anchor(version) %></h4><span class="fl <%= get_version_type(version.status) %> mt3 ml5"></span>
2016-10-24 15:42:57 +08:00
<%= link_to "导出Issue", version_path(version, :format => 'xls'), :class => "btn_newpro_grey fr" %>
2016-10-26 18:39:14 +08:00
<%= link_to "", version_path(version, :is_index => true), :method => "delete", :data => {:confirm => l(:text_are_you_sure_version)}, :class => "roadmap_icons_del fr mt5 mr5" if User.current.allowed_to?(:manage_versions, version.project) %>
2016-10-26 16:28:40 +08:00
<%# {:controller => 'versions', :action => 'destroy', :project_id => version.project, :is_index => true}, :class => "roadmap_icons_del fr mt5 mr5" if User.current.allowed_to?(:manage_versions, version.project) %>
2016-10-26 15:18:07 +08:00
<%= link_to "", edit_version_path(version, :is_index => true), :class => 'roadmap_icons_edit fr mt5', :remote => true %>
2016-10-20 18:08:24 +08:00
</div>
<ul class="new_roadmap_list_txt clear mb5">
2016-10-20 18:14:09 +08:00
<li>完成 <span class="ml5 c_red" title="<%= version.closed_percent %>"><%= version.closed_percent.round %>% </span></li>
2016-10-20 18:08:24 +08:00
<li>Issues<span class="ml5 "><%= version.issues_count %> </span></li>
<li>已关闭<span class="ml5 "><%= version.closed_issues_count %> </span></li>
<li>
<% if version.completed? %>
2016-10-21 20:01:20 +08:00
<%= format_date(version.effective_date) %>
2016-10-20 18:08:24 +08:00
<% elsif version.effective_date %>
2016-10-21 20:01:20 +08:00
<span class="muban-icons-clock"></span>
<span class="<%= version.effective_date < Date.today ? "c_red" : "" %>">
<%= due_date_distance_in_words(version.effective_date) %>(<%= format_date(version.effective_date) %>)
</span>
2016-10-20 18:08:24 +08:00
<% end %>
<!--<span ></span>截止日期剩余 5天(2016-10-31)</li>-->
</ul>
<div class="c_grey">
<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>
2016-10-20 18:08:24 +08:00
</div>
<% end %>
<div style="text-align:center;">
<div class="pages" style="width:auto; display:inline-block;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @version_pages, @versions_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>
</ul>
<div class="cl"></div>
</div>
</div>
<div class="cl"></div>