diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 7726ab3da..db16f63d6 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -43,6 +43,14 @@ class StudentWorkController < ApplicationController
end
def index
+ # 消息状态更新
+ @homework.course_messages.each do |homework_message|
+ if User.current.id == homework_message.user_id
+ homework_message.update_attributes(:viewed => true)
+ end
+ end
+
+ # 消息end
#设置作业对应的forge_messages表的viewed字段
query_student_work = @homework.course_messages
query_student_work.each do |query|
@@ -134,10 +142,14 @@ class StudentWorkController < ApplicationController
end
def new
+ @user = User.current
@student_work = @homework.student_works.where("user_id = ?",User.current.id).first
if @student_work.nil?
@student_work = StudentWork.new
end
+ respond_to do |format|
+ format.html{ render :layout => "new_base_user"}
+ end
end
def create
@@ -178,11 +190,12 @@ class StudentWorkController < ApplicationController
end
def edit
+ @user = User.current
if !User.current.admin? && @homework.homework_type == 2 #编程作业不能修改作业
render_403
else
respond_to do |format|
- format.html
+ format.html{ render :layout => "new_base_user"}
end
end
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 281924f55..5bd124fb9 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -106,15 +106,17 @@ class UsersController < ApplicationController
return
end
# 当前用户查看消息,则设置消息为已读
- course_querys = @user.course_messages
- forge_querys = @user.forge_messages
- user_querys = @user.user_feedback_messages
- forum_querys = @user.memo_messages
- if User.current.id == @user.id
- course_querys.update_all(:viewed => true)
- forge_querys.update_all(:viewed => true)
- user_querys.update_all(:viewed => true)
- forum_querys.update_all(:viewed => true)
+ if params[:viewed] == "all"
+ course_querys = @user.course_messages
+ forge_querys = @user.forge_messages
+ user_querys = @user.user_feedback_messages
+ forum_querys = @user.memo_messages
+ if User.current.id == @user.id
+ course_querys.update_all(:viewed => true)
+ forge_querys.update_all(:viewed => true)
+ user_querys.update_all(:viewed => true)
+ forum_querys.update_all(:viewed => true)
+ end
end
# @new_message_count = forge_querys.count + forum_querys.count + course_querys.count + user_querys.count
case params[:type]
diff --git a/app/helpers/student_work_helper.rb b/app/helpers/student_work_helper.rb
index f24d5078f..bff997ba4 100644
--- a/app/helpers/student_work_helper.rb
+++ b/app/helpers/student_work_helper.rb
@@ -1,4 +1,6 @@
# encoding: utf-8
+include UserScoreHelper
+
module StudentWorkHelper
def user_projects_option
cond = Project.visible_condition(User.current) + " AND projects.project_type <> 1"
diff --git a/app/views/attachments/_new_form.html.erb b/app/views/attachments/_new_form.html.erb
index 38b471897..47f6fd202 100644
--- a/app/views/attachments/_new_form.html.erb
+++ b/app/views/attachments/_new_form.html.erb
@@ -23,6 +23,7 @@
<% end %>
<% end %>
+
<%= button_tag l(:button_browse), :type=>"button", :onclick=>"_file.click()",:onmouseover => 'this.focus()',:class => 'sub_btn', :style => ie8? ? 'display:none' : '' %>
diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb
index 4a804ae60..bbf4aa343 100644
--- a/app/views/homework_common/index.html.erb
+++ b/app/views/homework_common/index.html.erb
@@ -9,7 +9,7 @@
<%= @obj_count%>
<%= l(:label_homework_count)%>
- <%= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
+ <%#= link_to( l(:label_course_homework_new), new_homework_common_path(:course => @course.id), :class => 'problem_new_btn fl c_dorange') if @is_teacher %>
<% @homeworks.each do |homework|%>
@@ -27,7 +27,7 @@
<% if @is_teacher%>
<%= homework_anonymous_comment(homework)%>
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "fr mr10 work_edit") %>
- <%= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
+ <%#= link_to(l(:button_edit),edit_homework_common_path(homework), :class => "fr mr10 work_edit") %>
<% elsif @is_student%>
<%= student_anonymous_comment homework %>
<%= student_new_homework homework %>
diff --git a/app/views/homework_common/new.html.erb b/app/views/homework_common/new.html.erb
index f5fb595e1..6fc0fff0e 100644
--- a/app/views/homework_common/new.html.erb
+++ b/app/views/homework_common/new.html.erb
@@ -1,16 +1,17 @@
-<% content_for :header_tags do %>
- <%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg' %>
- <%= javascript_include_tag 'homework','baiduTemplate' %>
-<% end %>
-
+<%= javascript_include_tag "/assets/kindeditor/kindeditor" %>
<%= error_messages_for 'homework_common' %>
-
+
+
+ <%= l(:label_course_homework_new)%>
+
+
<%= labelled_form_for @homework,:url => {:controller => 'homework_common',:action => 'create'} do |f| %>
<%= hidden_field_tag "course",@course.id%>
- <%= render :partial => 'homework_common/new_homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
+ <%= render :partial => 'homework_common/homework_detail_manual_form', :locals => { :homework => @homework,:f => f,:edit_mode => false } %>
+
提交
+ <%#= link_to "上一步", new_homework_common_path(:course => @course.id), :class => "orange_btn_homework fl"%>
+ <%= link_to '取消',homework_common_index_path(:course => @course.id),:class => 'grey_btn fl'%>
<% end%>
-
-
diff --git a/app/views/layouts/_footer.html.erb b/app/views/layouts/_footer.html.erb
index d6368b4a0..812873045 100644
--- a/app/views/layouts/_footer.html.erb
+++ b/app/views/layouts/_footer.html.erb
@@ -5,7 +5,7 @@
服务协议|
<%= l(:label_recruitment_information)%>|
<%= l(:label_surpport_group)%>|
- <%= l(:label_forums)%>
+ <%= l(:label_forums)%>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb
index adec9e6fd..c2f159f28 100644
--- a/app/views/layouts/base_courses.html.erb
+++ b/app/views/layouts/base_courses.html.erb
@@ -123,7 +123,7 @@
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
- <%= link_to( "+#{l(:label_course_homework_new)}", new_homework_common_path(:course => @course.id), :class => 'subnav_green c_white') if is_teacher %>
+ <%#= link_to( "+#{l(:label_course_homework_new)}", new_homework_common_path(:course => @course.id), :class => 'subnav_green c_white') if is_teacher %>
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>
diff --git a/app/views/student_work/edit.html.erb b/app/views/student_work/edit.html.erb
index 6e36447d2..5bb362b46 100644
--- a/app/views/student_work/edit.html.erb
+++ b/app/views/student_work/edit.html.erb
@@ -1,52 +1,54 @@
-
-
编辑作品
-
-
-
-
- <%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
-
-
-
-
- 项目信息
-
-
-
-
-
-
+
+
+
+
+
+ <%= labelled_form_for @work,:html => { :multipart => true } do |f|%>
+
+
+
+
+ 项目信息
+
+
+
+
+
+
-
-
- <%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
-
-
+
+
+ <%= f.select :project,options_for_select(user_projects_option,@work.project_id), {},{:class => "bo02 mb10"} %>
+
+
-
-
-
-
-
-
-
-
- <%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
-
-
-
- 提交作品
- <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
-
-
-
- <% end%>
+
+
+
+
+
+
+
+
+ <%= render :partial => 'attachments/new_form',:locals => {:container => @work} %>
+
+
+
+ 提交作品
+ <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
+
+
+
+ <% end%>
+
-
+
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 0250a7eed..776af3b3e 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -124,7 +124,6 @@
<% if @is_teacher%>
<%= homework_anonymous_comment(@homework)%>
- <%= link_to(l(:button_edit),edit_homework_common_path(@homework), :class => "fr mr10 work_edit") %>
<% else%>
<%= student_anonymous_comment @homework %>
<%= student_new_homework @homework %>
diff --git a/app/views/student_work/new.html.erb b/app/views/student_work/new.html.erb
index 8d27f31aa..f0f4d8e7c 100644
--- a/app/views/student_work/new.html.erb
+++ b/app/views/student_work/new.html.erb
@@ -17,75 +17,77 @@
});
<% end%>
-
-
创建作品
-
-
-
-
- <%= form_for(@student_work,
- :html => { :multipart => true },
- :url => {:controller => 'student_work',
- :action => 'create',
- :homework => @homework.id
- }) do |f|%>
-
- <% if @homework.homework_type == 1%>
-
- 提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
-
- <% end%>
-
-
- <%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
- <% if @homework.homework_type != 2%>
-
- 项目信息
-
-
- <% end%>
-
-
-
-
-
-
- <%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
-
-
-
-
- <% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
- <%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
- <% else %>
- <%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
- <% end%>
-
-
-
-
- <% if @homework.homework_type != 2%>
-
-
- <%= render :partial => 'attachments/new_form' %>
-
-
+
+
+
+
+
+ <%= form_for(@student_work,
+ :html => { :multipart => true },
+ :url => {:controller => 'student_work',
+ :action => 'create',
+ :homework => @homework.id
+ }) do |f|%>
+
+ <% if @homework.homework_type == 1%>
+
+ 提示:匿评作业提交的作品,作品名称和描述中不能出现真实的姓名信息
+
+ <% end%>
+
+
+ <%= f.text_field "name", :required => true, :size => 60, :class => "bo fl", :maxlength => 200, :placeholder => "作品名称", :onkeyup => "regexStudentWorkName();" %>
+ <% if @homework.homework_type != 2%>
+
+ 项目信息
+
+
+ <% end%>
+
+
+
+
+
+
+ <%= f.select :project_id,options_for_select(user_projects_option), {},{:class => "bo02 mb10"} %>
+
+
+
+
+ <% if @homework.homework_type == 2 && @homework.homework_detail_programing%>
+ <%= f.text_area "description", :class => "w620 hwork_txt h400", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();", :value => @homework.homework_detail_programing.language == "1" ? c_stantard_code_student : c_stantard_code_student_%>
+ <% else %>
+ <%= f.text_area "description", :class => "w620 hwork_txt", :placeholder => "作品描述不能为空", :onkeyup => "regexStudentWorkDescription();"%>
+ <% end%>
+
+
+
+
+ <% if @homework.homework_type != 2%>
+
+
+ <%= render :partial => 'attachments/new_form' %>
+
+
+ <% end%>
+
+ 提交作品
+ <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white mt10 ml10"%>
+
+
+
<% end%>
-
- 提交作品
- <%= link_to "返 回".html_safe, student_work_index_path(:homework => @homework), :class => "blue_btn grey_btn fl c_white"%>
-
-
-
- <% end%>
+
+
+
+
-
-
-
<% else %>
@@ -125,8 +127,8 @@
-
作业描述:<%= activity.description.html_safe %>
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index f622ad20c..cbd7a916b 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -21,7 +21,7 @@
<% end %>
- 发帖时间:<%= format_date(activity.created_on) %>
+ 发帖时间:<%= format_time(activity.created_on) %>
@@ -61,7 +61,7 @@
<%if count > 2 %>
<% end %>
@@ -100,7 +100,7 @@
<% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(reply.created_on) %>
+ <%= format_time(reply.created_on) %>
<%= reply.content.html_safe %>
diff --git a/app/views/users/_course_news.html.erb b/app/views/users/_course_news.html.erb
index 7edc19681..a558911c1 100644
--- a/app/views/users/_course_news.html.erb
+++ b/app/views/users/_course_news.html.erb
@@ -16,7 +16,7 @@
<%= link_to activity.title.to_s, news_path(activity), :class => "postGrey" %>
- 发布时间:<%= format_date(activity.created_on) %>
+ 发布时间:<%= format_time(activity.created_on) %>
通知描述:
@@ -35,7 +35,7 @@
<%if count>2 %>
<% end %>
@@ -72,7 +72,7 @@
<% else %>
<%= link_to comment.try(:author).try(:realname), user_path(comment.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(comment.created_on) %>
+ <%= format_time(comment.created_on) %>
<%= comment.comments.html_safe %>
diff --git a/app/views/users/_course_poll.html.erb b/app/views/users/_course_poll.html.erb
index 15e549ad8..436ae2f46 100644
--- a/app/views/users/_course_poll.html.erb
+++ b/app/views/users/_course_poll.html.erb
@@ -26,7 +26,7 @@
<% end %>
- 发布时间:<%= format_date(activity.published_at) %>
+ 发布时间:<%= format_time(activity.published_at) %>
问卷描述:<%=activity.polls_description.html_safe.to_s%>
diff --git a/app/views/users/_project_issue.html.erb b/app/views/users/_project_issue.html.erb
index a7a98a396..1bd0b834a 100644
--- a/app/views/users/_project_issue.html.erb
+++ b/app/views/users/_project_issue.html.erb
@@ -30,7 +30,7 @@
时间:
- <%=format_date(activity.created_on) %>
+ <%=format_time(activity.created_on) %>
缺陷描述:
@@ -72,7 +72,7 @@
<% if count > 2 %>
<% end %>
@@ -109,7 +109,7 @@
<% else %>
<%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(reply.created_on) %>
+ <%= format_time(reply.created_on) %>
<% if reply.details.any? %>
<% details_to_strings(reply.details).each do |string| %>
diff --git a/app/views/users/_project_message.html.erb b/app/views/users/_project_message.html.erb
index ebf3d0ad2..6c3842f73 100644
--- a/app/views/users/_project_message.html.erb
+++ b/app/views/users/_project_message.html.erb
@@ -24,7 +24,7 @@
<% end %>
- 时间:<%= format_date(activity.created_on) %>
+ 时间:<%= format_time(activity.created_on) %>
帖子描述:
<% if activity.parent_id.nil? %>
@@ -49,7 +49,7 @@
)
<%#=format_date(activity.updated_on)%>
<%if count>2 %>
-
+
<% end %>
@@ -86,7 +86,7 @@
<% else %>
<%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %>
<% end %>
- <%= format_date(reply.created_on) %>
+ <%= format_time(reply.created_on) %>
<%= reply.content.html_safe %>
diff --git a/app/views/users/_user_activities.html.erb b/app/views/users/_user_activities.html.erb
index 906787070..f1529ffb8 100644
--- a/app/views/users/_user_activities.html.erb
+++ b/app/views/users/_user_activities.html.erb
@@ -9,6 +9,7 @@
span.ke-icon-emoticons:hover{background-position:-79px -671px;width:50px;height:26px;}
div.ke-toolbar .ke-outline{border:none;}
.ke-inline-block{display: none;}
+ .ke-container{height: 40px !important;}
<% user_activities.each do |user_activity|
if user_activities %>
diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb
index 4a38e630b..7be8811a4 100644
--- a/app/views/users/_user_homework_form.html.erb
+++ b/app/views/users/_user_homework_form.html.erb
@@ -15,9 +15,12 @@
<%= calendar_for('homework_end_time')%>
+
+
+
<% if edit_mode %>
@@ -31,9 +34,9 @@
-
<%= select_tag :course_id, options_for_select(get_as_teacher_courses(User.current), homework.course_id), {:class => "InputBox w720",:value => "请选择发布作业的课程"} %>
+
diff --git a/app/views/users/user_messages.html.erb b/app/views/users/user_messages.html.erb
index d965c92e7..29020560d 100644
--- a/app/views/users/user_messages.html.erb
+++ b/app/views/users/user_messages.html.erb
@@ -29,6 +29,11 @@
+<% if params[:type].nil? %>
+
+<% end %>
<% if @message_alls.count >0 %>
<%# 课程消息 %>
<% unless @message_alls.nil? %>
@@ -52,7 +57,11 @@
<%= link_to ma.course_message.comments.html_safe, {:controller => 'news', :action => 'show', :id => ma.course_message.commented.id },
:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
- :title => "#{ma.course_message.comments.html_safe}" %>
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.comments.html_safe %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -80,11 +89,21 @@
- <%=link_to image_tag(url_to_avatar(ma.course_message.author), :width => "30", :height => "30"), user_path(ma.course_message.author) %>
- <%=link_to ma.course_message.author, user_path(ma.course_message.author), :class => "newsBlue homepageNewsPublisher" %>"><%= ma.course_message.parent_id.nil? ? "发布了课程帖子:" : "评论了课程帖子:" %>
- -
- <%= link_to ma.course_message.parent_id.nil? ? ma.course_message.subject.html_safe : ma.course_message.content.html_safe,
- course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
- :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
- :title => "#{ma.course_message.subject.html_safe}" %>
+ <% if ma.course_message.parent_id.nil? %>
+ -
+ <%= link_to ma.course_message.subject, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :title => "#{ma.course_message.subject.html_safe}" %>
+ <% else %>
+ -
+ <%= link_to ma.course_message.content.html_safe, course_boards_path(ma.course_message.course, :parent_id => ma.course_message.parent_id ? ma.course_message.parent_id : ma.course_message.id, :topic_id => ma.course_message.id),
+ :class => "#{ma.viewed==0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.course_message.content.html_safe %>
+
+ <% end %>
- <%= time_tag(ma.created_at).html_safe %>
@@ -150,11 +169,23 @@
<%=link_to image_tag(url_to_avatar(ma.forge_message.author), :width => "30", :height => "30"), user_path(ma.forge_message.author) %>
<%=link_to ma.forge_message.author, user_path(ma.forge_message.author), :class => "newsBlue homepageNewsPublisher" %>
"><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %>
-
- <%=link_to ma.forge_message.parent_id.nil? ? ma.forge_message.subject.html_safe : ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
- :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
- :topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
- :title => "#{ma.forge_message.subject.html_safe}" %>
+ <% if ma.forge_message.parent_id.nil? %>
+
+ <%=link_to ma.forge_message.subject, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
+ :title => "#{ma.forge_message.subject.html_safe}" %>
+ <% else %>
+
+ <%=link_to ma.forge_message.content.html_safe, project_boards_path(ma.forge_message.project,
+ :parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,
+ :topic_id => ma.forge_message.id),:class=>"#{ma.viewed==0?"newsBlack":"newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.forge_message.content.html_safe %>
+
+ <% end %>
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -180,7 +211,9 @@
">评论了新闻:
<%= link_to "#{ma.forge_message.comments.html_safe}",
- {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.forge_message.comments.html_safe}"%>
+ {:controller => 'news', :action => 'show', :id => ma.forge_message.commented.id },:class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :title => "#{ma.forge_message.comments.html_safe}" %>
+
<%= time_tag(ma.created_at).html_safe %>
<% end %>
@@ -196,9 +229,21 @@
<%=link_to ma.memo.author, user_path(ma.memo.author), :class => "newsBlue homepageNewsPublisher" %>
" ><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %>
-
- <%= link_to ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content}" %>
-
+ <% if ma.memo.parent_id.nil? %>
+
+ <%= link_to ma.memo.subject, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :title => "#{ma.memo.subject}" %>
+
+ <% else %>
+
+ <%= link_to ma.memo.content.html_safe, forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+
+ <%= ma.memo.content.html_safe %>
+
+ <% end %>
<%= time_tag(ma.memo.created_at).html_safe %>
<% end %>
@@ -215,8 +260,13 @@
"><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %>
- <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}", :title => "#{ma.journals_for_message.notes}" %>
+ <%= link_to ma.journals_for_message.notes.html_safe, feedback_path(ma.journals_for_message.jour_id), :class =>"#{ma.viewed == 0 ? "newsBlack" : "newsGrey"}",
+ :onmouseover =>"message_titile_show($(this),event)",
+ :onmouseout => "message_titile_hide($(this))" %>
+
+ <%= ma.journals_for_message.notes.html_safe %>
+
<%= time_tag(ma.journals_for_message.created_on).html_safe %>
@@ -236,6 +286,17 @@
+
diff --git a/db/migrate/20150829024549_course_messages.rb b/db/migrate/20150829024549_course_messages.rb
index 666ccdaeb..34f4e9ef2 100644
--- a/db/migrate/20150829024549_course_messages.rb
+++ b/db/migrate/20150829024549_course_messages.rb
@@ -3,6 +3,7 @@ class CourseMessages < ActiveRecord::Migration
def up
Course.all.each do |course|
transaction do
+ put course.id
course.course_messages << CourseMessage.new(:user_id => course.tea_id,:course_id => course.id)
# 作业
course.homework_commons.each do |homework_common|
diff --git a/db/migrate/20150829081822_update_message_time.rb b/db/migrate/20150829081822_update_message_time.rb
index fe670e9b8..09e42b6d1 100644
--- a/db/migrate/20150829081822_update_message_time.rb
+++ b/db/migrate/20150829081822_update_message_time.rb
@@ -11,6 +11,7 @@ class UpdateMessageTime < ActiveRecord::Migration
cmessage.created_at = cmessage.course_message.created_on
end
cmessage.save
+ puts cmessage.id
course_all_message = MessageAll.where("message_type = '#{cmessage.class.to_s}' and message_id = '#{cmessage.id}'").first
course_all_message.created_at = cmessage.created_at
diff --git a/db/migrate/20150829130302_update_forge_message_time.rb b/db/migrate/20150829130302_update_forge_message_time.rb
index 70811c307..295cafea6 100644
--- a/db/migrate/20150829130302_update_forge_message_time.rb
+++ b/db/migrate/20150829130302_update_forge_message_time.rb
@@ -11,6 +11,7 @@ class UpdateForgeMessageTime < ActiveRecord::Migration
fmessage.created_at = fmessage.forge_message.created_on
end
fmessage.save
+ puts fmessage.id
forge_all_message = MessageAll.where("message_type = '#{fmessage.class.to_s}' and message_id = '#{fmessage.id}'").first
forge_all_message.created_at = fmessage.created_at
diff --git a/db/migrate/20150901004812_update_memo_message_time.rb b/db/migrate/20150901004812_update_memo_message_time.rb
index e512282a0..80ae557fc 100644
--- a/db/migrate/20150901004812_update_memo_message_time.rb
+++ b/db/migrate/20150901004812_update_memo_message_time.rb
@@ -11,6 +11,7 @@ class UpdateMemoMessageTime < ActiveRecord::Migration
memo_message.created_at = memo_message.memo.created_on
end
memo_message.save
+ puts memo_message.id
memo_messages = MessageAll.where("message_type = '#{memo_message.class.to_s}' and message_id = '#{memo_message.id}'").first
memo_messages.created_at = memo_message.created_at
diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 98dfc470b..26cd088c4 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -3536,8 +3536,8 @@ function _getInitHtml(themesPath, bodyClass, cssPath, cssData) {
(_direction === '' ? '' : ''),
'
',
'