@@ -32,15 +35,19 @@
讨论区共有<%= @topic_count %>个帖子
<% if @topics.any? %>
<% @topics.each do |topic| %>
-
+
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"42",:height=>"42"), user_path(topic.author),:class =>'talkmain_pic fl' %>
- <% author = topic.author.to_s + ":" %>
- <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
+ <% author = topic.author.to_s %>
+
+ <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl ",:title=>author,
+ :style=>'max-width:60px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;' %>
+
+
:
-
<%= h(topic.subject) %>
+
<%= h(topic.subject) %>
<% if topic.course_editable_by?(User.current) %>
-
<%= l(:button_edit) %>
<% end %>
@@ -81,105 +88,85 @@
<%= l(:label_activity_time)%>: <%= format_time topic.created_on %>
- <%= toggle_link l(:button_reply), "reply" + topic.id.to_s, :focus => 'message_content',:class => ' c_dblue fr' %>
+
<%= l(:button_reply) %>
-
-
-
-
- <%= render :partial => 'edit',locals: {:topic => topic} %>
-
-
-
- <% reply = Message.new(:subject => "RE: #{@message.subject}")%>
- <% if !topic.locked? && authorize_for('messages', 'reply') %>
-
-
-
- <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'}, :html => {:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
-
- <%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
- <%= toggle_link l(:button_cancel), "reply" + topic.id.to_s, :focus => 'message_content',:class => 'grey_btn fr ml10' %>
-
<%= l(:label_memo_create)%>
- <% end %>
+
+
+ <%= render :partial => 'edit',locals: {:topic => topic} %>
+
+
+
+
+ <% reply = Message.new(:subject => "RE: #{topic.subject}")%>
+ <% if !topic.locked? && authorize_for('messages', 'reply') %>
+
- <% end %>
- <% replies_all = topic.children.
- includes(:author, :attachments, {:board => :project}).
- reorder("#{Message.table_name}.created_on DESC").offset(2).
- all %>
- <% replies_show = topic.children.
- includes(:author, :attachments, {:board => :project}).
- reorder("#{Message.table_name}.created_on DESC").limit(2).
- all %>
- <% unless replies_show.empty? %>
- <% reply_count = 0 %>
-
-
- <% replies_show.each do |message| %>
+
+ <%= form_for reply, :as => :reply, :url => {:controller=>'messages',:action => 'reply', :id => topic.id, :board_id => topic.board_id, :is_board => 'true'},
+ :html => {:nhname=>"form",:multipart => true, :id => 'message_form' + topic.id.to_s, :name=>'message-form'} do |f| %>
-
-
- <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
-
- <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
-
-
<%= textAreailizable message,:content,:attachments => message.attachments %>
-
-
-
<%= format_time(message.created_on) %>
- <%= link_to(
-
- l(:button_delete),
- {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :title => l(:button_delete),
- :class => ' c_dblue fr'
- ) if message.course_destroyable_by?(User.current) %>
-
-
-
-
+ <%= render :partial => 'form_project', :locals => {:f => f, :replying => true} %>
+
+
<% end %>
-
+
+
-
-
- <% replies_all.each do |message| %>
+ <% end %>
+ <% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
+ reorder("#{Message.table_name}.created_on DESC").all %>
+ <% unless replies_all.empty? %>
+ <% replies_all_i = 0 %>
+
+
+ <% replies_all.each do |message| %>
+ <% replies_all_i=replies_all_i+1 %>
+ -
+ <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
+
+ <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
+
+
<%= textAreailizable message,:content,:attachments => message.attachments %>
+
+
+
<%= format_time(message.created_on) %>
+ <%= link_to(
-
-
- <%= link_to image_tag(url_to_avatar(message.author), :width => '34',:height => '34'), user_path(message.author), :class =>'Msg_pic' %>
-
- <%= link_to_user_header message.author,false,:class => 'fl c_orange ' %>
-
-
<%= textAreailizable message,:content,:attachments => message.attachments %>
+ l(:button_delete),
+ {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
+ :method => :post,
+ :data => {:confirm => l(:text_are_you_sure)},
+ :title => l(:button_delete),
+ :class => ' c_dblue fr'
+ ) if message.course_destroyable_by?(User.current) %>
+ <%= link_to(
+ l(:button_reply),
+ 'javascript:;',
+ :nhname =>'showbtn_child_reply',
+ :class => ' c_dblue fr',
+ :style => 'margin-right: 10px;',
+ :title => l(:button_reply)) if !topic.locked? && authorize_for('messages', 'reply') %>
+
+
-
- <%= format_time(message.created_on) %>
- <%= link_to(
+
+ <% end %>
+
+
+ <%if topic.replies_count>2 %>
+
+ <% end %>
+ <% end %>
+
+
+
- l(:button_delete),
- {:controller => 'messages', :action => 'destroy', :id => message.id, :board_id => message.board_id, :is_board => 'true'},
- :method => :post,
- :data => {:confirm => l(:text_are_you_sure)},
- :title => l(:button_delete),
- :class => ' c_dblue fr'
- ) if message.course_destroyable_by?(User.current) %>
-
-
-
-
- <% end %>
-
-
- <%if replies_all.first %>
-
- <% end %>
- <% end %>
-
<% end %>
<% else %>
<%= l(:label_no_data) %>
@@ -197,58 +184,80 @@
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@course}: #{@board}") %>
<% end %>
+
\ No newline at end of file
diff --git a/app/views/boards/_edit.html.erb b/app/views/boards/_edit.html.erb
index 562319e56..909689edd 100644
--- a/app/views/boards/_edit.html.erb
+++ b/app/views/boards/_edit.html.erb
@@ -12,6 +12,7 @@
} do |f| %>
<%= render :partial => 'form_project',
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
+
<%= l(:button_cancel) %>
<%= l(:button_submit)%>
<%#= link_to l(:button_cancel), board_message_url(topic.board, topic.root, :r => (topic.parent_id && topic.id)), :class => "blue_btn grey_btn fl c_white" %>
@@ -31,6 +32,7 @@
} do |f| %>
<%= render :partial => 'form_course',
:locals => {:f => f, :replying => !topic.parent.nil?, :topic => topic} %>
+
<%= l(:button_cancel) %>
<%= l(:button_submit)%>
diff --git a/app/views/boards/_form_course.html.erb b/app/views/boards/_form_course.html.erb
index cfef18f93..65e750b57 100644
--- a/app/views/boards/_form_course.html.erb
+++ b/app/views/boards/_form_course.html.erb
@@ -5,19 +5,19 @@
- <%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585", :aa=>"subject" }.merge(extra_option) %>
+ <%= f.text_field :subject, { size: 60, id: "message_subject",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
-
+
<% else %>
- <%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :aa=>"subject" }.merge(extra_option) %>
+ <%= f.text_field :subject, { size: 60, id: "message_subject#{f.object.id}", onkeyup: "regexSubject('#{f.object.id}');",:class=>"talk_input w585", :nhname=>'inputsubject' }.merge(extra_option) %>
-
+
<% end %>
@@ -34,11 +34,11 @@
-
+
<% unless replying %>
<% end %>
- <%= text_area :quote,:quote,:style => 'display:none' %>
+ <%= text_area :quote,:quote,:style => 'display:none',:nhname=>"quote_input" %>
<% if replying%>
@@ -46,13 +46,14 @@
:width => '89%',
:height => 300,
:id => "message_content#{f.object.id}",
- :aa => 'content',
+ :nhname => 'textarea',
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
:placeholder => "最多3000个汉字(或6000个英文字符)",
:maxlength => 5000 %>
<% else %>
+
<%= f.text_area :content,
:width => '90%',
:height => 300,
@@ -61,14 +62,14 @@
:id => "message_content#{f.object.id}",
:onkeyup => "regexContent('#{f.object.id}');",
:class => 'talk_text fl',
- :aa => 'content',
+ :nhname => 'textarea',
:placeholder => "最多3000个汉字(或6000个英文字符)",
:maxlength => 5000 %>
<% end %>
-
+
diff --git a/app/views/boards/_form_project.html.erb b/app/views/boards/_form_project.html.erb
index 5cf20a993..f6b41b53f 100644
--- a/app/views/boards/_form_project.html.erb
+++ b/app/views/boards/_form_project.html.erb
@@ -1,4 +1,3 @@
-<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
-
-
+<%= javascript_include_tag "/assets/kindeditor/kindeditor-min" %>
<% if @project %>
<%= render :partial => 'project_show', locals: {project: @project} %>
<% elsif @course %>
<%= render :partial => 'course_show', locals: {course: @course} %>
<% end %>
+
+
+
\ No newline at end of file
diff --git a/public/images/public_icon.png b/public/images/public_icon.png
index 68be31f5d..1fa463e4e 100644
Binary files a/public/images/public_icon.png and b/public/images/public_icon.png differ