<%= l(:label_upload_files)%>
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 } %>
-
-
-
- <% 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 %>
-
-
-
-
- <%= 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
+
+
+ <% 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 %>
+
+
+
+
+
+ <%= 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个英文字符)" %>
+
+
+
+
+
+ <%= 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 @@
-
+
+
+
+
-
-
+
+
<%= 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/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 666cb6f3b..593bb814a 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -126,4 +126,16 @@ function submit_new_bid(id)
{
$("#"+id).submit();
}
-}
\ No newline at end of file
+}
+
+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');
+}
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 730236d8e..2b14daa60 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;}
/****讨论区内页***/