新建和编辑issue时,里程碑被清空的bug
This commit is contained in:
parent
94c4afd6de
commit
609d1d2fb4
|
@ -264,7 +264,9 @@ module ProjectsHelper
|
|||
|
||||
# Returns a set of options for a select field, grouped by project.
|
||||
def version_options_for_select(versions, selected=nil)
|
||||
project_name = versions.blank? ? "" : versions.first.project.name
|
||||
grouped = Hash.new {|h,k| h[k] = []}
|
||||
grouped[project_name] << ["请选择里程碑", 0]
|
||||
versions.each do |version|
|
||||
grouped[version.project.name] << [version.name, version.id]
|
||||
end
|
||||
|
|
|
@ -160,9 +160,9 @@
|
|||
}
|
||||
// 里程碑添加默认选项
|
||||
$("#issue_fixed_version_id option[value='']").remove();
|
||||
<% if params[:action] == "new" %>
|
||||
$('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>")
|
||||
<% else %>
|
||||
$('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>")
|
||||
<% end %>
|
||||
<%# if params[:action] == "new" %>
|
||||
// $('#issue_fixed_version_id').prepend("<option value='0' selected='selected'>选择里程碑</option>");
|
||||
<%# else %>
|
||||
// $('#issue_fixed_version_id').prepend("<option value='0'>选择里程碑</option>");
|
||||
<%# end %>
|
||||
</script>
|
||||
|
|
|
@ -69,13 +69,13 @@
|
|||
<li class="<%= (activity.done_ratio == 100 ? 'c_green issues_list_min mr5' : 'c_red issues_list_min mr5') %>"><%= activity.done_ratio %>%</li>
|
||||
<li class="issues_list_min">
|
||||
<% if activity.journals.count > 0 %>
|
||||
<span class="issues_icons_mes fl mr5"></span>
|
||||
<span class="issues_icons_mes fl mr5" style="margin-top:15px;" ></span>
|
||||
<span class="fl mr5"><%= activity.journals.count %></span>
|
||||
<% end %>
|
||||
<div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:0px' %>">
|
||||
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
<div class="undis" style="position: absolute; <%= activity.journals.count > 0 ? 'top:25px;' : 'top:7px' %>">
|
||||
<%= link_to "", issue_path(activity.id, :edit => 'true'), :class => 'sy_icons_edit fl mt15', :style => "margin-top:25px;", :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
<% if !defined?(project_id) && !defined?(user_id) %>
|
||||
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<%= link_to "", issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15', :style => "margin-top:25px;" if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(project_id) %>
|
||||
<%= link_to "", issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'sy_icons_del fl mt15' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(user_id) %>
|
||||
|
|
Loading…
Reference in New Issue