+
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
@@ -111,22 +111,24 @@
<%= reply.content.html_safe%>
- <%= format_date(reply.created_on) %>
- <%= link_to(
- l(:button_reply),
- {:action => 'quote', :id => reply},
- :remote => true,
- :method => 'get',
- :class => 'fr newsBlue',
- :title => l(:button_reply)) if !@topic.locked? && authorize_for('messages', 'reply') %>
- <%= link_to(
- l(:button_delete),
- {:action => 'destroy', :id => reply},
- :method => :post,
- :class => 'fr newsGrey mr10',
- :data => {:confirm => l(:text_are_you_sure)},
- :title => l(:button_delete)
- ) if reply.course_destroyable_by?(User.current) %>
+ <%= format_date(reply.created_on) %>
+
diff --git a/app/views/messages/edit.html.erb b/app/views/messages/edit.html.erb
index d30aee45d..0817594ab 100644
--- a/app/views/messages/edit.html.erb
+++ b/app/views/messages/edit.html.erb
@@ -1,45 +1,38 @@
-
+
- <% if @message.project %>
<%#= board_breadcrumb(@message) %>
-
-
+ <% end %>
<% elsif @message.course %>
- <%#= course_board_breadcrumb(@message) %>
-
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 3818d447d..3baa11970 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -148,6 +148,65 @@ function submit_edit_course(id)
$("#edit_course_"+id).submit();
}
}
+//课程讨论区
+function regexTopicSubject() {
+ var name = $("#message_subject").val();
+ if(name.length ==0)
+ {
+ $("#subjectmsg").text("标题不能为空");
+ $("#subjectmsg").css('color','#ff0000');
+ $("#message_subject").focus();
+ return false;
+ }
+ else if(name.length <= 255)
+ {
+ $("#subjectmsg").text("填写正确");
+ $("#subjectmsg").css('color','#008000');
+ return true;
+ }
+ else
+ {
+ $("#subjectmsg").text("标题超过255个字符");
+ $("#subjectmsg").css('color','#ff0000');
+ $("#message_subject").focus();
+ return false;
+ }
+}
+
+function regexTopicDescription()
+{
+ var name = message_content_editor.html();
+ if(name.length ==0)
+ {
+ $("#message_content_span").text("描述不能为空");
+ $("#message_content_span").css('color','#ff0000');
+ return false;
+ }
+ else if(name.length >=6000){
+ $("#message_content_span").text("描述最多3000个汉字(或6000个英文字符)");
+ $("#message_content_span").css('color','#ff0000');
+ return false;
+ }
+ else
+ {
+ $("#message_content_span").text("填写正确");
+ $("#message_content_span").css('color','#008000');
+ return true;
+ }
+}
+
+function submit_topic()
+{
+ if(regexTopicSubject() && regexTopicDescription())
+ {
+ message_content_editor.sync();
+ $("#message-form").submit();
+ }
+}
+
+function reset_topic(){
+
+}
///////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////课程讨论区
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 2da36a991..d6af2102b 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -904,6 +904,7 @@ a:hover.BlueCirBtn{ background:#269ac9; color:#fff;}
.w720{width:721px;}
.w709{width: 709px;}
.w701{width: 701px;}
+.w704{width: 704px;}
a.AnnexBtn{ background: url(images/homepage_icon2.png) 0px -343px no-repeat !important; 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;}
a.FilesBtn{ background: url(../images/homepage_icon2.png) 0px -373px no-repeat; width:70px; height:20px; display:block; padding-left:20px; color:#888888;}