<%= link_to l(:label_course_board), course_boards_path(@course), :class => "f14 c_blue02" %>
- <%= link_to "(#{@course.boards.count})", course_boards_path(@course), :class => "subnav_num c_orange" %>
+ <%= link_to "(#{@course.boards[0].topics.count})", course_boards_path(@course), :class => "subnav_num c_orange" %>
<%= link_to( "+#{l(:label_message_new)}", course_boards_path(@course), :class => 'subnav_green ml95 c_white') if is_teacher %>
diff --git a/app/views/messages/_course_new.html.erb b/app/views/messages/_course_new.html.erb
new file mode 100644
index 000000000..265c273d9
--- /dev/null
+++ b/app/views/messages/_course_new.html.erb
@@ -0,0 +1,13 @@
+
+
<%= l(:label_board_plural) %>
+
+
+
<%= l(:label_message_new) %>
+
+ <%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/app/views/messages/_form.html.erb b/app/views/messages/_form.html.erb
index 3a82d3509..9f05a93f7 100644
--- a/app/views/messages/_form.html.erb
+++ b/app/views/messages/_form.html.erb
@@ -33,54 +33,51 @@
}
return false;
}
+ function submitCoursesBoard()
+ {
+ if(regexSubject()&®exContent()){$("#message-form").submit();}
+ }
<%= error_messages_for 'message' %>
<% replying ||= false %>
+<% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
-
-
- <% extra_option = replying ? { readonly: true} : { maxlength: 200 } %>
-
-
- <%= l(:field_subject) %>
- *
-
-
- <% if replying %>
- <%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject" }.merge(extra_option) %>
- <% else %>
- <%= f.text_field :subject, { size: 60, style: "width: 99%;", id: "message_subject", onkeyup: "regexSubject();" }.merge(extra_option) %>
- <% end %>
-
-
-
- <% unless replying %>
- <% if @message.safe_attribute? 'sticky' %>
- <%= f.check_box :sticky %>
- <%= label_tag 'message_sticky', l(:label_board_sticky) %>
- <% end %>
- <% if @message.safe_attribute? 'locked' %>
- <%= f.check_box :locked %>
- <%= label_tag 'message_locked', l(:label_board_locked) %>
- <% end %>
- <% end %>
-
-
-
- <%= l(:field_description) %>
- *
-
-
- <%= text_area :quote,:quote,:style => 'display:none' %>
-
-
- <%= label_tag "message_content", l(:description_message_content), :class => "hidden-for-sighted" %>
- <%= f.text_area :content, :cols => 80, :rows => 13, :class => 'wiki-edit', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000 %>
-
-
-
- <%= l(:label_attachment_plural) %>
-
- <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
-
-
\ No newline at end of file
+
+ * <%= l(:field_subject) %> :
+ <% if replying %>
+ <%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585" }.merge(extra_option) %>
+ <% else %>
+ <%= f.text_field :subject, { size: 60, id: "message_subject", onkeyup: "regexSubject();",:class=>"talk_input w585" }.merge(extra_option) %>
+ <% end %>
+
+
+
+ <% unless replying %>
+ <% if @message.safe_attribute? 'sticky' %>
+ <%= f.check_box :sticky %>
+ <%= label_tag 'message_sticky', l(:label_board_sticky) %>
+ <% end %>
+ <% if @message.safe_attribute? 'locked' %>
+ <%= f.check_box :locked %>
+ <%= label_tag 'message_locked', l(:label_board_locked) %>
+ <% end %>
+ <% end %>
+
+
+
+ * <%= l(:field_description) %> :
+
+ <%= text_area :quote,:quote,:style => 'display:none' %>
+ <%= f.text_area :content, :class => 'talk_text fl', :id => 'message_content', :onkeyup => "regexContent();", :maxlength => 5000,:placeholder => "最多3000个汉字(或6000个英文字符)" %>
+
+
+
+
+ <%= l(:label_attachment_plural) %> :
+ <%= render :partial => 'attachments/form_course', :locals => {:container => @message,:isReply => @isReply} %>
+
+
+ <%= l(:button_submit)%>
+ <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'blue_btn grey_btn fl c_white'} )%>
+
+
diff --git a/app/views/messages/new.html.erb b/app/views/messages/new.html.erb
index 04ea99745..07c0164b8 100644
--- a/app/views/messages/new.html.erb
+++ b/app/views/messages/new.html.erb
@@ -4,18 +4,15 @@
»
<%= l(:label_message_new) %>
+ <%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
+ <%= render :partial => 'form', :locals => {:f => f} %>
+ <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
+ <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
+ <% end %>
+
+
<% elsif @course %>
-
- <%= link_to h(@board.name), :controller => 'boards', :action => 'show', :course_id => @course, :id => @board %>
- »
- <%= l(:label_message_new) %>
-
+ <%= render :partial => 'course_new' %>
<% end %>
-<%= form_for @message, :url => {:action => 'new'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
- <%= render :partial => 'form', :locals => {:f => f} %>
- <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
- <%= preview_link({:controller => 'messages', :action => 'preview', :board_id => @board}, 'message-form' ,target='preview',{:class => 'whiteButton m3p10'} )%>
-<% end %>
-
diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb
index 3b68bbf76..3c77e8768 100644
--- a/app/views/news/_course_form.html.erb
+++ b/app/views/news/_course_form.html.erb
@@ -1,17 +1,78 @@
-
+
+
* <%= l(:field_title) %> :
+
* <%= l(:field_description) %> :
+
-
-
- <%= l(:label_attachment_plural) %>
-
+
+ <%= l(:label_attachment_plural) %> :
<%= render :partial => 'attachments/form', :locals => {:container => @news} %>
-
-
-
\ No newline at end of file
+
+
+ <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'blue_btn fl c_white' %>
+ <%= link_to l(:button_cancel), course_news_index_path(@course), :onclick => '$("#add-news").hide()', :class => 'blue_btn grey_btn fl c_white' %>
+
+
+
\ No newline at end of file
diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb
index 45af13328..731ae78a1 100644
--- a/app/views/news/_course_news.html.erb
+++ b/app/views/news/_course_news.html.erb
@@ -3,63 +3,7 @@
label_tips = l(:label_course_news)
%>
-
<%= label_tips %>
@@ -68,26 +12,9 @@
<%= l(:label_total_news) %><%= @news_count %> <%= l(:label_course_news_count) %>
<% if @course && User.current.allowed_to?(:manage_news, @course) %>
<%= link_to(btn_tips,new_course_news_path(@course),
- :class => 'problem_new_btn fl c_dorange',
- :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') %>
+ :class => 'problem_new_btn fl c_dorange')%>
-
- <%= error_messages_for @news %>
-
- <%= l(:bale_news_notice)%>
-
-
- <%= labelled_form_for @news, :url => course_news_index_path(@course),
- :html => {:id => 'news-form', :multipart => true} do |f| %>
- <%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
- <%= link_to l(:button_create), "#", :onclick => 'submitNews();', :onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %>
- <%#= preview_link preview_news_path, 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
- <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %>
- <% end if @course %>
-
-
-
<% end %>
diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb
index 8c9bc784a..93040a882 100644
--- a/app/views/news/new.html.erb
+++ b/app/views/news/new.html.erb
@@ -1,4 +1,8 @@
+<%
+ btn_tips = l(:label_news_notice)
+ label_tips = l(:label_course_news)
+%>
<% if @project %>
<%= labelled_form_for @news, :url => project_news_index_path(@project),
:html => {:id => 'news-form', :multipart => true} do |f| %>
@@ -7,11 +11,22 @@
<%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
<% end %>
<% elsif @course %>
- <%= labelled_form_for @news, :url => course_news_index_path(@course),
- :html => {:id => 'news-form', :multipart => true} do |f| %>
- <%= render :partial => 'news/form', :locals => {:f => f} %>
- <%= submit_tag l(:button_create), :class => "whiteButton m3p10 h30" %>
- <%#= preview_link preview_news_path(:course_id => @course), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %>
- <% end %>
+
+
<%= label_tips %>
+
+
+ <%= error_messages_for @news %>
+
+ <%= l(:bale_news_notice)%>
+
+
+ <%= labelled_form_for @news, :url => course_news_index_path(@course),
+ :html => {:id => 'news-form', :multipart => true} do |f| %>
+ <%= render :partial => 'news/course_form', :locals => {:f => f, :is_new => true} %>
+
+ <% end if @course %>
+
+
+
<% end %>
diff --git a/app/views/words/_journal_reply.html.erb b/app/views/words/_journal_reply.html.erb
index 5a6511999..86dbb97b7 100644
--- a/app/views/words/_journal_reply.html.erb
+++ b/app/views/words/_journal_reply.html.erb
@@ -1,7 +1,7 @@
<% id = "journal_reply_ul_" + journal.id.to_s%>
<% allow_delete ||= false%>
-
+
<% fetch_user_leaveWord_reply(journal).each do |reply|%>
<%= render :partial => "words/journal_reply_items", :locals => {:reply => reply, :journal => journal, :m_reply_id => reply,:show_name=> show_name, :allow_delete => allow_delete} %>
<% end %>
diff --git a/app/views/words/_journal_reply_items.html.erb b/app/views/words/_journal_reply_items.html.erb
index bd76bc52d..956fad81f 100644
--- a/app/views/words/_journal_reply_items.html.erb
+++ b/app/views/words/_journal_reply_items.html.erb
@@ -6,9 +6,9 @@
<% if show_name %>
- <%= image_tag url_to_avatar(reply.user) %>
+ <%= image_tag url_to_avatar(reply.user),:width => '30',:height => '30' %>
<% else %>
- <%= image_tag url_to_avatar(nil) %>
+ <%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
<% end %>
@@ -44,7 +44,11 @@
<% if reply_allow %>
- <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
+ <% if journal.jour_type == "Course" %>
+ <%= render :partial => "words/new_respond_course", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
+ <% else %>
+ <%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
+ <% end %>
<% end %>
diff --git a/app/views/words/_new_respond_course.html.erb b/app/views/words/_new_respond_course.html.erb
new file mode 100644
index 000000000..5395237d9
--- /dev/null
+++ b/app/views/words/_new_respond_course.html.erb
@@ -0,0 +1,15 @@
+<%= form_tag(words_create_reply_path, :remote => true) do %>
+ <%= text_area_tag 'user_notes', "", :class => 're_respond-form',
+ :style => "resize: none;", :rows => 4,
+ :placeholder => l(:label_feedback_respond_content),
+ :width => '100%',
+ :maxlength => 250 %>
+ <%= hidden_field_tag 'reference_id', params[:reference_id], :value => journal.id %>
+ <%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => m_reply_id.user.id %>
+ <%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => m_reply_id.id %>
+ <%= hidden_field_tag 'show_name',params[:show_name],:value => show_name.nil? ? true : show_name %>
+ <%= submit_tag l(:button_feedback_respond), :name => nil ,
+ :class => "sub_btn",
+ :style => "float: right; margin-top: 1px; margin-right: 4px;"%>
+
+<% end %>
\ No newline at end of file
diff --git a/config/locales/courses/zh.yml b/config/locales/courses/zh.yml
index c99f4ed55..3e64b61f3 100644
--- a/config/locales/courses/zh.yml
+++ b/config/locales/courses/zh.yml
@@ -81,4 +81,8 @@ zh:
label_course_news_count: "个课程通知"
label_release_news: "发布通知"
label_create_time: "创建时间"
- #news end
\ No newline at end of file
+ #news end
+
+ #boards
+ label_course_momes_count: "个帖子"
+ #boards count
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 373943f05..d7e393863 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2079,6 +2079,7 @@ zh:
label_end_time: 截止时间
label_send_email: 确定发送
label_input_email: 请输入邮箱地址
+ #api end
project_module_files: 资源库
label_totle: 共有
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index f3faf749d..69432c8b3 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -134,6 +134,18 @@ function submit_new_bid(id)
}
}
+function show_window (id1,id2,top,left) {
+ $('#'+ id1).css('top',top);
+ $('#'+ id1).css('left',left);
+ $('#'+ id1).css('display','block');
+ $('#' + id2).css('display','block');
+}
+
+function close_window(id1,id2){
+ $('#' + id1).css('display','none');
+ $('#' + id2).css('display','none');
+}
+
//隐藏提示狂
function hidden_atert_form(cur_page,cur_type)
{
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 9441cdc16..253c6eee0 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -69,7 +69,7 @@ ul.wlist li a:hover{ background:#15bccf; color:#fff; text-decoration:none;}
.talk_top span{ color:#ff7143;}
.talk_txt{ width:460px; margin-left:10px; color:#676868;}
.talk_up{ color:#f63c00;}
-.talk_pic{width:32px; height:32px; padding:2px;}
+a.talk_pic{width:32px; height:32px; padding:2px;}
a.talk_btn{ background:#64bdd9; width:50px; height:20px; color:#fff; text-align:center; margin-top:12px; padding-top:3px;}
a:hover.talk_btn{ background:#2a9dc1;}
/****讨论区内页***/
@@ -329,6 +329,18 @@ a:hover.st_add{ color:#ff8e15;}
.w_p{ float:left; color:#15bccf; font-size:16px; font-weight:bold; margin-top:70px; }
/* 新建项目弹框*/
.table_left{ width:90px; text-align:right; color:#4c4c4c; font-weight:bold;}
+/*留言回复框样式*/
+.respond-form{
+ display: none;
+ width: 87%;
+ margin: auto;
+ clear: both;
+}
+.re_respond-form
+{
+ width: -moz-available;
+}
+