Compare commits

...

2 Commits

Author SHA1 Message Date
ShengYue.Xu 047f6d2c95 修改了缺陷当中 #868、#780、#603 2014-08-21 19:57:49 +08:00
ShengYue.Xu e6c8dbef4f 修改了版权符号,由原来的@改成了© 2014-08-20 21:22:19 +08:00
7 changed files with 54 additions and 49 deletions

View File

@ -34,9 +34,10 @@ class Course < ActiveRecord::Base
acts_as_attachable :view_permission => :view_files,
:delete_permission => :manage_files
validates_presence_of :password, :term,:name
validates_presence_of :password, :term,:name,:description
validates_format_of :class_period, :with =>/^[1-9]\d*$/
validates_format_of :name,:with =>/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/
validates_length_of :description, :maximum => 10000
before_save :self_validate
after_save :create_board_sync

View File

@ -29,6 +29,7 @@ class News < ActiveRecord::Base
validates_presence_of :title, :description
validates_length_of :title, :maximum => 60
validates_length_of :summary, :maximum => 255
validates_length_of :description, :maximum => 10000
acts_as_attachable :delete_permission => :manage_news
acts_as_searchable :columns => ['title', 'summary', "#{table_name}.description"], :include => :project

View File

@ -115,7 +115,7 @@ class Project < ActiveRecord::Base
validates_uniqueness_of :identifier
validates_uniqueness_of :name
validates_associated :repository, :wiki
# validates_length_of :description, :maximum => 255
validates_length_of :description, :maximum => 10000
validates_length_of :name, :maximum => 255
validates_length_of :homepage, :maximum => 255
validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH

View File

@ -91,7 +91,7 @@
<tr style="width:700px; margin-left: -10px;">
<span><%= l(:label_work_name) %></span>
<span class="contest-star"> * </span>:
<td><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
<td><%= f.text_field :name, :required => true,:maxlength => 25, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
</tr>
<br/>
@ -101,8 +101,8 @@
<tr style="width:800px;">
<span><%= l(:label_running_platform) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
<td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true,:maxlength => 125, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br/>
@ -112,8 +112,8 @@
<span><%= l(:label_work_type) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %></td>
<td style="width: 100px"><%= f.text_field :app_type_name, :required => true,:maxlength => 125, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br/>
@ -122,7 +122,7 @@
<tr style="width:800px;">
<span><%= l(:label_work_description) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
<td style="width: 100px"><%= f.text_field :description, :required => true,:maxlength => 125, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
@ -132,8 +132,8 @@
<tr style="width:800px;">
<span><%= l(:label_softapplication_developers) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
<td style="width: 100px"><%= f.text_field :application_developers, :required => true,:maxlength => 125, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br/>

View File

@ -9,9 +9,9 @@
<%#= link_to(l(:label_attachment_new), 'javascript:void(0);', :onclick=>"$('#file_buttons').slideToggle();", :class => 'icon icon-add') if User.current.allowed_to?(:manage_files, @course) %>
<div class="clearfix"></div>
<div id="file_buttons" class="nhidden">
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
<div class="box" id="files-box">
<label for="files-box" style="font-weight: bold;"><%= l(:label_search_name) %></label>
<% if attachmenttypes.any? %>
&nbsp; &nbsp; &nbsp;
<label for="attachment_browse_label"><%= l(:attachment_browse) %></label>
@ -25,6 +25,9 @@
:onchange => "course_attachment_contenttypes_searchex(this.value)" %>
<% end %>
<%= link_to(l(:label_upload_files), 'javascript:void(0);', :class => 'icon m5p5 button_submit', :onclick => "$('#relation_file_div').slideUp();$('#upload_file_div').slideToggle('slow');") if User.current.allowed_to?(:manage_files, @course) %>
<%= link_to(l(:label_relation_files), 'javascript:void(0);', :onclick => "$('#upload_file_div').slideUp();$('#relation_file_div').slideToggle();", :class => 'icon m5p5 button_submit') if User.current.allowed_to?(:manage_files, @course) %>
<div id="upload_file_div" class="relation_file_div hidden">
<%= render :partial => 'course_new', locals: {course: @course} %>
</div>
@ -54,7 +57,7 @@
</div>
<% end -%>
</fieldset>
<div class="line_under" style="margin:20px 0px;"></div>
</div>
</div>
</div>

View File

@ -1,8 +1,9 @@
<h3><%=l(:label_attachment_new)%></h3>
<fieldset>
<legend><%=l(:label_attachment_new)%></legend>
<% attachmenttypes = course.attachmenttypes %>
<%= error_messages_for 'attachment' %>
<%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form", :class => "tabular") do %>
<div class="box">
<p>
<% if attachmenttypes.any? %>
<%= l(:attachment_type) %></label>
@ -13,11 +14,10 @@
</p>
<p><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
</div>
<%= submit_tag l(:button_add) %>
<% end %>
<div class="line_under" style="margin:20px 0px;"></div>
</fieldset>
<script type='text/javascript'>
function tagAddClick(id,objId,objTag)
{

View File

@ -11,7 +11,7 @@
<span><%=l(:label_organizers)%></span>
<span class="footer_text_link"><%= link_to l(:label_organizers_information),"http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%></span>
<span class="footer_text_link"><%= link_to l(:label_organizers_information_institute), "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %></span>
<span id="copyright"><%=l(:label_copyright)%>@2007~2014</span>
<span id="copyright"><%=l(:label_copyright)%>©2007~2014</span>
<span id="contact_us" class="footer_text_link"><%= link_to l(:label_contact_us),"http://" + Setting.host_name + "/projects/2/member", :target=>"_blank" %></span>
<span id="record"class="footer_text_link"><%= link_to l(:label_record),"http://www.miibeian.gov.cn/", :target => "_blank" %></span>