为完 切换分支

This commit is contained in:
daiao 2016-11-22 14:29:03 +08:00
parent 0eb6a607b2
commit 196d3b31a1
2 changed files with 10 additions and 5 deletions

View File

@ -267,6 +267,15 @@ module ProjectsHelper
project_name = versions.blank? ? "" : versions.first.project.name
grouped = Hash.new {|h,k| h[k] = []}
grouped[project_name] << ["请选择里程碑", 0]
unless selected.nil?
if (params[:action] == "show" ) && Version.find(selected.id).status == "closed"
version_name = Version.find(selected.id).name
grouped[project_name] << [version_name, selected.id]
end
end
versions.each do |version|
grouped[version.project.name] << [version.name, version.id]
end

View File

@ -160,9 +160,5 @@
}
// 里程碑添加默认选项
$("#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 %>
</script>