diff --git a/app/models/project_status.rb b/app/models/project_status.rb index c3d306c58..7fd246234 100644 --- a/app/models/project_status.rb +++ b/app/models/project_status.rb @@ -12,7 +12,7 @@ class ProjectStatus < ActiveRecord::Base # 但是 如果超级用户删除其他用户的话会造成读取错误 这里是遗漏点 # 删除用户时 此表创建人员未作相应删除动作 def update_watchers_count(num) - if self.watchers_count >= 0 + if self.watchers_count||0 >= 0 self.update_attribute(:watchers_count, self.watchers_count.to_i + num) end end diff --git a/app/views/contests/_new_softapplication.html.erb b/app/views/contests/_new_softapplication.html.erb index 9fb3fc7f1..e8b0a32cd 100644 --- a/app/views/contests/_new_softapplication.html.erb +++ b/app/views/contests/_new_softapplication.html.erb @@ -166,7 +166,7 @@ <%= render :partial => 'attachments/form' %>

-

+

1、<%= l(:label_upload_softapplication_packets_mustpacketed) %>

2、<%= l(:label_upload_softapplication_photo_condition) %> diff --git a/app/views/projects/_project.html.erb b/app/views/projects/_project.html.erb index 004fb38ac..6f2354d66 100644 --- a/app/views/projects/_project.html.erb +++ b/app/views/projects/_project.html.erb @@ -82,7 +82,7 @@ <% end %> <%= content_tag('span', link_to(files_count, file_project_path(@project)), :class => "info") %><%= content_tag('span', l(:label_x_data,:count => files_count)) %>

- + <% end %> @@ -114,19 +114,19 @@ <% if(@project.project_type==1)%>    <%= l(:label_course_college) %>: <%if @admin&&@admin.first&&@admin.first.user&&@admin.first.user.user_extensions%> - <%= @admin.first.user.user_extensions.occupation %> + <%= @admin.first.user.user_extensions.occupation %> <% end %> <% end %>
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
- +
- + <% if @project.project_type !=1 %> - <%= l(:label_project_grade)%>: + <%= l(:label_project_grade)%>: <%= link_to(format("%.2f" , red_project_scores(@project) ).to_i, {:controller => 'projects', @@ -138,7 +138,7 @@ - +
diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb index 4e38981f8..95c61ae27 100644 --- a/app/views/softapplications/_form.html.erb +++ b/app/views/softapplications/_form.html.erb @@ -112,7 +112,7 @@

<%= render :partial => 'attachments/form' %>

-

1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
2、<%=l(:label_upload_softapplication_photo_condition)%>

+

1、<%=l(:label_upload_softapplication_packets_mustpacketed)%>
2、<%=l(:label_upload_softapplication_photo_condition)%>

diff --git a/db/schema.rb b/db/schema.rb index af7a7e42b..155b54bfb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -441,10 +441,10 @@ ActiveRecord::Schema.define(:version => 20140826072838) do t.datetime "updated_at", :null => false t.string "page_type" t.integer "sort_type" - t.integer "image_width", :default => 107 - t.integer "image_height", :default => 63 t.integer "show_course", :default => 1 t.integer "show_contest", :default => 1 + t.integer "image_width", :default => 107 + t.integer "image_height", :default => 63 end create_table "forums", :force => true do |t|