+
<%= render :partial => 'course_new' %>
@@ -39,7 +41,7 @@
<% author = topic.author.to_s + ":" %>
<%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %>
-
<%= h(topic.subject) %>
+
<%= h(topic.subject) %>
<% if topic.course_editable_by?(User.current) %>
<%= l(:button_edit) %>
@@ -111,21 +113,15 @@
<% 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_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_show.each do |message| %>
-
- -
+ <% 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 ' %>
@@ -157,37 +153,8 @@
<% end %>
-
-
- <% replies_all.each do |message| %>
-
- -
- <%= 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) %>
-
-
-
-
- <% end %>
-
-
- <%if replies_all.first %>
-
+ <%if topic.replies_count>2 %>
+
<% end %>
<% end %>
diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb
index d6332a029..d20119a6c 100644
--- a/app/views/boards/_project_show.html.erb
+++ b/app/views/boards/_project_show.html.erb
@@ -102,7 +102,7 @@
<% replies_all = topic.children.includes(:author, :attachments, {:board => :project}).
- reorder("#{Message.table_name}.id asc").all %>
+ reorder("#{Message.table_name}.id desc").all %>
<% unless replies_all.empty? %>
diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb
index 3d20fd411..bb3faf28f 100644
--- a/app/views/boards/show.html.erb
+++ b/app/views/boards/show.html.erb
@@ -1,5 +1,8 @@