\ No newline at end of file
diff --git a/app/views/messages/_course_show.html.erb b/app/views/messages/_course_show.html.erb
index 2d433d969..6106ee912 100644
--- a/app/views/messages/_course_show.html.erb
+++ b/app/views/messages/_course_show.html.erb
@@ -1,117 +1,146 @@
-
+<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_activity_KindEditor","forum" %>
+
+
+
+
+
+
+ <%= link_to image_tag(url_to_avatar(@topic.author),:width=>50,:height => 50,:alt=>'图像' ),user_path(@topic.author) %>
+
+
+ <% if @topic.author.id == User.current.id%>
+
+
+
+
+
+ <%= link_to(
+ l(:button_edit),
+ {:action => 'edit', :id => @topic},
+ :class => 'postOptionLink'
+ ) if @message.course_editable_by?(User.current) %>
+
+
+ <%= link_to(
+ l(:button_delete),
+ {:action => 'destroy', :id => @topic},
+ :method => :post,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :class => 'postOptionLink'
+ ) if @message.course_destroyable_by?(User.current) %>
+
+
+
+
+
+ <%end%>
+
+
+
+
+ <%= link_to @topic.author.name, user_path(@topic.author), :class => "linkBlue2", :target=> "_blank"%>
+
<%= format_date( @topic.created_on)%>
+
+
+ <%= @topic.content.html_safe%>
+
+
+
+ <%= link_to_attachments_course @topic, :author => false %>
+
+
+
- <%= link_to(
- l(:button_delete),
- {:action => 'destroy', :id => @topic},
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :class => 'talk_edit fr'
- ) if @message.course_destroyable_by?(User.current) %>
- <%= link_to(
- l(:button_edit),
- {:action => 'edit', :id => @topic},
- :class => 'talk_edit fr'
- ) if @message.course_editable_by?(User.current) %>
-
-
<%= @topic.content.html_safe %>
-
<%= link_to_attachments_course @topic, :author => false %>
-
-
- <% if User.current.logged? %>
- <%= toggle_link l(:button_reply), "reply", :focus => 'message_subject',:class => 'talk_edit fr' %>
- <% else %>
- <%= link_to l(:button_reply), signin_path,:class => 'talk_edit fr' %>
- <% end %>
- <%= link_to(
- l(:button_quote),
- {:action => 'quote', :id => @topic},
- :remote => true,
- :method => 'get',
- :class => 'talk_edit fr',
- :remote => true) if !@topic.locked? && authorize_for('messages', 'reply') %>
-
-<% unless @replies.empty? %>
- <% reply_count = 0 %>
- <% @replies.each do |message| %>
-
">
-
<%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %>
-
-
- <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %>
-
<%= format_time(message.created_on) %>
-
-
<%= textAreailizable message,:content,:attachments => message.attachments %>
- <%= link_to_attachments_course message, :author => false %>
+
+ <% unless @replies.empty? %>
+
+
回复(<%=@reply_count %>)
+
+
+ <% if @reply_count > 2%>
+
点击展开更多回复
+ <% end %>
+
+
+
+ <% @replies.each_with_index do |reply,i| %>
+
+
+ <%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
-
-
-
- <% end %>
-<% end %>
-<% if !@topic.locked? && authorize_for_course('messages', 'reply') %>
-
- <%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
- <%= render :partial => 'form_course', :locals => {:f => f, :replying => true} %>
- <%= link_to l(:button_submit),"javascript:void(0)",:onclick => 'course_board_submit_message_replay();' ,:class => "blue_btn fl c_white" ,:style=>"margin-left: 50px;"%>
- <%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'course_board_canel_message_replay();', :class => "blue_btn grey_btn fl c_white" %>
<% end %>
-<% end %>
-
-
- <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
-
-<% html_title @topic.subject %>
+ <% end %>
+
+
+
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %>
+
+
+ <%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => @topic.id, :is_board => 'false'},:method => "post", :remote => true) do |f|%>
+
+
+
+
发送
+
+
+ <% end%>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/views/users/_course_message.html.erb b/app/views/users/_course_message.html.erb
index 8ec605567..9ce308014 100644
--- a/app/views/users/_course_message.html.erb
+++ b/app/views/users/_course_message.html.erb
@@ -15,9 +15,9 @@
<% if activity.parent_id.nil? %>
- <%= link_to activity.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey" %>
+ <%= link_to activity.subject.to_s.html_safe, board_message_path(activity.board_id, activity), :class=> "postGrey" %>
<% else %>
- <%= link_to activity.parent.subject.to_s.html_safe, course_boards_path(activity.course,:parent_id =>activity.parent_id, :topic_id => activity.id,:host=> Setting.host_course), :class=> "postGrey"%>
+ <%= link_to activity.parent.subject.to_s.html_safe, board_message_path(activity.board_id, activity), :class=> "postGrey"%>
<% end %>
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 328570345..81700a106 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -1040,3 +1040,35 @@ a:hover.c_grey{ color:#333;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
+/*讨论区内部样式*/
+.postDetailContainer {padding:15px; border:1px solid #dddddd; background-color:#ffffff;}
+.postlabel {background-color:#edf1f2; color:#888888; padding:2px 5px; float:left; margin-bottom:5px;}
+.postRightContainer {width:718px; border:1px solid #dddddd; padding:15px; background-color:#ffffff; float:left; margin-bottom:10px;}
+.postDetailBanner {height:30px; width:720px; border-bottom:1px solid #efefef;}
+.postDetailRow {width:720px; border-bottom:1px solid #efefef; padding:15px 0;}
+.postDetailPortrait {width:50px; height:50px; float:left; margin-right:15px;}
+.postDetailWrap {width:580px; float:left;}
+.postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;}
+.postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;}
+.postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;}
+.postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;}
+.postDetailDate {color:#888888; font-size:12px; float:left;}
+.postDetailReply { margin-top:28px; color:#888888; float:right;}
+a.postReplyIcon {background:url(images/post_image_list.png) -40px 2px no-repeat; width:18px; height:18px; float:left;}
+a.postReplyIcon:hover {background:url(images/post_image_list.png) -40px -29px no-repeat;}
+.postDetailInput {width:713px; height:28px; border:1px solid #d9d9d9; outline:none !important;}
+.postAttIcon {background:url(images/post_image_list.png) 0px -91px no-repeat; width:16px; height:16px; padding-left:20px;}
+.postAttIcon:hover {background:url(images/post_image_list.png) 0px -113px no-repeat;}
+.postThemeContainer {width:720px;}
+.postThemeWrap {width:655px; float:left;position: relative}
+.postLikeIcon {background:url(images/post_image_list.png) 0px -42px no-repeat ;float:right; padding-left:18px; margin-top:3px;}
+.postLikeIcon:hover {background:url(images/post_image_list.png) 0px -64px no-repeat ;}
+a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}
+a:hover.AnnexBtn{background: url(images/homepage_icon2.png) -90px -343px no-repeat !important; color:#3598db;}
+.postEdit {background:url(images/post_image_list.png) 0px -94px no-repeat; width:18px; height:18px; display:block; float:left;}
+.postDelete {background:url(images/post_image_list.png) -42px -93px no-repeat; width:18px; height:18px; display:block; float:right;}
+.pageBanner {width:968px; margin:0px auto; border:1px solid #dddddd; background-color: #FFF; padding: 10px 15px; float:left;}
+.homepagePostReplyInput {width:543px; height:33px; max-width:543px; max-height:33px; border:1px solid #d9d9d9; outline:none;}
+.postRouteContainer {padding:10px 15px; background-color:#ffffff; border:1px solid #dddddd; margin-top:10px; font-size:14px;}
+a.postRouteLink {font-weight:bold; color:#484848;}
+a.postRouteLink:hover {text-decoration:underline;}