From 65c2c43dcba98556c5b858dfc115de21df4ee39d Mon Sep 17 00:00:00 2001 From: alanlong9278 <547533434@qq.com> Date: Fri, 8 May 2015 10:09:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=B1=95=E5=BC=80=E6=94=B6=E8=B5=B7?= =?UTF-8?q?=E5=9B=9E=E5=A4=8D=20Signed-off-by:=20alanlong9278=20<547533434?= =?UTF-8?q?@qq.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/_course_show.html.erb | 5 +++-- app/views/boards/_project_show.html.erb | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/boards/_course_show.html.erb b/app/views/boards/_course_show.html.erb index 045ff90f3..3b14ee767 100644 --- a/app/views/boards/_course_show.html.erb +++ b/app/views/boards/_course_show.html.erb @@ -141,8 +141,9 @@ <% end %> -
展开回复(<%= topic.replies_count.to_s%>)
- + <%if replies_all.first %> +
展开回复(<%= topic.replies_count.to_s%>)
+ <% end %> <% end %> <% end %> diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index b4fb47976..aff39b0f3 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -144,8 +144,9 @@ <% end %> + <%if replies_all.first %>
展开回复(<%= topic.replies_count.to_s%>)
- + <% end %> <% end %> <% end %> From 087f46bf647f62c049c0954eb7dcb60864d91009 Mon Sep 17 00:00:00 2001 From: alanlong9278 <547533434@qq.com> Date: Fri, 8 May 2015 10:24:26 +0800 Subject: [PATCH 2/2] Signed-off-by: alanlong9278 <547533434@qq.com> --- app/views/boards/_project_show.html.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/views/boards/_project_show.html.erb b/app/views/boards/_project_show.html.erb index e93690e73..add60aa7a 100644 --- a/app/views/boards/_project_show.html.erb +++ b/app/views/boards/_project_show.html.erb @@ -37,6 +37,18 @@
<% author = topic.author.to_s + ":" %> <%= link_to author, user_path(topic.author), :class =>"talkmain_name fl " %> + <%= link_to( + l(:button_edit), + {:action => 'edit', :id => @topic}, + :class => 'talk_edit fr' + ) if @message.editable_by?(User.current) %> + <%= link_to( + l(:button_delete), + {:action => 'destroy', :id => @topic}, + :method => :post, + :data => {:confirm => l(:text_are_you_sure)}, + :class => 'talk_edit fr' + ) if @message.destroyable_by?(User.current) %>

  <%= h(topic.subject) %>

<% if topic.sticky? %> <%= l(:label_board_sticky)%>