统计数左侧刷新
This commit is contained in:
parent
12efc10759
commit
acf4e15f09
|
@ -851,8 +851,6 @@ class CoursesController < ApplicationController
|
|||
# render_403
|
||||
# return
|
||||
# end
|
||||
# 统计访问量
|
||||
@course.update_column(:visits, @course.visits.to_i + 1)
|
||||
#更新创建课程消息状态
|
||||
create_course_messages = @course.course_messages.where("user_id =? and course_message_type =? and course_id =? and viewed =?", User.current.id, 'Course', @course.id, 0)
|
||||
create_course_messages.update_all(:viewed => true)
|
||||
|
|
|
@ -299,8 +299,6 @@ class ProjectsController < ApplicationController
|
|||
if params[:jump] && redirect_to_project_menu_item(@project, params[:jump])
|
||||
return
|
||||
end
|
||||
# 统计访问量
|
||||
@project.update_column(:visits, @project.visits + 1)
|
||||
# over
|
||||
@author = params[:user_id].blank? ? nil : User.active.find(params[:user_id])
|
||||
@page = params[:page] ? params[:page].to_i + 1 : 0
|
||||
|
|
|
@ -1206,8 +1206,6 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
# 统计访问量
|
||||
@user.update_column(:visits, @user.visits.to_i + 1) unless User.current == @user
|
||||
#更新用户申请成为课程老师或教辅消息的状态
|
||||
if params[:course_id] != nil
|
||||
join_course_messages = CourseMessage.where("course_id =? and course_message_type =? and user_id =? and course_message_id =? and viewed =?",
|
||||
|
|
|
@ -33,6 +33,10 @@ module ApplicationHelper
|
|||
extend Forwardable
|
||||
def_delegators :wiki_helper, :wikitoolbar_for, :heads_for_wiki_formatter
|
||||
|
||||
def update_visiti_count container
|
||||
container.update_column(:visits, container.visits + 1)
|
||||
end
|
||||
|
||||
# Time 2015-03-24 15:27:29
|
||||
# Author lizanle
|
||||
# Description 从硬盘上删除对应的资源文件
|
||||
|
|
|
@ -68,6 +68,10 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @course %>
|
||||
<%# over %>
|
||||
|
||||
<div class="subNavBox">
|
||||
<% unless show_nav?(@course.course_activities.count) %>
|
||||
<div class="subNav">
|
||||
|
|
|
@ -72,8 +72,9 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%# 更新访问数 %>
|
||||
<% flag = true %>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @project %>
|
||||
<%# over %>
|
||||
<div>
|
||||
<% if @project.project_type == 0 %>
|
||||
<% unless static_project_score(@project.project_score) == 0 %>
|
||||
|
|
|
@ -132,6 +132,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @user %>
|
||||
<%# over %>
|
||||
|
||||
<div>
|
||||
<div class="homepageSignature break_word">
|
||||
<p id="user_brief_introduction_show">
|
||||
|
|
Loading…
Reference in New Issue