Merge branch 'develop' into 'develop'

在同一项目内的里程碑,不能重名

在同一项目内的里程碑,不能重名

See merge request !90
This commit is contained in:
黄井泉 2016-12-27 17:00:25 +08:00
commit 04ce4107bb
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -4,7 +4,7 @@
<li class="mb10 clear">
<label class="label02"><span class="c_red f12">*</span>&nbsp;<%= l(:field_name) %>&nbsp;&nbsp;:&nbsp;</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">&nbsp;<%= l(:label_version_description) %>&nbsp;&nbsp;:&nbsp;</label>