修改部分项目关注不能及时更新Bug
This commit is contained in:
parent
e99f9250c3
commit
20b8bf00b6
|
@ -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
|
||||
|
|
|
@ -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)) %>
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
<% 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 %>
|
||||
</div>
|
||||
<div class="licences">
|
||||
<%= content_tag('span', "#{l(:label_create_time)}: ") %><%= content_tag('span', format_time(@project.created_on)) %>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- added by bai -->
|
||||
<div class="grade">
|
||||
|
||||
|
||||
<% if @project.project_type !=1 %>
|
||||
<%= l(:label_project_grade)%>:
|
||||
<%= l(:label_project_grade)%>:
|
||||
<span >
|
||||
<%= link_to(format("%.2f" , red_project_scores(@project) ).to_i,
|
||||
{:controller => 'projects',
|
||||
|
@ -138,7 +138,7 @@
|
|||
<!-- end -->
|
||||
|
||||
|
||||
<!-- added by liuping -->
|
||||
<!-- added by liuping -->
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue