新建里程碑在项目内不能重名
This commit is contained in:
parent
cfa81fc79d
commit
50fb461f20
|
@ -278,7 +278,7 @@ class VersionsController < ApplicationController
|
|||
# 判断里程碑是否重名
|
||||
def judge_version_title
|
||||
begin
|
||||
version = Version.where(:name => params[:version_name]).first
|
||||
version = Version.where(:name => params[:version_name], :project_id => @project.id).first
|
||||
if version.blank?
|
||||
result = {:result => true}
|
||||
else
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<li class="mb10 clear">
|
||||
<label class="label02"><span class="c_red f12">*</span> <%= l(:field_name) %> : </label>
|
||||
<%= f.text_field :name, :maxlength => 60, :class=>"w650 fl", :style=>"height: 28px;", :id => "project_setting_create_version_title" %>
|
||||
<p class="c_orange ml100" style="display: none" id="project_setting_version_name">标题不能为空</p>
|
||||
<p class="c_orange ml100" style="display: none" id="project_setting_version_name">名称不能为空</p>
|
||||
</li>
|
||||
<li class="mb10 clear">
|
||||
<label class="fl"> <%= l(:label_version_description) %> : </label>
|
||||
|
|
Loading…
Reference in New Issue