diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 333ad77b1..e89f621c8 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -6,6 +6,7 @@ class CoursesController < ApplicationController helper :members helper :words helper :attachments + helper :activity_notifys before_filter :auth_login1, :only => [:show, :feedback] menu_item :overview diff --git a/app/helpers/activity_notifys_helper.rb b/app/helpers/activity_notifys_helper.rb new file mode 100644 index 000000000..15fc43b54 --- /dev/null +++ b/app/helpers/activity_notifys_helper.rb @@ -0,0 +1,7 @@ +module ActivityNotifysHelper + def get_new_notify_count(container,type) + logger.info('xxoo') + query = ActivityNotify.where('activity_container_id=? and activity_container_type=? and notify_to=?',container.id,type,User.current.id); + return query.count() + end +end \ No newline at end of file diff --git a/app/views/courses/show.html.erb b/app/views/courses/show.html.erb index 9bbe4ea5a..4fbf3ad43 100644 --- a/app/views/courses/show.html.erb +++ b/app/views/courses/show.html.erb @@ -1,7 +1,9 @@
<% if @controller_name=='ActivityNotifys' %> - <%= l(:label_activity)%> -

与我相关

+ <%= l(:label_activity)%> +

与我相关 + +

@@ -10,7 +12,9 @@ <% else %>

<%= l(:label_activity)%>

<% if User.current.logged? %> -
与我相关 + 与我相关 + + <% end %> <% end %>
@@ -80,6 +84,14 @@ \ No newline at end of file diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index bbc6f5b55..edb70075b 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -677,7 +677,7 @@ input#score{ width:40px;} /* 与我相关 */ .new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;} -a.about_me{ width:80px;text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;} +a.about_me{text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;} a:hover.about_me{ color:#0781b4;}