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

27 lines
1.8 KiB
Plaintext

<li>已关闭 <span class="ml5 "><%= version.closed_issues_count%></span></li>
<li><span >/</span></li>
<li>issues<span class="ml5 "><%= version.issues_count%></span></li>
<li>
<%= progress_bar([version.closed_percent], :width => '300px;', :legend => ('%0.0f%' % version.completed_percent)) %>
<span class="ml5 c_red">
<%= version.closed_percent.round %>%
</span>
</li>
<%= form_tag({:controller => 'versions', :action => 'update', :version => @version, :flag => 1},:remote => 'true', :method =>:put, :id=>"version-#{@version.id}-status-form", :class => 'fr new_roadmap_select') do %>
<%= select( :versions, :status, Version::VERSION_STATUSES.collect {|s| [l("version_status_#{s}"), s]},
{ :include_blank => false, :selected=> @version.status ? @version.status : 0},
{ :onchange =>"remote_function('#version-#{@version.id}-status-form');", :id =>"status", :name => "status",:class=>"fr new_roadmap_select"}) %>
<% end %>
<%#= link_to "", {:controller => "versions", :action => "destroy", :project_id => @version.project_id}, :data => {:confirm => l(:text_are_you_sure_version)}, :class => "roadmap_icons_del fr mt5 mr5" if User.current.allowed_to?(:manage_versions, version.project) %>
<%= link_to "", version_path(version, :is_show => true), :method => "delete", :data => {:confirm => l(:text_are_you_sure_version)}, :onclick => "confirm_can_delte", :class => "roadmap_icons_del_show fr mt5 mr5" if User.current.allowed_to?(:manage_versions, version.project) %>
<%= link_to( "", edit_version_path(@version, :is_create => true), :class => 'roadmap_icons_edit_show fr mt5', :remote => true) if User.current.allowed_to?(:manage_versions, @version.project) %>
<%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
<script>
function remote_function(id) {
$(id).submit();
}
</script>