From a5760afa68ca2db12c8b21f9a27568d2fc70c4cb Mon Sep 17 00:00:00 2001 From: alan <547533434@qq.com> Date: Mon, 4 May 2015 17:44:03 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=9B=B4=E6=94=B9=20Signed-off-by:=20alan=20?= =?UTF-8?q?<547533434@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_project_show.html.erb | 61 +++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index 410648c15..061f25878 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -36,14 +36,65 @@ <% if topic.sticky? %> <%= l(:label_board_sticky)%> <% end %> -
- <%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> -  <%= l(:label_post_by_time)%><%= format_time topic.created_on %> + +
+ <%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %> +     <%= format_time topic.created_on %> +
+ +

+ <%= topic.content %>

- <%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %> +
- <% end %> + <% replies = topic.children. + includes(:author, :attachments, {:board => :project}). + reorder("#{Message.table_name}.created_on DESC"). + limit(2). + all %> + <% unless replies.empty? %> + <% reply_count = 0 %> + <% replies.each do |message| %> +
"> +
<%= link_to image_tag(url_to_avatar(message.author), :width => '46',:height => '46'), user_path(message.author) %>
+
+
+ <%= link_to_user_header message.author,false,:class => 'c_blue fb fl mb10 ' %> + <%= format_time(message.created_on) %> +
+

<%= textAreailizable message,:content,:attachments => message.attachments %>

+
+
+ <%= link_to( + l(:button_quote), + {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id}, + :remote => true, + :method => 'get', + :title => l(:button_quote)) if !topic.locked? && authorize_for('messages', 'reply') %> + <%= link_to( + #image_tag('edit.png'), + l(:button_edit), + {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id}, + :title => l(:button_edit) + ) if message.course_editable_by?(User.current) %> + <%= link_to( + #image_tag('delete.png'), + l(:button_delete), + {:controller => 'messages', :action => 'quote', :id => message.id, :board_id => message.board_id}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :title => l(:button_delete) + ) if message.course_destroyable_by?(User.current) %> +
+
+
+
+
+ <% end %> + <% end %> + + <% end %> <% else %>

<%= l(:label_no_data) %>

<% end %>